[PATCH 1/2] hostapd: DFS allow mixed channels

Janusz Dziedzic janusz.dziedzic
Sat Feb 15 10:37:21 PST 2014


Allow mixed DFS and non-DFS channels.
Eg. VHT160 on channels 36-64.
Usefull for testing with mac80211_hwsim
and VHT160.

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

diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index ec691db..b8ffaec 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -296,6 +296,13 @@ static int dfs_check_chans_available(struct hostapd_iface *iface,
 
 	for(i = 0; i < n_chans; i++) {
 		channel = &mode->channels[start_chan_idx + i];
+
+		if (channel->flag & HOSTAPD_CHAN_DISABLED)
+			break;
+
+		if (!(channel->flag & HOSTAPD_CHAN_RADAR))
+			continue;
+
 		if ((channel->flag & HOSTAPD_CHAN_DFS_MASK) !=
 		    HOSTAPD_CHAN_DFS_AVAILABLE)
 			break;
-- 
1.7.9.5




More information about the Hostap mailing list