blob: 45a340d0a1b72f9ad13b78914a4e147f396e83e4 [file] [log] [blame]
developer76be16a2023-07-21 20:12:50 +08001From d65c803ab5583dddc6574b09fee47ccfb39cb99b Mon Sep 17 00:00:00 2001
2From: mtk20656 <chank.chen@mediatek.com>
3Date: Mon, 24 Jul 2023 11:30:27 +0800
4Subject: [PATCH] hostapd: mtk: add extension IE list for non-inherit IE in
5 mbssid
6
7Certain clients do not scan all non tx profiles due to absence of
8element ID extension list which is mandatory field in non inheritance
9IE. Non inheritance Element ID is followed by extension element ID.
10Length is expected to be mentioned. Currently we do not support any
11extension element and hence filling length as 0.
12
13Signed-off-by: mtk20656 <chank.chen@mediatek.com>
14---
15 src/ap/ieee802_11.c | 9 +++++++--
16 1 file changed, 7 insertions(+), 2 deletions(-)
17
18diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
19old mode 100644
20new mode 100755
21index 1bf5bea..d36798e
22--- a/src/ap/ieee802_11.c
23+++ b/src/ap/ieee802_11.c
24@@ -7639,7 +7639,7 @@ static size_t hostapd_eid_mbssid_elem_len(struct hostapd_data *hapd,
25 else if (hapd->conf->xrates_supported)
26 ie_count++;
27 if (ie_count)
28- nontx_profile_len += 4 + ie_count;
29+ nontx_profile_len += 5 + ie_count;
30
31 if (len + nontx_profile_len > 255)
32 break;
33@@ -7780,11 +7780,16 @@ static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end,
34 non_inherit_ie[ie_count++] = WLAN_EID_EXT_SUPP_RATES;
35 if (ie_count) {
36 *eid++ = WLAN_EID_EXTENSION;
37- *eid++ = 2 + ie_count;
38+ *eid++ = 3 + ie_count;
39 *eid++ = WLAN_EID_EXT_NON_INHERITANCE;
40 *eid++ = ie_count;
41 os_memcpy(eid, non_inherit_ie, ie_count);
42 eid += ie_count;
43+ /* Element ID extension list is mandatory part of non inheritance IE.
44+ * It has a length field followed by extension IEs. Currently no
45+ * extension IEs are supported so filling length as 0.
46+ */
47+ *eid++ = 0;
48 }
49
50 *eid_len_pos = (eid - eid_len_pos) - 1;
51--
522.18.0
53