[PATCH ath-next] wifi: ath12k: Remove the unused argument from the Rx data path
Baochen Qiang
baochen.qiang at oss.qualcomm.com
Sun Mar 1 17:33:13 PST 2026
On 2/27/2026 12:21 PM, Karthikeyan Periyasamy wrote:
> Currently, the Rx path uses new infrastructure to extract the required HAL
> parameters. Consequently, the HAL Rx descriptor argument is no longer
> needed in the following helper functions. Remove the unused argument from
> the following helper functions.
>
> ath12k_dp_rx_h_undecap()
> ath12k_dp_rx_check_nwifi_hdr_len_valid()
> ath12k_wifi7_dp_rx_h_mpdu()
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Karthikeyan Periyasamy <karthikeyan.periyasamy at oss.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath12k/dp_rx.c | 2 --
> drivers/net/wireless/ath/ath12k/dp_rx.h | 2 --
> drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c | 25 ++++++++-----------
> 3 files changed, 11 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
> index a32ee9f8061a..c0e2b2c1a292 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
> @@ -1117,7 +1117,6 @@ static void ath12k_dp_rx_h_undecap_eth(struct ath12k_pdev_dp *dp_pdev,
> }
>
> void ath12k_dp_rx_h_undecap(struct ath12k_pdev_dp *dp_pdev, struct sk_buff *msdu,
> - struct hal_rx_desc *rx_desc,
> enum hal_encrypt_type enctype,
> bool decrypted,
> struct hal_rx_desc_data *rx_info)
> @@ -1393,7 +1392,6 @@ void ath12k_dp_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev, struct napi_struc
> EXPORT_SYMBOL(ath12k_dp_rx_deliver_msdu);
>
> bool ath12k_dp_rx_check_nwifi_hdr_len_valid(struct ath12k_dp *dp,
> - struct hal_rx_desc *rx_desc,
> struct sk_buff *msdu,
> struct hal_rx_desc_data *rx_info)
> {
> diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.h b/drivers/net/wireless/ath/ath12k/dp_rx.h
> index 1ec5382f5995..bd62af0c80d4 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_rx.h
> +++ b/drivers/net/wireless/ath/ath12k/dp_rx.h
> @@ -189,7 +189,6 @@ void ath12k_dp_extract_rx_desc_data(struct ath12k_hal *hal,
> }
>
> void ath12k_dp_rx_h_undecap(struct ath12k_pdev_dp *dp_pdev, struct sk_buff *msdu,
> - struct hal_rx_desc *rx_desc,
> enum hal_encrypt_type enctype,
> bool decrypted,
> struct hal_rx_desc_data *rx_info);
> @@ -197,7 +196,6 @@ void ath12k_dp_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev, struct napi_struc
> struct sk_buff *msdu,
> struct hal_rx_desc_data *rx_info);
> bool ath12k_dp_rx_check_nwifi_hdr_len_valid(struct ath12k_dp *dp,
> - struct hal_rx_desc *rx_desc,
> struct sk_buff *msdu,
> struct hal_rx_desc_data *rx_info);
> u64 ath12k_dp_rx_h_get_pn(struct ath12k_dp *dp, struct sk_buff *skb);
> diff --git a/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c b/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c
> index 7450938adf65..77a1679b41df 100644
> --- a/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath12k/wifi7/dp_rx.c
> @@ -325,7 +325,6 @@ static void ath12k_wifi7_dp_rx_h_csum_offload(struct sk_buff *msdu,
>
> static void ath12k_wifi7_dp_rx_h_mpdu(struct ath12k_pdev_dp *dp_pdev,
> struct sk_buff *msdu,
> - struct hal_rx_desc *rx_desc,
> struct hal_rx_desc_data *rx_info)
> {
> struct ath12k_skb_rxcb *rxcb;
> @@ -388,8 +387,7 @@ static void ath12k_wifi7_dp_rx_h_mpdu(struct ath12k_pdev_dp *dp_pdev,
> }
>
> ath12k_wifi7_dp_rx_h_csum_offload(msdu, rx_info);
> - ath12k_dp_rx_h_undecap(dp_pdev, msdu, rx_desc,
> - enctype, is_decrypted, rx_info);
> + ath12k_dp_rx_h_undecap(dp_pdev, msdu, enctype, is_decrypted, rx_info);
>
> if (!is_decrypted || rx_info->is_mcbc)
> return;
> @@ -549,14 +547,14 @@ static int ath12k_wifi7_dp_rx_process_msdu(struct ath12k_pdev_dp *dp_pdev,
> }
> }
>
> - if (unlikely(!ath12k_dp_rx_check_nwifi_hdr_len_valid(dp, rx_desc, msdu,
> + if (unlikely(!ath12k_dp_rx_check_nwifi_hdr_len_valid(dp, msdu,
> rx_info))) {
> ret = -EINVAL;
> goto free_out;
> }
>
> ath12k_dp_rx_h_ppdu(dp_pdev, rx_info);
> - ath12k_wifi7_dp_rx_h_mpdu(dp_pdev, msdu, rx_desc, rx_info);
> + ath12k_wifi7_dp_rx_h_mpdu(dp_pdev, msdu, rx_info);
>
> rx_info->rx_status->flag |= RX_FLAG_SKIP_MONITOR | RX_FLAG_DUP_VALIDATED;
>
> @@ -1030,13 +1028,13 @@ static int ath12k_wifi7_dp_rx_h_verify_tkip_mic(struct ath12k_pdev_dp *dp_pdev,
> RX_FLAG_IV_STRIPPED | RX_FLAG_DECRYPTED;
> skb_pull(msdu, hal_rx_desc_sz);
>
> - if (unlikely(!ath12k_dp_rx_check_nwifi_hdr_len_valid(dp, rx_desc, msdu,
> + if (unlikely(!ath12k_dp_rx_check_nwifi_hdr_len_valid(dp, msdu,
> rx_info)))
> return -EINVAL;
>
> ath12k_dp_rx_h_ppdu(dp_pdev, rx_info);
> - ath12k_dp_rx_h_undecap(dp_pdev, msdu, rx_desc,
> - HAL_ENCRYPT_TYPE_TKIP_MIC, true, rx_info);
> + ath12k_dp_rx_h_undecap(dp_pdev, msdu, HAL_ENCRYPT_TYPE_TKIP_MIC, true,
> + rx_info);
> ieee80211_rx(ath12k_pdev_dp_to_hw(dp_pdev), msdu);
> return -EINVAL;
> }
> @@ -1588,7 +1586,6 @@ static int ath12k_wifi7_dp_rx_h_null_q_desc(struct ath12k_pdev_dp *dp_pdev,
> struct ath12k_dp *dp = dp_pdev->dp;
> struct ath12k_base *ab = dp->ab;
> u16 msdu_len = rx_info->msdu_len;
> - struct hal_rx_desc *desc = (struct hal_rx_desc *)msdu->data;
> u8 l3pad_bytes = rx_info->l3_pad_bytes;
> struct ath12k_skb_rxcb *rxcb = ATH12K_SKB_RXCB(msdu);
> u32 hal_rx_desc_sz = dp->ab->hal.hal_desc_sz;
> @@ -1632,11 +1629,11 @@ static int ath12k_wifi7_dp_rx_h_null_q_desc(struct ath12k_pdev_dp *dp_pdev,
> skb_put(msdu, hal_rx_desc_sz + l3pad_bytes + msdu_len);
> skb_pull(msdu, hal_rx_desc_sz + l3pad_bytes);
> }
> - if (unlikely(!ath12k_dp_rx_check_nwifi_hdr_len_valid(dp, desc, msdu, rx_info)))
> + if (unlikely(!ath12k_dp_rx_check_nwifi_hdr_len_valid(dp, msdu, rx_info)))
> return -EINVAL;
>
> ath12k_dp_rx_h_ppdu(dp_pdev, rx_info);
> - ath12k_wifi7_dp_rx_h_mpdu(dp_pdev, msdu, desc, rx_info);
> + ath12k_wifi7_dp_rx_h_mpdu(dp_pdev, msdu, rx_info);
>
> rxcb->tid = rx_info->tid;
>
> @@ -1673,7 +1670,7 @@ static bool ath12k_wifi7_dp_rx_h_tkip_mic_err(struct ath12k_pdev_dp *dp_pdev,
> skb_put(msdu, hal_rx_desc_sz + l3pad_bytes + msdu_len);
> skb_pull(msdu, hal_rx_desc_sz + l3pad_bytes);
>
> - if (unlikely(!ath12k_dp_rx_check_nwifi_hdr_len_valid(dp, desc, msdu, rx_info)))
> + if (unlikely(!ath12k_dp_rx_check_nwifi_hdr_len_valid(dp, msdu, rx_info)))
> return true;
>
> ath12k_dp_rx_h_ppdu(dp_pdev, rx_info);
> @@ -1681,8 +1678,8 @@ static bool ath12k_wifi7_dp_rx_h_tkip_mic_err(struct ath12k_pdev_dp *dp_pdev,
> rx_info->rx_status->flag |= (RX_FLAG_MMIC_STRIPPED | RX_FLAG_MMIC_ERROR |
> RX_FLAG_DECRYPTED);
>
> - ath12k_dp_rx_h_undecap(dp_pdev, msdu, desc,
> - HAL_ENCRYPT_TYPE_TKIP_MIC, false, rx_info);
> + ath12k_dp_rx_h_undecap(dp_pdev, msdu, HAL_ENCRYPT_TYPE_TKIP_MIC, false,
> + rx_info);
> return false;
> }
>
>
> base-commit: ff49eba595df500e4ddccc593088c8a4ab5f2c27
Reviewed-by: Baochen Qiang <baochen.qiang at oss.qualcomm.com>
More information about the ath12k
mailing list