developer | 76be16a | 2023-07-21 20:12:50 +0800 | [diff] [blame] | 1 | From d65c803ab5583dddc6574b09fee47ccfb39cb99b Mon Sep 17 00:00:00 2001 |
| 2 | From: mtk20656 <chank.chen@mediatek.com> |
| 3 | Date: Mon, 24 Jul 2023 11:30:27 +0800 |
| 4 | Subject: [PATCH] hostapd: mtk: add extension IE list for non-inherit IE in |
| 5 | mbssid |
| 6 | |
| 7 | Certain clients do not scan all non tx profiles due to absence of |
| 8 | element ID extension list which is mandatory field in non inheritance |
| 9 | IE. Non inheritance Element ID is followed by extension element ID. |
| 10 | Length is expected to be mentioned. Currently we do not support any |
| 11 | extension element and hence filling length as 0. |
| 12 | |
| 13 | Signed-off-by: mtk20656 <chank.chen@mediatek.com> |
| 14 | --- |
| 15 | src/ap/ieee802_11.c | 9 +++++++-- |
| 16 | 1 file changed, 7 insertions(+), 2 deletions(-) |
| 17 | |
| 18 | diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c |
| 19 | old mode 100644 |
| 20 | new mode 100755 |
| 21 | index 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 | -- |
| 52 | 2.18.0 |
| 53 | |