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
This commit is contained in:

committed by
snandini

parent
480eeefd03
commit
19611c85fe
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user