[][MAC80211][misc][Rebase hostapd patches]
[Description]
Refactor WiFi6 series hostapd patches and fix WiFi7 11vMBSS non-inherit IE issue
[Release-log]
N/A
Change-Id: Id5aade86269b78f5f7c3450701806b330b1e3b3c
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7788734
diff --git a/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0035-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch b/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0035-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch
new file mode 100644
index 0000000..160d146
--- /dev/null
+++ b/autobuild_mac80211_release/package/network/services/hostapd/patches/mtk-0035-hostapd-mtk-add-extension-IE-list-for-non-inherit-IE.patch
@@ -0,0 +1,51 @@
+From fb967d41b610096ef179b45cf85123de39c5665e Mon Sep 17 00:00:00 2001
+From: mtk20656 <chank.chen@mediatek.com>
+Date: Mon, 24 Jul 2023 11:30:27 +0800
+Subject: [PATCH 35/35] hostapd: mtk: add extension IE list for non-inherit IE
+ in mbssid
+
+Certain clients do not scan all non tx profiles due to absence of
+element ID extension list which is mandatory field in non inheritance
+IE. Non inheritance Element ID is followed by extension element ID.
+Length is expected to be mentioned. Currently we do not support any
+extension element and hence filling length as 0.
+
+Signed-off-by: mtk20656 <chank.chen@mediatek.com>
+---
+ src/ap/ieee802_11.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+index 30bfa30..f866b8a 100644
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -7657,7 +7657,7 @@ static size_t hostapd_eid_mbssid_elem_len(struct hostapd_data *hapd,
+ else if (hapd->conf->xrates_supported)
+ ie_count++;
+ if (ie_count)
+- nontx_profile_len += (4 + ie_count);
++ nontx_profile_len += (5 + ie_count);
+
+ if ((len + nontx_profile_len) > 255)
+ goto mbssid_too_big;
+@@ -7792,11 +7792,16 @@ static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end,
+ }
+ if (ie_count) {
+ *eid++ = WLAN_EID_EXTENSION;
+- *eid++ = 2 + ie_count;
++ *eid++ = 3 + ie_count;
+ *eid++ = WLAN_EID_EXT_NON_INHERITANCE;
+ *eid++ = ie_count;
+ os_memcpy(eid, non_inherit_ie, ie_count);
+ eid += ie_count;
++ /* Element ID extension list is mandatory part of non inheritance IE.
++ * It has a length field followed by extension IEs. Currently no
++ * extension IEs are supported so filling length as 0.
++ */
++ *eid++ = 0;
+ }
+
+ *eid_len_pos = (eid - eid_len_pos) - 1;
+--
+2.18.0
+