aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
authorLingbo Kong <quic_lingbok@quicinc.com>2025-04-18 14:40:08 +0800
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>2025-05-16 12:38:54 -0700
commit1ab2e9046b4f3b298274ad4cc08ff456d3e4274e (patch)
tree3a71a767200b3cfce15fa5e81aac3eb66bb61050 /drivers/net
parent29cb3d26d01c275ea652010cc62f324793e34a31 (diff)
downloadath-1ab2e9046b4f3b298274ad4cc08ff456d3e4274e.tar.gz
wifi: ath12k: Abort scan before removing link interface to prevent duplicate deletion
Currently, when ath12k performs the remove link interface operation, if there is an ongoing scan operation on the arvif, ath12k may execute the remove link interface operation multiple times on the same arvif. This occurs because, during the remove link operation, if a scan operation is present on the arvif, ath12k may receive a WMI_SCAN_EVENT_COMPLETED event from the firmware. Upon receiving this event, ath12k will continue to execute the ath12k_scan_vdev_clean_work() function, performing the remove link interface operation on the same arvif again. To address this issue, before executing the remove link interface operation, ath12k needs to check if there is an ongoing scan operation on the current arvif. If such an operation exists, it should be aborted. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Signed-off-by: Lingbo Kong <quic_lingbok@quicinc.com> Tested-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com> Link: https://patch.msgid.link/20250418064008.7172-1-quic_lingbok@quicinc.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath12k/mac.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index af0164f088243..0fb4b7bc845b9 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -10305,6 +10305,11 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
reinit_completion(&ar->completed_11d_scan);
ar->state_11d = ATH12K_11D_PREPARING;
}
+
+ if (ar->scan.arvif == arvif && ar->scan.state == ATH12K_SCAN_RUNNING) {
+ ath12k_scan_abort(ar);
+ ar->scan.arvif = NULL;
+ }
}
static int