Skip to content

Commit

Permalink
mwifiex: avoid waking up device in awake state
Browse files Browse the repository at this point in the history
We have received interrupt from device means FW is not sleeping.
In this case make sure wakeup handler for PCIe is not invoked by
setting adapter->pm_wakeup_fw_try to false.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Avinash Patil authored and John W. Linville committed Mar 27, 2013
1 parent b2fda1f commit c24d992
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/wireless/mwifiex/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1983,12 +1983,13 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
}
}
} else if (!adapter->pps_uapsd_mode &&
adapter->ps_state == PS_STATE_SLEEP) {
adapter->ps_state == PS_STATE_SLEEP &&
mwifiex_pcie_ok_to_access_hw(adapter)) {
/* Potentially for PCIe we could get other
* interrupts like shared. Don't change power
* state until cookie is set */
if (mwifiex_pcie_ok_to_access_hw(adapter))
adapter->ps_state = PS_STATE_AWAKE;
adapter->ps_state = PS_STATE_AWAKE;
adapter->pm_wakeup_fw_try = false;
}
}
}
Expand Down

0 comments on commit c24d992

Please sign in to comment.