developer | 2fd555a | 2023-07-25 05:48:15 +0800 | [diff] [blame^] | 1 | From fb967d41b610096ef179b45cf85123de39c5665e Mon Sep 17 00:00:00 2001 |
developer | 76be16a | 2023-07-21 20:12:50 +0800 | [diff] [blame] | 2 | From: mtk20656 <chank.chen@mediatek.com> |
| 3 | Date: Mon, 24 Jul 2023 11:30:27 +0800 |
developer | 2fd555a | 2023-07-25 05:48:15 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 35/35] hostapd: mtk: add extension IE list for non-inherit IE |
| 5 | in mbssid |
developer | 76be16a | 2023-07-21 20:12:50 +0800 | [diff] [blame] | 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 |
developer | 2fd555a | 2023-07-25 05:48:15 +0800 | [diff] [blame^] | 19 | index 30bfa30..f866b8a 100644 |
developer | 76be16a | 2023-07-21 20:12:50 +0800 | [diff] [blame] | 20 | --- a/src/ap/ieee802_11.c |
| 21 | +++ b/src/ap/ieee802_11.c |
developer | 2fd555a | 2023-07-25 05:48:15 +0800 | [diff] [blame^] | 22 | @@ -7657,7 +7657,7 @@ static size_t hostapd_eid_mbssid_elem_len(struct hostapd_data *hapd, |
developer | 76be16a | 2023-07-21 20:12:50 +0800 | [diff] [blame] | 23 | else if (hapd->conf->xrates_supported) |
| 24 | ie_count++; |
| 25 | if (ie_count) |
developer | 2fd555a | 2023-07-25 05:48:15 +0800 | [diff] [blame^] | 26 | - nontx_profile_len += (4 + ie_count); |
| 27 | + nontx_profile_len += (5 + ie_count); |
developer | 76be16a | 2023-07-21 20:12:50 +0800 | [diff] [blame] | 28 | |
developer | 2fd555a | 2023-07-25 05:48:15 +0800 | [diff] [blame^] | 29 | if ((len + nontx_profile_len) > 255) |
| 30 | goto mbssid_too_big; |
| 31 | @@ -7792,11 +7792,16 @@ static u8 * hostapd_eid_mbssid_elem(struct hostapd_data *hapd, u8 *eid, u8 *end, |
| 32 | } |
developer | 76be16a | 2023-07-21 20:12:50 +0800 | [diff] [blame] | 33 | if (ie_count) { |
| 34 | *eid++ = WLAN_EID_EXTENSION; |
| 35 | - *eid++ = 2 + ie_count; |
| 36 | + *eid++ = 3 + ie_count; |
| 37 | *eid++ = WLAN_EID_EXT_NON_INHERITANCE; |
| 38 | *eid++ = ie_count; |
| 39 | os_memcpy(eid, non_inherit_ie, ie_count); |
| 40 | eid += ie_count; |
| 41 | + /* Element ID extension list is mandatory part of non inheritance IE. |
| 42 | + * It has a length field followed by extension IEs. Currently no |
| 43 | + * extension IEs are supported so filling length as 0. |
| 44 | + */ |
| 45 | + *eid++ = 0; |
| 46 | } |
| 47 | |
| 48 | *eid_len_pos = (eid - eid_len_pos) - 1; |
| 49 | -- |
| 50 | 2.18.0 |
| 51 | |