41 lines
1.7 KiB
Diff
41 lines
1.7 KiB
Diff
From e56acee381a8e07edf1920fb58f3166f911b6e5c Mon Sep 17 00:00:00 2001
|
|
From: Lingbo Kong <quic_lingbok@quicinc.com>
|
|
Date: Wed, 26 Feb 2025 19:31:18 +0800
|
|
Subject: 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>
|
|
---
|
|
drivers/net/wireless/ath/ath12k/mac.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
|
@@ -9395,6 +9395,11 @@ ath12k_mac_op_unassign_vif_chanctx(struc
|
|
ar->num_started_vdevs == 1 && ar->monitor_vdev_created)
|
|
ath12k_mac_monitor_stop(ar);
|
|
|
|
+ if (ar->scan.arvif == arvif && ar->scan.state == ATH12K_SCAN_RUNNING) {
|
|
+ ath12k_scan_abort(ar);
|
|
+ ar->scan.arvif = NULL;
|
|
+ }
|
|
+
|
|
ath12k_mac_remove_link_interface(hw, arvif);
|
|
ath12k_mac_unassign_link_vif(arvif);
|
|
}
|