wifi: ath12k: Refactor the monitor Rx parser handler argument
authorKarthikeyan Periyasamy <quic_periyasa@quicinc.com>
Tue, 24 Dec 2024 14:36:11 +0000 (20:06 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Fri, 17 Jan 2025 23:39:22 +0000 (15:39 -0800)
Currently, the monitor Rx parser handlers
ath12k_dp_mon_rx_parse_status_tlv() and ath12k_dp_mon_parse_rx_dest()
take the device handle from the caller. However, these handlers
functionality is technically pdev specific. Additionally, the device handle
can be retrieved from the pdev handle. Therefore, for better code
understanding, change the monitor Rx parser handlers argument from the
device handle to the pdev handle.

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: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241224143613.164921-2-quic_periyasa@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/dp_mon.c

index 5a21961cfd4655233f1edba2ff1a0ece6170ab39..85ff89b91624b3986b58c4fa8ac5e463b6c88592 100644 (file)
@@ -563,11 +563,12 @@ static void ath12k_dp_mon_parse_he_sig_su(const struct hal_rx_he_sig_a_su_info *
 }
 
 static enum hal_rx_mon_status
-ath12k_dp_mon_rx_parse_status_tlv(struct ath12k_base *ab,
+ath12k_dp_mon_rx_parse_status_tlv(struct ath12k *ar,
                                  struct ath12k_mon_data *pmon,
                                  u32 tlv_tag, const void *tlv_data,
                                  u32 userid)
 {
+       struct ath12k_base *ab = ar->ab;
        struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
        u32 info[7];
 
@@ -1180,7 +1181,7 @@ mon_deliver_fail:
 }
 
 static enum hal_rx_mon_status
-ath12k_dp_mon_parse_rx_dest(struct ath12k_base *ab, struct ath12k_mon_data *pmon,
+ath12k_dp_mon_parse_rx_dest(struct ath12k *ar, struct ath12k_mon_data *pmon,
                            struct sk_buff *skb)
 {
        struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
@@ -1208,7 +1209,7 @@ ath12k_dp_mon_parse_rx_dest(struct ath12k_base *ab, struct ath12k_mon_data *pmon
                if (tlv_tag == HAL_RX_PPDU_END)
                        tlv_len = sizeof(struct hal_rx_rxpcu_classification_overview);
 
-               hal_status = ath12k_dp_mon_rx_parse_status_tlv(ab, pmon,
+               hal_status = ath12k_dp_mon_rx_parse_status_tlv(ar, pmon,
                                                               tlv_tag, ptr, tlv_userid);
                ptr += tlv_len;
                ptr = PTR_ALIGN(ptr, HAL_TLV_64_ALIGN);
@@ -1228,14 +1229,13 @@ ath12k_dp_mon_rx_parse_mon_status(struct ath12k *ar,
                                  struct sk_buff *skb,
                                  struct napi_struct *napi)
 {
-       struct ath12k_base *ab = ar->ab;
        struct hal_rx_mon_ppdu_info *ppdu_info = &pmon->mon_ppdu_info;
        struct dp_mon_mpdu *tmp;
        struct dp_mon_mpdu *mon_mpdu = pmon->mon_mpdu;
        struct sk_buff *head_msdu, *tail_msdu;
        enum hal_rx_mon_status hal_status = HAL_RX_MON_STATUS_BUF_DONE;
 
-       ath12k_dp_mon_parse_rx_dest(ab, pmon, skb);
+       ath12k_dp_mon_parse_rx_dest(ar, pmon, skb);
 
        list_for_each_entry_safe(mon_mpdu, tmp, &pmon->dp_rx_mon_mpdu_list, list) {
                list_del(&mon_mpdu->list);
@@ -2477,7 +2477,7 @@ int ath12k_dp_mon_rx_process_stats(struct ath12k *ar, int mac_id,
 
                for (i = 0; i < dest_idx; i++) {
                        skb = pmon->dest_skb_q[i];
-                       hal_status = ath12k_dp_mon_parse_rx_dest(ab, pmon, skb);
+                       hal_status = ath12k_dp_mon_parse_rx_dest(ar, pmon, skb);
 
                        if (ppdu_info->peer_id == HAL_INVALID_PEERID ||
                            hal_status != HAL_RX_MON_STATUS_PPDU_DONE) {