summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-07-30 20:10:46 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-08-06 10:31:05 +0200
commiteeb89ab1f081a62bee1695d82442996b99a5b2b3 (patch)
tree2475208730470b10afefa64b265a3841e393ec89 /drivers
parent3848ab66827bddd7eb760c58dec909f0af1c00a5 (diff)
downloadlinux-eeb89ab1f081a62bee1695d82442996b99a5b2b3.tar.bz2
iwlwifi: pcie: fix resume when no opmode is present
If no opmode is present during suspend/resume (i.e. if the iwldvm or iwlmvm isn't loaded) the driver crashes during resume, trying to call the rfkill notification. Avoid that, and also don't enable the rfkill interrupt in this case (to avoid crashing trying to handle the interrupt later.) Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index cec0c8991285..601ee5904738 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -825,6 +825,9 @@ static int iwl_trans_pcie_resume(struct iwl_trans *trans)
{
bool hw_rfkill;
+ if (!trans->op_mode)
+ return 0;
+
iwl_enable_rfkill_int(trans);
hw_rfkill = iwl_is_rfkill_set(trans);