aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
diff options
context:
space:
mode:
authorDon Fry <donald.h.fry@intel.com>2012-03-15 16:27:06 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-09 16:37:49 -0400
commit47107e84446f4724d25c724493679cc50eeef53c (patch)
tree79995db57fc8d1d4e4a8ba07bfd29afb8df51bc7 /drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
parent17acd0b64e23d92013621dc2caa3042ce6769770 (diff)
iwlwifi: split POWER_PMI status bit
Move the POWER_PMI to the op_mode where it is changed. The trans needs to check it frequently, so shadow the status in the trans and update it in trans when it infrequently changes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-pcie.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
index b0b7107c85a4..52e218b2bd37 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
@@ -1518,6 +1518,16 @@ static void iwl_trans_pcie_free(struct iwl_trans *trans)
1518 kfree(trans); 1518 kfree(trans);
1519} 1519}
1520 1520
1521static void iwl_trans_pcie_set_pmi(struct iwl_trans *trans, bool state)
1522{
1523 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1524
1525 if (state)
1526 set_bit(STATUS_POWER_PMI, &trans_pcie->status);
1527 else
1528 clear_bit(STATUS_POWER_PMI, &trans_pcie->status);
1529}
1530
1521#ifdef CONFIG_PM_SLEEP 1531#ifdef CONFIG_PM_SLEEP
1522static int iwl_trans_pcie_suspend(struct iwl_trans *trans) 1532static int iwl_trans_pcie_suspend(struct iwl_trans *trans)
1523{ 1533{
@@ -2038,6 +2048,7 @@ const struct iwl_trans_ops trans_ops_pcie = {
2038 .write32 = iwl_trans_pcie_write32, 2048 .write32 = iwl_trans_pcie_write32,
2039 .read32 = iwl_trans_pcie_read32, 2049 .read32 = iwl_trans_pcie_read32,
2040 .configure = iwl_trans_pcie_configure, 2050 .configure = iwl_trans_pcie_configure,
2051 .set_pmi = iwl_trans_pcie_set_pmi,
2041}; 2052};
2042 2053
2043struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd, 2054struct iwl_trans *iwl_trans_pcie_alloc(struct iwl_shared *shrd,