diff options
author | Clément Viel <clement.viel@qorvo.com> | 2022-09-21 17:39:43 +0200 |
---|---|---|
committer | Clément Viel <clement.viel@qorvo.com> | 2022-09-21 17:51:18 +0200 |
commit | b9c8775cbf64e7bd4fcd70cd3dd97e23c209cd62 (patch) | |
tree | 2123e734d607234d12dbbb8d721d348c277c51ae | |
parent | 282b4eb532a0e2436402e2c4f33acf4a4e4902f6 (diff) | |
download | uwb-b9c8775cbf64e7bd4fcd70cd3dd97e23c209cd62.tar.gz |
mac: limit rssi boundariesandroid-t-qpr1-beta-3_r0.5android-t-qpr1-beta-3.1_r0.1android-13.0.0_r0.60android-13.0.0_r0.55android-13.0.0_r0.50android-gs-pantah-5.10-t-qpr1-beta-3android-gs-pantah-5.10-android13-qpr1-beta-3android-gs-pantah-5.10-android13-qpr1
Bug: 247788041
Change-Id: I9dfc7b9d7397e1f241caa939d4b220e45b1e129d
Signed-off-by: Clément Viel <clement.viel@qorvo.com>
-rw-r--r-- | mac/fira_access.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mac/fira_access.c b/mac/fira_access.c index 7275f94..1eab75b 100644 --- a/mac/fira_access.c +++ b/mac/fira_access.c @@ -713,9 +713,13 @@ static void fira_rx_frame(struct mcps802154_access *access, int frame_idx, error); if (info && info->flags & MCPS802154_RX_FRAME_INFO_RSSI) { + if ((ri->n_rx_rssis + 1) > FIRA_MESSAGE_ID_MAX) + return; + ri->rx_rssis[ri->n_rx_rssis++] = info->rssi < FIRA_RSSI_MAX ? info->rssi : FIRA_RSSI_MAX; } + if (fira_do_process_rx_frame(error, ri, slot->index)) { switch (slot->message_id) { case FIRA_MESSAGE_ID_RANGING_INITIATION: |