From cd9614433f640e41326bfcc4989447257dd9a0ff Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Tue, 20 Oct 2015 16:15:31 -0700 Subject: [PATCH] qcacld-3.0: Fix several SSR related issues qcacld-2.0 to qcacld-3.0 propagation - Kill wlan_tasklet before freeing TLshim free queue. This can avoid race condition between SSR and wlan_tasklet which is still processing Rx packets in the case of self-recovery when FW doesn't really crash. - In additional to connected state, add disconnected/disconnecting states to send notification to supplicant for re-issuing connect after SSR. This is to avoid corner cases that while FW crashes, disconnection is happening or disconnection fails because of FW crash, the HDD state is changed from connected to disconnecting/disconnected. Change-Id: I8ff295a443e946e8775354dcf4331ad024776cb7 CRs-fixed: 899479 --- core/hdd/src/wlan_hdd_driver_ops.c | 4 +++- core/hdd/src/wlan_hdd_main.c | 5 ++++- core/hdd/src/wlan_hdd_power.c | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index d8a1f67364ce..ff39296ee733 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -228,8 +228,10 @@ static void wlan_hdd_shutdown(void) hddLog(LOGE, FL("Host is not ready for SSR, attempting anyway")); - if (!WLAN_IS_EPPING_ENABLED(cds_get_conparam())) + if (!WLAN_IS_EPPING_ENABLED(cds_get_conparam())) { + hif_disable_isr(hif_ctx); hdd_wlan_shutdown(); + } hif_disable(hif_ctx, HIF_DISABLE_TYPE_SHUTDOWN); hif_close(hif_ctx); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 64a72991cde3..68b9a8a26b7a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2967,7 +2967,10 @@ CDF_STATUS hdd_start_all_adapters(hdd_context_t *hdd_ctx) /* Indicate disconnect event to supplicant if associated previously */ if (eConnectionState_Associated == connState || - eConnectionState_IbssConnected == connState) { + eConnectionState_IbssConnected == connState || + eConnectionState_NotConnected == connState || + eConnectionState_IbssDisconnected == connState || + eConnectionState_Disconnecting == connState) { union iwreq_data wrqu; memset(&wrqu, '\0', sizeof(wrqu)); wrqu.ap_addr.sa_family = ARPHRD_ETHER; diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index d7662e817147..cc5679ae3ba2 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1380,8 +1380,6 @@ CDF_STATUS hdd_wlan_shutdown(void) CDF_ASSERT(0); } - hif_disable_isr(((cds_context_type *) p_cds_context)->pHIFContext); - hddLog(CDF_TRACE_LEVEL_INFO, "%s: Flush Queues", __func__); /* Clean up message queues of TX, RX and MC thread */ cds_sched_flush_mc_mqs(cds_sched_context);