From: Lei Wang Date: Mon, 23 Sep 2019 04:19:09 +0000 (+0800) Subject: hostapd: Update DFS status in VHT80+80 mode X-Git-Tag: hostap_2_10~2220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=530b8ee3c8e5795d5c356796055ec9699934d05e;p=thirdparty%2Fhostap.git hostapd: Update DFS status in VHT80+80 mode 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 Signed-off-by: Lei Wang --- diff --git a/src/ap/dfs.c b/src/ap/dfs.c index c4c00fc4f..db7130a01 100644 --- a/src/ap/dfs.c +++ b/src/ap/dfs.c @@ -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;