diff options
| author | Liangwei Dong <liangwei@codeaurora.org> | 2016-10-11 00:24:26 -0400 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-19 17:42:24 -0700 |
| commit | 5047d513abd1fa7952c093c24e6fa8bfecab9891 (patch) | |
| tree | a4c94a6727e9912c5fcfa1f969f27a01586e61c6 | |
| parent | 4f2dedec3f4a14d491ea2b3041d4127552e7428c (diff) | |
qcacld-3.0: fix wlan suspend fail after switch to non-dfs channel
qcacld-2.0 to qcacld-3.0 propagation
In SAP DFS test, DUT can't goto suspend if SAP started
on DFS channel and later switched to non-dfs channel due to
Radar detected.
During SAP Starting, driver will acquire the wake lock
for dfs channel by hdd_hostapd_channel_prevent_suspend
in the eSAP_CHANNEL_CHANGE_EVENT event handler. But the SAP
is still in STOPPED state. We acquire the wake lock again
after SAP started in eSAP_START_BSS_EVENT event handler.
This causes driver to acquire wake lock twice for the
same dfs channel. And finally causes the device can't
suspend normally.
This change add check in eSAP_CHANNEL_CHANGE_EVENT
handler to only call hdd_hostapd_channel_prevent_suspend
when SAP is in started state to avoid lock/unlock mismatch.
Change-Id: Ief90697b7b6f19f6fcf0ab94f973a37e74ca3366
CRs-Fixed: 972657
| -rw-r--r-- | core/hdd/src/wlan_hdd_hostapd.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 7b37910d138b..3ec30f4352bb 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1810,12 +1810,14 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, case eSAP_CHANNEL_CHANGE_EVENT: hdd_notice("Received eSAP_CHANNEL_CHANGE_EVENT event"); - /* Prevent suspend for new channel */ - hdd_hostapd_channel_prevent_suspend(pHostapdAdapter, - pSapEvent->sapevt.sap_ch_selected.pri_ch); - /* Allow suspend for old channel */ - hdd_hostapd_channel_allow_suspend(pHostapdAdapter, - pHddApCtx->operatingChannel); + if (pHostapdState->bssState != BSS_STOP) { + /* Prevent suspend for new channel */ + hdd_hostapd_channel_prevent_suspend(pHostapdAdapter, + pSapEvent->sapevt.sap_ch_selected.pri_ch); + /* Allow suspend for old channel */ + hdd_hostapd_channel_allow_suspend(pHostapdAdapter, + pHddApCtx->operatingChannel); + } /* SME/PE is already updated for new operation channel. So update * HDD layer also here. This resolves issue in AP-AP mode where * AP1 channel is changed due to RADAR then CAC is going on and |
