qcacld-3.0: Fix assert when netdev is going down

Move destruction of blocked_scan_request_q and related lock
from __hdd_netdev_notifier_call to hdd_close_adapter
for the former one might be invoked for more than once and
could cause issues.

Change-Id: Ifb62750a09a2dcca381217a41280ad943942ee35
CRs-Fixed: 2267481
Tento commit je obsažen v:
Min Liu
2018-06-25 18:08:54 +08:00
odevzdal nshrivas
rodič 1652836585
revize ef92ef599c

Zobrazit soubor

@@ -650,8 +650,6 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb,
cds_flush_work(&adapter->scan_block_work);
/* Need to clean up blocked scan request */
wlan_hdd_cfg80211_scan_block_cb(&adapter->scan_block_work);
qdf_list_destroy(&adapter->blocked_scan_request_q);
qdf_mutex_destroy(&adapter->blocked_scan_request_q_lock);
hdd_debug("Scan is not Pending from user");
/*
* After NETDEV_GOING_DOWN, kernel calls hdd_stop.Irrespective
@@ -4884,6 +4882,9 @@ QDF_STATUS hdd_close_adapter(struct hdd_context *hdd_ctx, struct hdd_adapter *ad
hdd_bus_bw_compute_timer_stop(hdd_ctx);
hdd_bus_bw_cancel_work(hdd_ctx);
qdf_list_destroy(&adapter->blocked_scan_request_q);
qdf_mutex_destroy(&adapter->blocked_scan_request_q_lock);
/* cleanup adapter */
policy_mgr_clear_concurrency_mode(hdd_ctx->hdd_psoc,
adapter->device_mode);