[PATCH 3/3] hostapd: Update ht_capab HT20/40 upon channel switch

Michal Kazior michal.kazior at tieto.com
Tue Mar 18 08:37:36 EDT 2014


The HT Capabilities IE wasn't updated when HT width was changed. This
could possibly confuse clients.

Signed-off-by: Michal Kazior <michal.kazior at tieto.com>
---
 src/ap/drv_callbacks.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 9ed7601..3c6a376 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -478,6 +478,11 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
 	hapd->iconf->vht_oper_centr_freq_seg0_idx = seg0_idx;
 	hapd->iconf->vht_oper_centr_freq_seg1_idx = seg1_idx;
 
+	if (offset)
+		hapd->iconf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
+	else
+		hapd->iconf->ht_capab &= ~HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
+
 	if (hapd->iface->csa_in_progress &&
 	    freq == hapd->iface->cs_freq_params.freq) {
 		hapd->iconf->ieee80211ac = hapd->iface->cs_freq_params.vht_enabled;
-- 
1.8.5.3



More information about the HostAP mailing list