]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Update DFS status in VHT80+80 mode
authorLei Wang <leiwa@codeaurora.org>
Mon, 23 Sep 2019 04:19:09 +0000 (12:19 +0800)
committerJouni Malinen <j@w1.fi>
Sun, 10 Nov 2019 20:54:19 +0000 (22:54 +0200)
Update center frequency and center frequency2's DFS channel status in
VHT80+80 mode. Otherwise it will cause AP failed to start on a DFS
channel.

Tested: qca9984 with firmware ver 10.4-3.10-00047

Signed-off-by: Rick Wu <rwu@codeaurora.org>
Signed-off-by: Lei Wang <leiwa@codeaurora.org>
src/ap/dfs.c

index c4c00fc4f848aa909ec23b173b97277fd2492910..db7130a0140a26160384566b85d2c2b0d7cf9f16 100644 (file)
@@ -515,6 +515,7 @@ static int set_dfs_state(struct hostapd_iface *iface, int freq, int ht_enabled,
        int n_chans = 1, i;
        struct hostapd_hw_modes *mode;
        int frequency = freq;
+       int frequency2 = 0;
        int ret = 0;
 
        mode = iface->current_mode;
@@ -542,6 +543,11 @@ static int set_dfs_state(struct hostapd_iface *iface, int freq, int ht_enabled,
                n_chans = 4;
                frequency = cf1 - 30;
                break;
+       case CHAN_WIDTH_80P80:
+               n_chans = 4;
+               frequency = cf1 - 30;
+               frequency2 = cf2 - 30;
+               break;
        case CHAN_WIDTH_160:
                n_chans = 8;
                frequency = cf1 - 70;
@@ -557,6 +563,11 @@ static int set_dfs_state(struct hostapd_iface *iface, int freq, int ht_enabled,
        for (i = 0; i < n_chans; i++) {
                ret += set_dfs_state_freq(iface, frequency, state);
                frequency = frequency + 20;
+
+               if (chan_width == CHAN_WIDTH_80P80) {
+                       ret += set_dfs_state_freq(iface, frequency2, state);
+                       frequency2 = frequency2 + 20;
+               }
        }
 
        return ret;