aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNaftali Goldstein <naftali.goldstein@intel.com>2017-06-08 08:17:55 (GMT)
committerJouni Malinen <j@w1.fi>2017-07-08 13:06:38 (GMT)
commit3f8e3a5486a9fa5e0d37021c47f8f673d32867c8 (patch)
tree1f3afd42d011056de37399293c20b06d2bb1da20 /src
parent6d3e24d3e38773ecd7e964063322d05d31116867 (diff)
downloadhostap-3f8e3a5486a9fa5e0d37021c47f8f673d32867c8.zip
hostap-3f8e3a5486a9fa5e0d37021c47f8f673d32867c8.tar.gz
hostap-3f8e3a5486a9fa5e0d37021c47f8f673d32867c8.tar.bz2
ap: Fix invalid HT40 channel pair fallback
In case of incorrect HT40 configuration as part of an attempt to create a 80 MHz AP, iface->conf->vht_oper_centr_freq_seg0_idx and iface->conf->vht_oper_centr_freq_seg1_idx are zero'ed, but iface->conf->vht_oper_chwidth remains VHT_CHANWIDTH_80MHZ. This causes the logic in dfs_get_start_chan_idx to fail. Fix this by setting iface->conf->vht_oper_chwidth to VHT_CHANWIDTH_USE_HT when zero'ing the center frequency parameters. Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/ap/hw_features.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index a53fd23..84e74ee 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -334,6 +334,7 @@ static void ieee80211n_check_scan(struct hostapd_iface *iface)
iface->conf->secondary_channel = 0;
iface->conf->vht_oper_centr_freq_seg0_idx = 0;
iface->conf->vht_oper_centr_freq_seg1_idx = 0;
+ iface->conf->vht_oper_chwidth = VHT_CHANWIDTH_USE_HT;
res = 1;
wpa_printf(MSG_INFO, "Fallback to 20 MHz");
}