[PATCH 1/3] hostapd: Fix VHT unsolicitated channel switching

Michal Kazior michal.kazior
Tue Mar 18 05:37:34 PDT 2014


The ieee80211ac config wasn't updated upon channel switch notification.
This led to inconsistent beacons in some cases.

It's not possible to deduce VHT status for an unsolicitated channel
switch now in all cases.

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

diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index a8c24eb..439bf66 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -462,6 +462,15 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
 		break;
 	}
 
+	/* FIXME: It's impossible to tell how exactly an unsolicitated channel
+	 * switch downgraded channel definition in all cases. */
+	if (width == CHAN_WIDTH_80 ||
+	    width == CHAN_WIDTH_80P80 ||
+	    width == CHAN_WIDTH_160)
+		hapd->iconf->ieee80211ac = 1;
+	if (!ht)
+		hapd->iconf->ieee80211ac = 0;
+
 	hapd->iconf->channel = channel;
 	hapd->iconf->ieee80211n = ht;
 	hapd->iconf->secondary_channel = offset;
-- 
1.8.5.3




More information about the Hostap mailing list