From: P Praneesh Date: Thu, 5 Jun 2025 05:44:38 +0000 (+0530) Subject: wifi: ath12k: remove monitor handling from ath12k_dp_rx_deliver_msdu() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=359d69285adc4f4a6a4bdafac30f3bd917873bbc;p=thirdparty%2Flinux.git wifi: ath12k: remove monitor handling from ath12k_dp_rx_deliver_msdu() ath12k_dp_rx_deliver_msdu() currently includes logic related to monitor mode handling. This code was inherited from the ath11k driver, where a single rx handler was used for both regular and monitor mode packets. In ath12k, however, monitor mode packets are handled separately via ath12k_dp_mon_rx_deliver_msdu(), which contains all the necessary monitor-specific logic. Therefore, monitor-related checks and operations in ath12k_dp_rx_deliver_msdu() are no longer needed. Remove this dead code to simplify the rx path and avoid unnecessary per-packet checks. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: P Praneesh Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20250605054438.1855365-1-praneesh.p@oss.qualcomm.com Signed-off-by: Jeff Johnson --- diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c index 57648febc4a4f..420a9b161f4a2 100644 --- a/drivers/net/wireless/ath/ath12k/dp_rx.c +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c @@ -2533,31 +2533,15 @@ static void ath12k_dp_rx_deliver_msdu(struct ath12k *ar, struct napi_struct *nap struct ath12k_dp_rx_info *rx_info) { struct ath12k_base *ab = ar->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), - .data2 = cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_GI_KNOWN), - }; - struct ieee80211_radiotap_he *he; struct ieee80211_rx_status *rx_status; struct ieee80211_sta *pubsta; struct ath12k_peer *peer; struct ath12k_skb_rxcb *rxcb = ATH12K_SKB_RXCB(msdu); struct ieee80211_rx_status *status = rx_info->rx_status; - u8 decap = DP_RX_DECAP_TYPE_RAW; + u8 decap = rx_info->decap_type; bool is_mcbc = rxcb->is_mcbc; bool is_eapol = rxcb->is_eapol; - if (status->encoding == RX_ENC_HE && !(status->flag & RX_FLAG_RADIOTAP_HE) && - !(status->flag & RX_FLAG_SKIP_MONITOR)) { - he = skb_push(msdu, sizeof(known)); - memcpy(he, &known, sizeof(known)); - status->flag |= RX_FLAG_RADIOTAP_HE; - } - - if (!(status->flag & RX_FLAG_ONLY_MONITOR)) - decap = rx_info->decap_type; - spin_lock_bh(&ab->base_lock); peer = ath12k_dp_rx_h_find_peer(ab, msdu, rx_info);