blob: d6fa8b66815f23644d8860a09ac2a9d6d26106a9 [file] [log] [blame]
developerf0fd7052023-08-14 20:23:42 +08001From 70c8f9355c4df3c083965ce652d33e01f8fe7e7c Mon Sep 17 00:00:00 2001
2From: "Allen.Ye" <allen.ye@mediatek.com>
3Date: Mon, 7 Aug 2023 15:27:27 +0800
4Subject: [PATCH 38/38] hostapd: mtk: Fix rnr ie length when no need to report
5 bss
6
7Fix rnr ie length when no need to report bss. If we don't have content in
8TBTT then don't change the length of the ie (*size_offset).
9
10Signed-off-by: Allen.Ye <allen.ye@mediatek.com>
11---
12 src/ap/ieee802_11.c | 6 ++++--
13 1 file changed, 4 insertions(+), 2 deletions(-)
14
15diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
16index b73b821..ff39fad 100644
17--- a/src/ap/ieee802_11.c
18+++ b/src/ap/ieee802_11.c
19@@ -7530,8 +7530,10 @@ static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
20 }
21
22 start = i;
23- *tbtt_count_pos = RNR_TBTT_INFO_COUNT(tbtt_count - 1);
24- *size_offset = (eid - size_offset) - 1;
25+ if (tbtt_count != 0) {
26+ *tbtt_count_pos = RNR_TBTT_INFO_COUNT(tbtt_count - 1);
27+ *size_offset = (eid - size_offset) - 1;
28+ }
29 }
30
31 if (tbtt_count == 0)
32--
332.18.0
34