]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: Fix pdev lookup in WBM error processing
authorRameshkumar Sundaram <quic_ramess@quicinc.com>
Thu, 2 Jan 2025 04:30:48 +0000 (10:00 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Sun, 26 Jan 2025 18:41:28 +0000 (10:41 -0800)
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 <quic_ramess@quicinc.com>
Link: https://patch.msgid.link/20250102043048.2596791-1-quic_ramess@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/dp_rx.c

index 09e35dd757e067406def3a85b51ec96bfdf994cf..95c9056642cfdacc94cc613c53c7d7c6830142c4 100644 (file)
@@ -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;
                }