Skip to content

Commit

Permalink
wifi: iwlwifi: mvm: restart device through NMI
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg committed Jan 13, 2025
1 parent 14eef4e commit 2d15d21
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -5387,7 +5387,7 @@ iwl_mvm_switch_vif_chanctx_swap(struct iwl_mvm *mvm,

out_restart:
/* things keep failing, better restart the hw */
iwl_mvm_nic_restart(mvm);
iwl_force_nmi(mvm->trans);
return ret;
}

Expand Down Expand Up @@ -5423,7 +5423,7 @@ iwl_mvm_switch_vif_chanctx_reassign(struct iwl_mvm *mvm,

out_restart:
/* things keep failing, better restart the hw */
iwl_mvm_nic_restart(mvm);
iwl_force_nmi(mvm->trans);
return ret;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2d15d21

Please sign in to comment.