From 115e811d64cbcf443a7b7fd40e109131011648b2 Mon Sep 17 00:00:00 2001 From: Ryan Hsu Date: Mon, 6 Apr 2015 12:02:47 -0700 Subject: qcacld: hdd: fix the incorrect sap dfs ref count checking In the case of hdd_hostapd_channel_prevent_suspend() is called twice for old channel and new channel, the sap_dfs_ref_cnt would be imbalance and then the wifi driver would hold the wake-lock that never be able to release. Change-Id: Iad68e116c8a098faa47d4f3552134f92aca92d91 CRs-fixed: 818303 --- CORE/HDD/src/wlan_hdd_hostapd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index 11583c8c837c..464af7e94b97 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -200,7 +200,7 @@ void hdd_hostapd_channel_prevent_suspend(hdd_adapter_t *pAdapter, /* Return if BSS is already started && wakelock is acquired */ if ((pHostapdState->bssState == BSS_START) && - (atomic_read(&pHddCtx->sap_dfs_ref_cnt) > 1)) + (atomic_read(&pHddCtx->sap_dfs_ref_cnt) >= 1)) return; /* Acquire wakelock if we have at least one DFS channel in use */ -- cgit v1.2.3