[PATCH v2 1/2] hostapd: dfs: allow switch to available channel

Janusz Dziedzic janusz.dziedzic at gmail.com
Sun Oct 11 15:01:52 EDT 2020


For EU, where preCAC is allowed, we should
allow switch to DFS available channels, instead
of restart BSS.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic at gmail.com>
---
 src/ap/dfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index 3c078b9cb..a19b8f164 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -1332,12 +1332,15 @@ 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");
 
-- 
2.17.1




More information about the Hostap mailing list