Skip to content

Commit

Permalink
mwifiex: complete blocked power save handshake in main process
Browse files Browse the repository at this point in the history
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: Cathy Luo <cluo@marvell.com>
Signed-off-by: Shengzhen Li <szli@marvell.com>
Tested-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Shengzhen Li authored and Kalle Valo committed Nov 19, 2016
1 parent eb2428f commit 6712076
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/net/wireless/marvell/mwifiex/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
/* We have tried to wakeup the card already */
if (adapter->pm_wakeup_fw_try)
break;
if (adapter->ps_state == PS_STATE_PRE_SLEEP)
mwifiex_check_ps_cond(adapter);

if (adapter->ps_state != PS_STATE_AWAKE)
break;
if (adapter->tx_lock_flag) {
Expand Down Expand Up @@ -355,10 +358,8 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)

/* Check if we need to confirm Sleep Request
received previously */
if (adapter->ps_state == PS_STATE_PRE_SLEEP) {
if (!adapter->cmd_sent && !adapter->curr_cmd)
mwifiex_check_ps_cond(adapter);
}
if (adapter->ps_state == PS_STATE_PRE_SLEEP)
mwifiex_check_ps_cond(adapter);

/* * The ps_state may have been changed during processing of
* Sleep Request event.
Expand Down

0 comments on commit 6712076

Please sign in to comment.