[PATCH] AP: Do not include HE related IE in assoc rsp if receiving invalid HE capa IE

Howard Hsu howard-yh.hsu at mediatek.com
Mon Oct 3 23:57:08 PDT 2022


If station sends association request with invalid size HE capabilities
IE, current implementation will find the error and clear WLAN_STA_HE bit
of sta->flags. While in this case, AP still sends association response
with HE related IEs, which may confuse station that thay can connect in
HE mode. Before sending association response, it shall check whether
WLAN_STA_HE bit of sta->flags is set to decide if HE related IEs can be
included.

Signed-off-by: Howard Hsu <howard-yh.hsu at mediatek.com>
---
 src/ap/ieee802_11.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index a65a2964b..ac4d297b4 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -5241,7 +5241,8 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
 #endif /* CONFIG_IEEE80211AC */
 
 #ifdef CONFIG_IEEE80211AX
-	if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax) {
+	if (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax &&
+	    sta->flags & WLAN_STA_HE) {
 		p = hostapd_eid_he_capab(hapd, p, IEEE80211_MODE_AP);
 		p = hostapd_eid_he_operation(hapd, p);
 		p = hostapd_eid_cca(hapd, p);
-- 
2.18.0




More information about the Hostap mailing list