iwlwifi: pcie: fix resume when no opmode is present
authorJohannes Berg <johannes.berg@intel.com>
Tue, 30 Jul 2013 18:10:46 +0000 (20:10 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 6 Aug 2013 08:31:05 +0000 (10:31 +0200)
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>
drivers/net/wireless/iwlwifi/pcie/trans.c

index cec0c8991285a7b457bc26374af038b046018e45..601ee5904738448bc7685f30c9f0b1bb4b4a1a3e 100644 (file)
@@ -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);
This page took 0.045349 seconds and 5 git commands to generate.