]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DFS: Print the random channel list entry selection in debug print
authorJouni Malinen <quic_jouni@quicinc.com>
Fri, 26 Jan 2024 09:59:48 +0000 (11:59 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 26 Jan 2024 09:59:48 +0000 (11:59 +0200)
This makes it a bit easier to understand what happens with random
channel selection after radar detection.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/dfs.c

index d5bb240ec6bdf1baea6beaa3915b3bc8a9d2a7d7..5e4c8107037962348dd84aae2ecc5ac7162953cf 100644 (file)
@@ -551,6 +551,8 @@ dfs_get_valid_channel(struct hostapd_iface *iface,
        if (os_get_random((u8 *) &_rand, sizeof(_rand)) < 0)
                return NULL;
        chan_idx = _rand % num_available_chandefs;
+       wpa_printf(MSG_DEBUG, "DFS: Picked random entry from the list: %d/%d",
+                  chan_idx, num_available_chandefs);
        dfs_find_channel(iface, &chan, chan_idx, type);
        if (!chan) {
                wpa_printf(MSG_DEBUG, "DFS: no random channel found");