Explorar o código

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>
Johannes Berg %!s(int64=12) %!d(string=hai) anos
pai
achega
eeb89ab1f0
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      drivers/net/wireless/iwlwifi/pcie/trans.c

+ 3 - 0
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);