[PATCH ath-next 2/2] wifi: ath12k: Skip peer link info update in rx_status for monitor MSDUs
Sushant Butta
sushant.butta at oss.qualcomm.com
Mon Jun 8 23:48:56 PDT 2026
Do not populate peer and link_id in ieee80211_rx_status for monitor
MSDUs.
The monitor RX path is handled differently in mac80211 when
RX_FLAG_ONLY_MONITOR is set, and does not consume peer/link metadata.
As such, looking up the peer and updating link_id here is unnecessary.
Additionally, this metadata is not required for monitor mode delivery,
and performing the lookup/update introduces redundant work and the
potential for inconsistent rx_status state if multiple paths modify it.
Hence, remove the peer lookup and link_id update from the monitor MSDU
delivery path.
This also removes the per-MSDU debug logging in the monitor path,
slightly reducing debuggability, but avoids unnecessary overhead in the
monitor RX path.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Signed-off-by: Sushant Butta <sushant.butta at oss.qualcomm.com>
---
drivers/net/wireless/ath/ath12k/dp_mon.c | 54 +-----------------------
1 file changed, 1 insertion(+), 53 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_mon.c b/drivers/net/wireless/ath/ath12k/dp_mon.c
index cfcfa93eeb44..7d5be77b081f 100644
--- a/drivers/net/wireless/ath/ath12k/dp_mon.c
+++ b/drivers/net/wireless/ath/ath12k/dp_mon.c
@@ -495,8 +495,6 @@ void ath12k_dp_mon_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev,
struct sk_buff *msdu,
struct ieee80211_rx_status *status)
{
- struct ath12k_dp *dp = dp_pdev->dp;
- struct ath12k_base *ab = dp->ab;
static const struct ieee80211_radiotap_he known = {
.data1 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_DATA_MCS_KNOWN |
IEEE80211_RADIOTAP_HE_DATA1_BW_RU_ALLOC_KNOWN),
@@ -504,13 +502,6 @@ void ath12k_dp_mon_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev,
};
struct ieee80211_rx_status *rx_status;
struct ieee80211_radiotap_he *he = NULL;
- struct ieee80211_sta *pubsta = NULL;
- struct ath12k_dp_link_peer *peer;
- struct ath12k_skb_rxcb *rxcb = ATH12K_SKB_RXCB(msdu);
- struct hal_rx_desc_data rx_info;
- bool is_mcbc = rxcb->is_mcbc;
- struct hal_rx_desc *rx_desc = (struct hal_rx_desc *)msdu->data;
- u8 addr[ETH_ALEN] = {};
status->link_valid = 0;
@@ -521,53 +512,10 @@ void ath12k_dp_mon_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev,
status->flag |= RX_FLAG_RADIOTAP_HE;
}
- ath12k_dp_extract_rx_desc_data(dp->hal, &rx_info, rx_desc, rx_desc);
-
- rcu_read_lock();
- spin_lock_bh(&dp->dp_lock);
- peer = ath12k_dp_rx_h_find_link_peer(dp_pdev, msdu, &rx_info);
- if (peer && peer->sta) {
- pubsta = peer->sta;
- memcpy(addr, peer->addr, ETH_ALEN);
- if (pubsta->valid_links) {
- status->link_valid = 1;
- status->link_id = peer->link_id;
- }
- }
-
- spin_unlock_bh(&dp->dp_lock);
- rcu_read_unlock();
-
- ath12k_dbg(ab, ATH12K_DBG_DATA,
- "rx skb %p len %u peer %pM %u %s %s%s%s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
- msdu,
- msdu->len,
- addr,
- rxcb->tid,
- (is_mcbc) ? "mcast" : "ucast",
- (status->encoding == RX_ENC_LEGACY) ? "legacy" : "",
- (status->encoding == RX_ENC_HT) ? "ht" : "",
- (status->encoding == RX_ENC_VHT) ? "vht" : "",
- (status->encoding == RX_ENC_HE) ? "he" : "",
- (status->bw == RATE_INFO_BW_40) ? "40" : "",
- (status->bw == RATE_INFO_BW_80) ? "80" : "",
- (status->bw == RATE_INFO_BW_160) ? "160" : "",
- (status->bw == RATE_INFO_BW_320) ? "320" : "",
- status->enc_flags & RX_ENC_FLAG_SHORT_GI ? "sgi " : "",
- status->rate_idx,
- status->nss,
- status->freq,
- status->band, status->flag,
- !!(status->flag & RX_FLAG_FAILED_FCS_CRC),
- !!(status->flag & RX_FLAG_MMIC_ERROR),
- !!(status->flag & RX_FLAG_AMSDU_MORE));
-
- ath12k_dbg_dump(ab, ATH12K_DBG_DP_RX, NULL, "dp rx msdu: ",
- msdu->data, msdu->len);
rx_status = IEEE80211_SKB_RXCB(msdu);
*rx_status = *status;
- ieee80211_rx_napi(ath12k_pdev_dp_to_hw(dp_pdev), pubsta, msdu, napi);
+ ieee80211_rx_napi(ath12k_pdev_dp_to_hw(dp_pdev), NULL, msdu, napi);
}
EXPORT_SYMBOL(ath12k_dp_mon_rx_deliver_msdu);
--
2.34.1
More information about the ath12k
mailing list