Browse Source

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
Yue Ma 9 years ago
parent
commit
cd9614433f

+ 3 - 1
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);

+ 4 - 1
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;

+ 0 - 2
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);