Skip to content

Commit 41e02bf

Browse files
Harshitha Premkvalo
authored andcommitted
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 <quic_hprem@quicinc.com> Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230403184155.8670-3-quic_nmaran@quicinc.com
1 parent a06bfb3 commit 41e02bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/wireless/ath/ath11k

drivers/net/wireless/ath/ath11k/dp_rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3598,7 +3598,7 @@ static int ath11k_dp_rx_frag_h_mpdu(struct ath11k *ar,
35983598
goto out_unlock;
35993599
}
36003600

3601-
if (frag_no > __fls(rx_tid->rx_frag_bitmap))
3601+
if (!rx_tid->rx_frag_bitmap || (frag_no > __fls(rx_tid->rx_frag_bitmap)))
36023602
__skb_queue_tail(&rx_tid->rx_frags, msdu);
36033603
else
36043604
ath11k_dp_rx_h_sort_frags(ar, &rx_tid->rx_frags, msdu);

0 commit comments

Comments
 (0)