]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Allow to switch to DFS channels if available
authorSimon Wunderlich <sw@simonwunderlich.de>
Thu, 6 Feb 2014 18:30:38 +0000 (19:30 +0100)
committerJouni Malinen <j@w1.fi>
Tue, 11 Mar 2014 17:01:44 +0000 (19:01 +0200)
If DFS channels are marked as "available", an AP can switch to them
immediately without performing CAC. Therefore, the channel selection
function should consider these channels even though these are radar
channels.

Signed-hostap: Simon Wunderlich <sw@simonwunderlich.de>

src/ap/dfs.c

index 590a03acfc2dae050e77cacf3e8bbe273dce4bf8..71ddc807a1f188a0d3888a5bce5751b41932f352 100644 (file)
@@ -50,9 +50,11 @@ static int dfs_channel_available(struct hostapd_channel_data *chan,
        /*
         * When radar detection happens, CSA is performed. However, there's no
         * time for CAC, so radar channels must be skipped when finding a new
-        * channel for CSA.
+        * channel for CSA, unless they are available for immediate use.
         */
-       if (skip_radar && chan->flag & HOSTAPD_CHAN_RADAR)
+       if (skip_radar && (chan->flag & HOSTAPD_CHAN_RADAR) &&
+           ((chan->flag & HOSTAPD_CHAN_DFS_MASK) !=
+            HOSTAPD_CHAN_DFS_AVAILABLE))
                return 0;
 
        if (chan->flag & HOSTAPD_CHAN_DISABLED)