mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacld-3.0: Prevent wlan suspend if conn in progress
Currently the driver does not check if the state is key exchange in progress and suspends wlan before set-key happens which further results in FW also in wake up state. This would result in delayed EAP exchange, and also in power loss. Scenario:- 1. Turn on STA and try to connect to enterprise network 2. Turn off display. Here the display turn off would trigger APPS suspend while the STA is trying to connect, and authenticate and since there is no check in driver to prevent suspend in set key in progress state, it would result in a FW assert, as the expectation of FW is to allow suspend only after set key has been done. Fix is to prevent WLAN-suspend in case of connection in progress, and allow suspend only in connected and authenticated state. Change-Id: Ic173116f7ba424005d938a43c75831a6a4dc874c CRs-Fixed: 2512866
This commit is contained in:
parent
bf14ba81a9
commit
e5724cc36e
1 changed files with 6 additions and 14 deletions
|
|
@ -1806,23 +1806,15 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
|
|||
ucfg_p2p_cleanup_tx_by_psoc(hdd_ctx->psoc);
|
||||
ucfg_p2p_cleanup_roc_by_psoc(hdd_ctx->psoc);
|
||||
|
||||
/* Stop ongoing scan on each interface */
|
||||
hdd_for_each_adapter(hdd_ctx, adapter) {
|
||||
if (sme_neighbor_middle_of_roaming(mac_handle,
|
||||
adapter->vdev_id) ||
|
||||
hdd_is_roaming_in_progress(hdd_ctx)) {
|
||||
hdd_err("Roaming in progress, do not allow suspend");
|
||||
wlan_hdd_inc_suspend_stats(hdd_ctx,
|
||||
SUSPEND_FAIL_ROAM);
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID,
|
||||
adapter->vdev_id, INVALID_SCAN_ID, false);
|
||||
if (hdd_is_connection_in_progress(NULL, NULL)) {
|
||||
hdd_err_rl("Connection is in progress, rejecting suspend");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* flush any pending powersave timers */
|
||||
/* abort ongoing scan and flush any pending powersave timers */
|
||||
hdd_for_each_adapter(hdd_ctx, adapter) {
|
||||
wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID,
|
||||
adapter->vdev_id, INVALID_SCAN_ID, false);
|
||||
if (wlan_hdd_validate_vdev_id(adapter->vdev_id))
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue