developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 1 | From fea4788692076f9c0701ecec68a85198a70d05c0 Mon Sep 17 00:00:00 2001 |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 2 | From: "Allen.Ye" <allen.ye@mediatek.com> |
| 3 | Date: Mon, 7 Aug 2023 15:27:27 +0800 |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 4 | Subject: [PATCH 32/54] mtk: hostapd: Fix rnr ie length when no need to report |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 5 | bss |
| 6 | |
| 7 | Fix rnr ie length when no need to report bss. If we don't have content in |
| 8 | TBTT then don't change the length of the ie (*size_offset). |
| 9 | |
| 10 | Signed-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 | |
| 15 | diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 16 | index e05a06b09..7b6aabbff 100755 |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 17 | --- a/src/ap/ieee802_11.c |
| 18 | +++ b/src/ap/ieee802_11.c |
developer | bd9fa1e | 2023-10-16 11:04:00 +0800 | [diff] [blame] | 19 | @@ -7511,8 +7511,10 @@ static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd, |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 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 | -- |
| 33 | 2.18.0 |
| 34 | |