]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: ath11k: fix peer resolution on rx path when peer_id=0
authorMatthew Leach <matthew.leach@collabora.com>
Fri, 24 Apr 2026 09:50:35 +0000 (10:50 +0100)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 18 May 2026 13:47:02 +0000 (06:47 -0700)
It has been observed that on certain chipsets a peer can be assigned
peer_id=0. For reception of non-aggregated MPDUs this is fine as
ath11k_dp_rx_h_find_peer() has a fallback case where it locates the peer
based upon the source MAC address. On an aggregated link, the mpdu_start
header is only populated by hardware on the first sub-MSDU. This causes
the peer resolution to be skipped for the subsequent MSDUs and the
encryption type of these frames to be set to an incorrect value,
resulting in these MSDUs being dropped by ieee80211.

ath11k_pci 0000:03:00.0: data rx skb 000000002f4b704d len 1534 peer xx:xx:xx:xx:xx:xx 0 ucast sn 3063 he160 rate_idx 9 vht_nss 2 freq 5240 band 1 flag 0x40d1a fcs-err 0 mic-err 0 amsdu-more 0 peer_id 0 first_msdu 1 last_msdu 0
ath11k_pci 0000:03:00.0: data rx skb 0000000038acd580 len 1534 peer (null) 0 ucast sn 3063 he160 rate_idx 9 vht_nss 2 freq 5240 band 1 flag 0x40d00 fcs-err 0 mic-err 0 amsdu-more 0 peer_id 0 first_msdu 0 last_msdu 1

Remove the null peer_id checks in ath11k_dp_rx_h_find_peer() and
ath11k_hal_rx_parse_mon_status_tlv(), allowing peers with an assigned ID
of 0 to be resolved.

Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.9

Fixes: 2167fa606c0f ("ath11k: Add support for RX decapsulation offload")
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Signed-off-by: Matthew Leach <matthew.leach@collabora.com>
Reviewed-by: P Praneesh <praneesh.p@oss.qualcomm.com>
Link: https://patch.msgid.link/20260424-ath11k-null-peerid-workaround-v4-1-252b224d3cf6@collabora.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath11k/dp_rx.c
drivers/net/wireless/ath/ath11k/hal_rx.c

index fe79109adc705d33ae306c4fe3a03b9abcede3a0..72d5d933656dddb555682a69c82c5a713a1e1a7e 100644 (file)
@@ -2214,8 +2214,7 @@ ath11k_dp_rx_h_find_peer(struct ath11k_base *ab, struct sk_buff *msdu)
 
        lockdep_assert_held(&ab->base_lock);
 
-       if (rxcb->peer_id)
-               peer = ath11k_peer_find_by_id(ab, rxcb->peer_id);
+       peer = ath11k_peer_find_by_id(ab, rxcb->peer_id);
 
        if (peer)
                return peer;
index 753bd93f02123d081480cbdb6d2026c234eb5a0d..51e0840bc0d1e8f4d098651de28e7f30b1ee25c0 100644 (file)
@@ -1467,11 +1467,8 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab,
        case HAL_RX_MPDU_START: {
                struct hal_rx_mpdu_info *mpdu_info =
                                (struct hal_rx_mpdu_info *)tlv_data;
-               u16 peer_id;
 
-               peer_id = ath11k_hal_rx_mpduinfo_get_peerid(ab, mpdu_info);
-               if (peer_id)
-                       ppdu_info->peer_id = peer_id;
+               ppdu_info->peer_id = ath11k_hal_rx_mpduinfo_get_peerid(ab, mpdu_info);
                break;
        }
        case HAL_RXPCU_PPDU_END_INFO: {