From 10949e24808f790ae39b98d1af6bfc52332ee904 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 21 Mar 2018 16:58:05 +0200 Subject: [PATCH] Do not disable 40 MHz based on co-ex report with matching primary channel When processing 20/40 BSS Coexistence Management frames that do not explicitly require 40 MHz to be disabled, check whether the reported channels in 20/40 BSS Intolerant Channel Report element match the current primary channel. If so, allow 40 MHz operation to continue. This makes the during-operation updates for 20/40 Operation Permitted more consistent with the scans during initial BSS startup. The received 20/40 BSS Intolerant Channel Report channels are to be used in the OT set in the during-operation determination and the P == OT_i exception was ignored in the previous implementation which could result in the AP first starting with 40 MHz and then dropping to 20 MHz on first received 20/40 BSS Coexistence Management frame even though there was no change in the neighboring BSSs. Signed-off-by: Jouni Malinen --- src/ap/ieee802_11_ht.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ap/ieee802_11_ht.c b/src/ap/ieee802_11_ht.c index 27f388588..214855dcc 100644 --- a/src/ap/ieee802_11_ht.c +++ b/src/ap/ieee802_11_ht.c @@ -332,8 +332,10 @@ void hostapd_2040_coex_action(struct hostapd_data *hapd, for (i = 0; i < ielen - 1; i++) { u8 chan = ic_report->variable[i]; + if (chan == iface->conf->channel) + continue; /* matching own primary channel */ if (is_40_allowed(iface, chan)) - continue; + continue; /* not within affected channels */ hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_DEBUG,