Ver código fonte

qcacld-3.0: Bypass firmware VDEV deletion during SSR

Since firmware has already asserted, VDEV deletion will timeout
finally which will result VDEV release failure in host driver.
Bypass it in SSR shutdown routine.

Change-Id: Ib9a4b8a4d49edf8178a1da8201f8a7c6931f487f
Yue Ma 8 anos atrás
pai
commit
f978284f35
1 arquivos alterados com 11 adições e 0 exclusões
  1. 11 0
      core/hdd/src/wlan_hdd_main.c

+ 11 - 0
core/hdd/src/wlan_hdd_main.c

@@ -2946,6 +2946,13 @@ int hdd_vdev_destroy(hdd_adapter_t *adapter)
 		return errno;
 	}
 
+	/*
+	 * In SSR case, there is no need to destroy vdev in firmware since
+	 * it has already asserted. vdev can be released directly.
+	 */
+	if (cds_is_driver_recovering())
+		goto release_vdev;
+
 	/* close sme session (destroy vdev in firmware via legacy API) */
 	INIT_COMPLETION(adapter->session_close_comp_var);
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
@@ -2968,6 +2975,7 @@ int hdd_vdev_destroy(hdd_adapter_t *adapter)
 		return -ETIMEDOUT;
 	}
 
+release_vdev:
 	/* now that sme session is closed, allow physical vdev destroy */
 	errno = hdd_objmgr_release_vdev(adapter);
 	if (errno) {
@@ -4166,6 +4174,9 @@ QDF_STATUS hdd_reset_all_adapters(hdd_context_t *hdd_ctx)
 			wlansap_set_invalid_session(
 				WLAN_HDD_GET_SAP_CTX_PTR(adapter));
 
+		/* Destroy vdev which will be recreated during reinit. */
+		hdd_vdev_destroy(adapter);
+
 		status = hdd_get_next_adapter(hdd_ctx, adapterNode, &pNext);
 		adapterNode = pNext;
 	}