]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DFS: Allow switch to an available channel
authorJanusz Dziedzic <janusz.dziedzic@gmail.com>
Sun, 11 Oct 2020 19:01:52 +0000 (21:01 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 7 Feb 2021 08:30:09 +0000 (10:30 +0200)
For EU, where preCAC is allowed, we should allow switch to DFS available
channels, instead of restarting BSS.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
src/ap/dfs.c

index be7726cbe9bea9e4f275783d995cef4c7bca8569..b990fb3423887c9b3589ad710032313531574a0e 100644 (file)
@@ -1348,12 +1348,16 @@ int hostapd_is_dfs_overlap(struct hostapd_iface *iface, enum chan_width width,
                if (!(chan->flag & HOSTAPD_CHAN_RADAR))
                        continue;
 
+               if ((chan->flag & HOSTAPD_CHAN_DFS_MASK) ==
+                   HOSTAPD_CHAN_DFS_AVAILABLE)
+                       continue;
+
                if (center_freq - chan->freq < half_width &&
                    chan->freq - center_freq < half_width)
                        res++;
        }
 
-       wpa_printf(MSG_DEBUG, "DFS: (%d, %d): in range: %s",
+       wpa_printf(MSG_DEBUG, "DFS CAC required: (%d, %d): in range: %s",
                   center_freq - half_width, center_freq + half_width,
                   res ? "yes" : "no");