aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorPeng Xu <pxu@qti.qualcomm.com>2017-04-21 00:05:25 (GMT)
committerJouni Malinen <j@w1.fi>2017-04-29 13:35:23 (GMT)
commitec27b04e606873952956563fff99b6ed0bd93fd0 (patch)
treed0ec4889a17269ebbb1d34b24986fbbf8ac963b6 /hostapd
parentda6a28ba600d5a8eb67984c5fd85a0ed092a9203 (diff)
downloadhostap-ec27b04e606873952956563fff99b6ed0bd93fd0.zip
hostap-ec27b04e606873952956563fff99b6ed0bd93fd0.tar.gz
hostap-ec27b04e606873952956563fff99b6ed0bd93fd0.tar.bz2
hostapd: Select a valid secondary channel if both enabled
When starting AP in HT40 mode and both HT40+ and HT40- options are specified in hostapd.conf, select a valid secondary channel for the AP automatically. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 7b43806..d4d0c92 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -1106,6 +1106,10 @@ static int hostapd_config_ht_capab(struct hostapd_config *conf,
conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
conf->secondary_channel = 1;
}
+ if (os_strstr(capab, "[HT40+]") && os_strstr(capab, "[HT40-]")) {
+ conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
+ conf->ht40_plus_minus_allowed = 1;
+ }
if (os_strstr(capab, "[SMPS-STATIC]")) {
conf->ht_capab &= ~HT_CAP_INFO_SMPS_MASK;
conf->ht_capab |= HT_CAP_INFO_SMPS_STATIC;