wifi: iwlwifi: mvm: restart device through NMI
authorJohannes Berg <johannes.berg@intel.com>
Fri, 27 Dec 2024 08:01:10 +0000 (10:01 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 13 Jan 2025 14:26:39 +0000 (15:26 +0100)
When some channel context manipulations fail, the device
is going to be restarted to try to recover. Make this go
through a real FW restart via an NMI so the transport is
aware of it and can later handle escalation, and to make
it easier to restructure the code later.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241227095718.96b732029d20.I2e729f402db58a76cea620b6f62a02da49a10b48@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/ops.c

index 8b96548..b82a2ac 100644 (file)
@@ -5387,7 +5387,7 @@ out_reassign:
 
 out_restart:
        /* things keep failing, better restart the hw */
-       iwl_mvm_nic_restart(mvm);
+       iwl_force_nmi(mvm->trans);
        return ret;
 }
 
@@ -5423,7 +5423,7 @@ out_reassign:
 
 out_restart:
        /* things keep failing, better restart the hw */
-       iwl_mvm_nic_restart(mvm);
+       iwl_force_nmi(mvm->trans);
        return ret;
 }
 
index 40a6095..dbf32bf 100644 (file)
@@ -2586,7 +2586,6 @@ void iwl_mvm_tcm_add_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
 void iwl_mvm_tcm_rm_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
 u8 iwl_mvm_tcm_load_percentage(u32 airtime, u32 elapsed);
 
-void iwl_mvm_nic_restart(struct iwl_mvm *mvm);
 unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm,
                                    struct ieee80211_vif *vif);
 void iwl_mvm_connection_loss(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
index 13a2403..ef54ba8 100644 (file)
@@ -2025,7 +2025,7 @@ static void iwl_mvm_reprobe_wk(struct work_struct *wk)
        module_put(THIS_MODULE);
 }
 
-void iwl_mvm_nic_restart(struct iwl_mvm *mvm)
+static void iwl_mvm_nic_restart(struct iwl_mvm *mvm)
 {
        iwl_abort_notification_waits(&mvm->notif_wait);
        iwl_dbg_tlv_del_timers(mvm->trans);