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 <rwu@codeaurora.org>
Signed-off-by: Lei Wang <leiwa@codeaurora.org>
This commit is contained in:
Lei Wang 2019-09-23 12:19:09 +08:00 committed by Jouni Malinen
parent 93ba13bcfd
commit 530b8ee3c8
1 changed files with 11 additions and 0 deletions

View 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;