summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKabilan Kannan <kabilank@codeaurora.org>2017-01-22 05:00:26 -0800
committerqcabuildsw <qcabuildsw@localhost>2017-01-24 02:07:30 -0800
commit68ae17f289608a90f4c07eb11457fafc98d6dc74 (patch)
treeb516f9c4b1eb65738f445378a1388d200dfcd68c
parent64cda6e89d8fa2336f588914e431cd19f39b3456 (diff)
qcacld-3.0: Fix the driver unload crash in TDLS
TDLS tries to stop uninitialized peer idle timers during driver unload operation, which causes dmesg overflow and watchdog bite in the system. Check the peer idle timers initialization status before processing the cleanup operation. Change-Id: Iecc8d91843ae3954c9aa98c1beca35cd6142b6fc CRs-Fixed: 1114926
-rw-r--r--core/hdd/src/wlan_hdd_tdls.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index adaf0a013ab3..f70775042ce1 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -905,10 +905,13 @@ static void wlan_hdd_tdls_peer_idle_timers_destroy(tdlsCtx_t *hdd_tdls_ctx)
head = &hdd_tdls_ctx->peer_list[i];
list_for_each(pos, head) {
curr_peer = list_entry(pos, hddTdlsPeer_t, node);
- hdd_info(MAC_ADDRESS_STR ": destroy idle timer",
+ if (curr_peer != NULL &&
+ curr_peer->is_peer_idle_timer_initialised) {
+ hdd_info(MAC_ADDRESS_STR ": destroy idle timer",
MAC_ADDR_ARRAY(curr_peer->peerMac));
- qdf_mc_timer_stop(&curr_peer->peer_idle_timer);
- qdf_mc_timer_destroy(&curr_peer->peer_idle_timer);
+ qdf_mc_timer_stop(&curr_peer->peer_idle_timer);
+ qdf_mc_timer_destroy(&curr_peer->peer_idle_timer);
+ }
}
}
}