Explorar el Código

qcacld-3.0: Wait for scan event completion before scan abort from hdd

When hdd_abort_mac_scan_all_adapters is called from hdd_wlan_exit,
an event is posted from the host to the FW to abort active scans.
Once the response is received from the FW, scan callback function is
called and the current scan command is released from the active list.

Also, as part of csr_stop happening during WLAN exit, csr_cleanup_session
tries to release all the commands from the pending and active scan lists.
This happens in the context which triggers wlan_exit and not in sync with
mc_thread.

In a race condition, the release from csr_cleanup_session happens
while the mc_thread is trying to do csr_release_command_scan leading
to NULL pointer access.

In hdd_abort_mac_scan_all_adapters function, call wlan_abort_scan
with sync flag as true to wait for scan events to complete before
proceeding with purge

Change-Id: Idc5fb3d9bdb1b16b110526d2ee68b2a04192733e
CRs-Fixed: 2171190
Vignesh Viswanathan hace 7 años
padre
commit
19611c85fe
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      core/hdd/src/wlan_hdd_main.c

+ 1 - 1
core/hdd/src/wlan_hdd_main.c

@@ -5981,7 +5981,7 @@ QDF_STATUS hdd_abort_mac_scan_all_adapters(struct hdd_context *hdd_ctx)
 		    adapter->device_mode == QDF_P2P_GO_MODE) {
 			wlan_abort_scan(hdd_ctx->hdd_pdev, INVAL_PDEV_ID,
 					adapter->session_id, INVALID_SCAN_ID,
-					false);
+					true);
 		}
 	}