hostapd: SET ht_capab support for disabling 40 MHz bandwidth
'hostapd_cli SET ht_capab' only checked for [HT40+] or [HT40-] or both to be present. Based on the offset + or -, secondary_channel is updated but HT20/VHT20 mode can be brought up only from config file and can't be done using the SET command when the current HT mode is HT40+ or HT40-. When managing AP+STA mode from userspace doing hostapd_cli: "disable -> set channel, ht_capab -> enable" sequence, channel switch from HT40/VHT40 to HT20/VHT20 was not possible with this SET ht_capab limitation. Cover this additional case by resetting secondary_channel to 0 for HT20/VHT20 when ht_capab has neither [HT40+] nor [HT40-] present. Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
This commit is contained in:
parent
307324bf79
commit
47abe29aa9
1 changed files with 2 additions and 0 deletions
|
@ -1237,6 +1237,8 @@ static int hostapd_config_ht_capab(struct hostapd_config *conf,
|
||||||
conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
|
conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
|
||||||
conf->ht40_plus_minus_allowed = 1;
|
conf->ht40_plus_minus_allowed = 1;
|
||||||
}
|
}
|
||||||
|
if (!os_strstr(capab, "[HT40+]") && !os_strstr(capab, "[HT40-]"))
|
||||||
|
conf->secondary_channel = 0;
|
||||||
if (os_strstr(capab, "[SMPS-STATIC]")) {
|
if (os_strstr(capab, "[SMPS-STATIC]")) {
|
||||||
conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK;
|
conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK;
|
||||||
conf->ht_capab |= HT_CAP_INFO_SMPS_STATIC;
|
conf->ht_capab |= HT_CAP_INFO_SMPS_STATIC;
|
||||||
|
|
Loading…
Reference in a new issue