From: Rameshkumar Sundaram Date: Thu, 2 Jan 2025 04:30:48 +0000 (+0530) Subject: wifi: ath12k: Fix pdev lookup in WBM error processing X-Git-Tag: v6.15-rc1~160^2~20^2~87^2~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e635b81db9d69bbb836afae8cb402978ff966a4;p=thirdparty%2Fkernel%2Fstable.git wifi: ath12k: Fix pdev lookup in WBM error processing Currently in ath12k_dp_rx_process_wbm_err(), when processing packets received on the WBM error ring, pdev validation is done based upon the hw_link_id. But hw_link_id corresponds to link id of a given partner pdev in a MLO hardware group, and is not the correct index to use to lookup a pdev in an SoC(ab). As a result, pdev validation fails, and the reaped packets are dropped instead of being processed. The correct index to use is the pdev_id, which is already derived in the function. So update the logic to validate the pdev based upon the pdev_id instead of the hw_link_id. This matches the logic used in other Rx ring processing functions. 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 Fixes: 1a73acb5fba4 ("wifi: ath12k: move to HW link id based receive handling") Signed-off-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20250102043048.2596791-1-quic_ramess@quicinc.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 09e35dd757e06..95c9056642cfd 100644 --- a/drivers/net/wireless/ath/ath12k/dp_rx.c +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c @@ -4050,7 +4050,7 @@ int ath12k_dp_rx_process_wbm_err(struct ath12k_base *ab, hw_links[hw_link_id].pdev_idx); ar = partner_ab->pdevs[pdev_id].ar; - if (!ar || !rcu_dereference(ar->ab->pdevs_active[hw_link_id])) { + if (!ar || !rcu_dereference(ar->ab->pdevs_active[pdev_id])) { dev_kfree_skb_any(msdu); continue; }