aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshitha Prem <[email protected]>2023-04-04 00:11:55 +0530
committerKalle Valo <[email protected]>2023-04-17 13:28:31 +0300
commit41e02bf4ae32cf2ac47b08b4caaa9c1a032e4ce7 (patch)
treee1106ea3027c7ff38d92570c8e77996d29917db7
parenta06bfb3c9f69f303692cdae87bc0899d2ae8b2a6 (diff)
wifi: ath11k: fix undefined behavior with __fls in dp
"__fls" would have an undefined behavior if the argument is passed as "0". Hence, added changes to handle the same. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Harshitha Prem <[email protected]> Signed-off-by: Nagarajan Maran <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--drivers/net/wireless/ath/ath11k/dp_rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index ab6b18de6371..847da167a41c 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -3598,7 +3598,7 @@ static int ath11k_dp_rx_frag_h_mpdu(struct ath11k *ar,
goto out_unlock;
}
- if (frag_no > __fls(rx_tid->rx_frag_bitmap))
+ if (!rx_tid->rx_frag_bitmap || (frag_no > __fls(rx_tid->rx_frag_bitmap)))
__skb_queue_tail(&rx_tid->rx_frags, msdu);
else
ath11k_dp_rx_h_sort_frags(ar, &rx_tid->rx_frags, msdu);