Explorar el Código

qcacld-3.0: Allow SSR during driver resume

Allow SSR during driver resume. Assume firmware goes down during driver
is in suspend state. Avoid get into bad state and wmi access during driver
resume.

Change-Id: Ie1689e0b080f940666fbbb19c9f0e3b0fecfe564
CRs-Fixed: 2412130
hangtian hace 6 años
padre
commit
ee84dbeb33

+ 2 - 0
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -1017,6 +1017,7 @@ QDF_STATUS pmo_core_psoc_send_host_wakeup_ind_to_fw(
 		pmo_err("Pending commands %d credits %d",
 			pmo_tgt_psoc_get_pending_cmnds(psoc),
 			pmo_tgt_psoc_get_host_credits(psoc));
+		cds_set_driver_in_bad_state(true);
 		qdf_trigger_self_recovery();
 	} else {
 		pmo_debug("Host wakeup received");
@@ -1090,6 +1091,7 @@ QDF_STATUS pmo_core_psoc_resume_target(struct wlan_objmgr_psoc *psoc,
 		pmo_fatal("Pending commands %d credits %d",
 			pmo_tgt_psoc_get_pending_cmnds(psoc),
 			pmo_tgt_psoc_get_host_credits(psoc));
+		cds_set_driver_in_bad_state(true);
 		qdf_trigger_self_recovery();
 	} else {
 		pmo_debug("Host wakeup received");

+ 1 - 0
core/hdd/src/wlan_hdd_driver_ops.c

@@ -1626,6 +1626,7 @@ wlan_hdd_pld_uevent(struct device *dev, struct pld_uevent_data *event_data)
 {
 	switch (event_data->uevent) {
 	case PLD_FW_DOWN:
+	case PLD_FW_CRASHED:
 		hdd_info("Received firmware down indication");
 
 		/* NOTE! SSR cleanup logic goes in pld shutdown, not here */