diff mbox series

wifi: ath12k: fix incorrect handling of AMSDU frames

Message ID 20230320090400.30027-1-quic_hprem@quicinc.com
State New
Headers show
Series wifi: ath12k: fix incorrect handling of AMSDU frames | expand

Commit Message

Harshitha Prem March 20, 2023, 9:04 a.m. UTC
When a data traffic with size greater than 1500 is initiated,
say size 65500, it is sent as a set of AMSDUs (3 MSDUs)
in a MPDU.

These AMSDUs are incorrectly classified as multicast
and peer id gets changed, except for first msdu,
because of mcast_bcast bit derived from rx_desc
for every msdu received.

The mcast_bcast bit in rx_desc is only valid for
first msdu. Hence, add changes to derive mcast_bcast
only if it is a first msdu.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/dp_rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kalle Valo March 24, 2023, 2:49 p.m. UTC | #1
Harshitha Prem <quic_hprem@quicinc.com> wrote:

> When a data traffic with size greater than 1500 is initiated,
> say size 65500, it is sent as a set of AMSDUs (3 MSDUs)
> in a MPDU.
> 
> These AMSDUs are incorrectly classified as multicast
> and peer id gets changed, except for first msdu,
> because of mcast_bcast bit derived from rx_desc
> for every msdu received.
> 
> The mcast_bcast bit in rx_desc is only valid for
> first msdu. Hence, add changes to derive mcast_bcast
> only if it is a first msdu.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

392b6b76fd39 wifi: ath12k: fix incorrect handling of AMSDU frames
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 0adcbcfa0db5..46ba6ea1a5b3 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -196,7 +196,8 @@  static void ath12k_dp_rxdesc_set_msdu_len(struct ath12k_base *ab,
 static bool ath12k_dp_rx_h_is_mcbc(struct ath12k_base *ab,
 				   struct hal_rx_desc *desc)
 {
-	return ab->hw_params->hal_ops->rx_desc_is_mcbc(desc);
+	return (ath12k_dp_rx_h_first_msdu(ab, desc) &&
+		ab->hw_params->hal_ops->rx_desc_is_mcbc(desc));
 }
 
 static bool ath12k_dp_rxdesc_mac_addr2_valid(struct ath12k_base *ab,