From: Avinash Patil Date: Sat, 23 Mar 2013 04:49:06 +0000 (-0700) Subject: mwifiex: avoid waking up device in awake state X-Git-Tag: v3.10-rc2~34^2~21^2^2~216 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c24d992ab6b6f067f78585b723fa0c95b3a9c8bf;p=profile%2Fcommon%2Fkernel-common.git mwifiex: avoid waking up device in awake state 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 Signed-off-by: Bing Zhao Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index e62cd8a..ed1bca7 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c @@ -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; } } }