Skip to content

Commit aae7f56

Browse files
committed
wifi: ath12k: Fix peer lookup in ath12k_dp_mon_rx_deliver_msdu()
JIRA: https://issues.redhat.com/browse/RHEL-114889 commit 7ca61ed Author: Hari Chandrakanthan <quic_haric@quicinc.com> Date: Thu Jul 24 09:35:52 2025 +0530 wifi: ath12k: Fix peer lookup in ath12k_dp_mon_rx_deliver_msdu() In ath12k_dp_mon_rx_deliver_msdu(), peer lookup fails because rxcb->peer_id is not updated with a valid value. This is expected in monitor mode, where RX frames bypass the regular RX descriptor path that typically sets rxcb->peer_id. As a result, the peer is NULL, and link_id and link_valid fields in the RX status are not populated. This leads to a WARN_ON in mac80211 when it receives data frame from an associated station with invalid link_id. Fix this potential issue by using ppduinfo->peer_id, which holds the correct peer id for the received frame. This ensures that the peer is correctly found and the associated link metadata is updated accordingly. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Fixes: bd00cc7 ("wifi: ath12k: replace the usage of rx desc with rx_info") Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com> Signed-off-by: Aishwarya R <aishwarya.r@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20250724040552.1170642-1-aishwarya.r@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
1 parent 4172c0c commit aae7f56

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/net/wireless/ath/ath12k/dp_mon.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,6 +2244,7 @@ static void ath12k_dp_mon_update_radiotap(struct ath12k *ar,
22442244

22452245
static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct *napi,
22462246
struct sk_buff *msdu,
2247+
const struct hal_rx_mon_ppdu_info *ppduinfo,
22472248
struct ieee80211_rx_status *status,
22482249
u8 decap)
22492250
{
@@ -2257,7 +2258,6 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct
22572258
struct ieee80211_sta *pubsta = NULL;
22582259
struct ath12k_peer *peer;
22592260
struct ath12k_skb_rxcb *rxcb = ATH12K_SKB_RXCB(msdu);
2260-
struct ath12k_dp_rx_info rx_info;
22612261
bool is_mcbc = rxcb->is_mcbc;
22622262
bool is_eapol_tkip = rxcb->is_eapol;
22632263

@@ -2271,8 +2271,7 @@ static void ath12k_dp_mon_rx_deliver_msdu(struct ath12k *ar, struct napi_struct
22712271
}
22722272

22732273
spin_lock_bh(&ar->ab->base_lock);
2274-
rx_info.addr2_present = false;
2275-
peer = ath12k_dp_rx_h_find_peer(ar->ab, msdu, &rx_info);
2274+
peer = ath12k_peer_find_by_id(ar->ab, ppduinfo->peer_id);
22762275
if (peer && peer->sta) {
22772276
pubsta = peer->sta;
22782277
if (pubsta->valid_links) {
@@ -2365,7 +2364,7 @@ static int ath12k_dp_mon_rx_deliver(struct ath12k *ar,
23652364
decap = mon_mpdu->decap_format;
23662365

23672366
ath12k_dp_mon_update_radiotap(ar, ppduinfo, mon_skb, rxs);
2368-
ath12k_dp_mon_rx_deliver_msdu(ar, napi, mon_skb, rxs, decap);
2367+
ath12k_dp_mon_rx_deliver_msdu(ar, napi, mon_skb, ppduinfo, rxs, decap);
23692368
mon_skb = skb_next;
23702369
} while (mon_skb);
23712370
rxs->flag = 0;

0 commit comments

Comments
 (0)