aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2013-03-22 21:49:06 -0700
committerJohn W. Linville <linville@tuxdriver.com>2013-03-27 13:37:32 -0400
commitc24d992ab6b6f067f78585b723fa0c95b3a9c8bf (patch)
tree9317d5f87d56f31bbf2e92dd1abbb0dfa21165a6
parentb2fda1f6662681dc854ac902249a89d210cd5583 (diff)
downloadbluetooth-next-c24d992ab6b6f067f78585b723fa0c95b3a9c8bf.tar.gz
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 <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/mwifiex/pcie.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index e62cd8a188980b..ed1bca7af84a5c 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;
}
}
}