qcacld-3.0: Fix flush uninitialized delay_work crash

With TDLS enabled and CONVERGED_TDLS_ENABLE defined, wlan_hdd_tdls_init()
will be bypassed by tdls_umac_comp_active flag.
While, in wlan_hdd_tdls_exit(), similar check missed, which causes
uninitialized delay_work be flushed. This leads to final crash.

Check tdls_umac_comp_active flag in begining of wlan_hdd_tdls_exit()
to avoid crash.

CRs-Fixed: 2087653
Change-Id: I0d9458683f092456e54ccf42988d4f8534922947
This commit is contained in:
Lin Bai 2017-08-04 16:25:48 +08:00 • committed by snandini
commit 28a4ca04e9

View file

@ -712,7 +712,7 @@ void hdd_tdls_context_init(hdd_context_t *hdd_ctx, bool ssr)
if (!ssr)
hdd_ctx->tdls_external_peer_count = 0;
/* This flag will set be true, only when device operates in
/* This flag will set be true, only when device operates in
* standalone STA mode
*/
hdd_ctx->enable_tdls_connection_tracker = false;
@ -882,6 +882,9 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
return;
}
if (pHddCtx->tdls_umac_comp_active)
return;
if (!test_bit(TDLS_INIT_DONE, &pAdapter->event_flags)) {
hdd_info("TDLS init was not done, exit");
return;