Commit 67120768 authored by Shengzhen Li's avatar Shengzhen Li Committed by Kalle Valo

mwifiex: complete blocked power save handshake in main process

Power save handshake with firmware might be blocked by on-going
data transfer.
this patch check the PS status in main process and complete
previous blocked PS handshake.
this patch also remove redudant check before call
mwifiex_check_ps_cond function.
Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
Signed-off-by: default avatarShengzhen Li <szli@marvell.com>
Tested-by: default avatarXinming Hu <huxm@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent eb2428fb
...@@ -308,6 +308,9 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter) ...@@ -308,6 +308,9 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
/* We have tried to wakeup the card already */ /* We have tried to wakeup the card already */
if (adapter->pm_wakeup_fw_try) if (adapter->pm_wakeup_fw_try)
break; break;
if (adapter->ps_state == PS_STATE_PRE_SLEEP)
mwifiex_check_ps_cond(adapter);
if (adapter->ps_state != PS_STATE_AWAKE) if (adapter->ps_state != PS_STATE_AWAKE)
break; break;
if (adapter->tx_lock_flag) { if (adapter->tx_lock_flag) {
...@@ -355,10 +358,8 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter) ...@@ -355,10 +358,8 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
/* Check if we need to confirm Sleep Request /* Check if we need to confirm Sleep Request
received previously */ received previously */
if (adapter->ps_state == PS_STATE_PRE_SLEEP) { if (adapter->ps_state == PS_STATE_PRE_SLEEP)
if (!adapter->cmd_sent && !adapter->curr_cmd) mwifiex_check_ps_cond(adapter);
mwifiex_check_ps_cond(adapter);
}
/* * The ps_state may have been changed during processing of /* * The ps_state may have been changed during processing of
* Sleep Request event. * Sleep Request event.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment