Browse Source

qcacld-3.0: cleanup dfs cac timer for p2pgo in SSR

There is possible dfs cac timer start on p2pgo,
then ssr happens, which cause timer leak.

Clean up dfs cac timer when stop adapter.

Change-Id: I8fe67420196ac752941476312caa7a80f2b3e264
CRs-Fixed: 2720896
Jingxiang Ge 4 years ago
parent
commit
ea468c6c52
1 changed files with 3 additions and 1 deletions
  1. 3 1
      core/hdd/src/wlan_hdd_main.c

+ 3 - 1
core/hdd/src/wlan_hdd_main.c

@@ -6735,11 +6735,13 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
 		if (!wlan_sap_is_pre_cac_context(sap_ctx) &&
 		    (hdd_ctx->sap_pre_cac_work.fn))
 			cds_flush_work(&hdd_ctx->sap_pre_cac_work);
-		wlansap_cleanup_cac_timer(sap_ctx);
 
 		/* fallthrough */
 
 	case QDF_P2P_GO_MODE:
+		sap_ctx = WLAN_HDD_GET_SAP_CTX_PTR(adapter);
+		wlansap_cleanup_cac_timer(sap_ctx);
+
 		cds_flush_work(&adapter->sap_stop_bss_work);
 		if (qdf_atomic_read(&adapter->session.ap.acs_in_progress)) {
 			hdd_info("ACS in progress, wait for complete");