[rdk-b][common][bsp][Refactor and sync kernel/wifi from Openwrt]
[Description]
Refactor and sync kernel/wifi from Openwrt
[Release-log]
N/A
diff --git a/recipes-connectivity/hostapd/files/patches/99918-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch b/recipes-connectivity/hostapd/files/patches/99918-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch
new file mode 100644
index 0000000..a4fdea4
--- /dev/null
+++ b/recipes-connectivity/hostapd/files/patches/99918-Do-not-include-HE-capab-IE-if-associated-sta-s-HE-c.patch
@@ -0,0 +1,27 @@
+From 539d31649861447af9c555d32e1b2c6559b549aa Mon Sep 17 00:00:00 2001
+From: Howard Hsu <howard-yh.hsu@mediatek.com>
+Date: Thu, 22 Sep 2022 16:08:09 +0800
+Subject: [PATCH] Do not include HE capab IE if associated sta's HE capab IE is
+ invalid
+
+---
+ 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 a83194a..adf15d3 100644
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -5186,7 +5186,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
+