diff options
| author | Wu Gao <wugao@codeaurora.org> | 2016-09-12 15:41:21 +0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-09-14 13:37:41 +0530 |
| commit | f49aeec4785177ac665d76ae431bcbcd303c409e (patch) | |
| tree | 046e524557f8c20c25bff7e1f57c129d8cd93ec4 | |
| parent | 79fe8291bf1e25753a8045e9ecc25c77175074ca (diff) | |
qcacld-2.0: Cleanup DFS CAC timer
Start SAP with DFS channel on default interface and create new AP
interface without any operation, then terminate SAP and rmmod WLAN
driver, DUT crash since it doesn't clean up sap_dfs_cac_timer.
Change-Id: Iffc1d9239c303c25067da2e2d30e37648a44e599
CRs-Fixed: 1051755
| -rw-r--r-- | CORE/SYS/legacy/src/system/src/macInitApi.c | 12 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_api.c | 11 |
2 files changed, 12 insertions, 11 deletions
diff --git a/CORE/SYS/legacy/src/system/src/macInitApi.c b/CORE/SYS/legacy/src/system/src/macInitApi.c index c8c42b55d098..3874d7c8446f 100644 --- a/CORE/SYS/legacy/src/system/src/macInitApi.c +++ b/CORE/SYS/legacy/src/system/src/macInitApi.c @@ -261,6 +261,18 @@ tSirRetStatus macClose(tHalHandle hHal) if (!pMac) return eHAL_STATUS_FAILURE; + /* + * CAC timer will be initiated and started only when SAP starts + * on DFS channel and it will be stopped and destroyed immediately + * once the radar detected or timedout. So as per design CAC timer + * should be destroyed after stop. + */ + if (pMac->sap.SapDfsInfo.is_dfs_cac_timer_running) { + vos_timer_stop(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer); + pMac->sap.SapDfsInfo.is_dfs_cac_timer_running = 0; + vos_timer_destroy(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer); + } + peClose(pMac); pMac->psOffloadEnabled = FALSE; diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c index 5e8450e13169..eb4b20f1f0e8 100644 --- a/CORE/VOSS/src/vos_api.c +++ b/CORE/VOSS/src/vos_api.c @@ -2101,7 +2101,6 @@ vos_fetch_tl_cfg_parms VOS_STATUS vos_shutdown(v_CONTEXT_t vosContext) { VOS_STATUS vosStatus; - tpAniSirGlobal pMac = (((pVosContextType)vosContext)->pMACContext); vosStatus = WLANTL_Close(vosContext); if (!VOS_IS_STATUS_SUCCESS(vosStatus)) @@ -2119,16 +2118,6 @@ VOS_STATUS vos_shutdown(v_CONTEXT_t vosContext) VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) ); } - /* CAC timer will be initiated and started only when SAP starts on - * DFS channel and it will be stopped and destroyed immediately once the - * radar detected or timedout. So as per design CAC timer should be - * destroyed after stop.*/ - if (pMac->sap.SapDfsInfo.is_dfs_cac_timer_running) { - vos_timer_stop(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer); - pMac->sap.SapDfsInfo.is_dfs_cac_timer_running = 0; - vos_timer_destroy(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer); - } - vosStatus = macClose( ((pVosContextType)vosContext)->pMACContext); if (!VOS_IS_STATUS_SUCCESS(vosStatus)) { |
