Skip to content

Commit

Permalink
iwlwifi: mvm: register to mac80211 last
Browse files Browse the repository at this point in the history
All the actions that were taken after the registration can
be taken before the registration to mac80211.
This will help to defer part of the op_mode_mvm_start
function to a later stage in case the device is not
available.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
Link: https://lore.kernel.org/r/iwlwifi.20210210171218.c03cc5db67c1.Ia928ca34d25a73d959a345ffbe4f1217c3f17394@changeid
Signed-off-by: Luca Coelho <[email protected]>
  • Loading branch information
egrumbach authored and lucacoelho committed Feb 10, 2021
1 parent 4e8fe21 commit 46ad1ff
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions drivers/net/wireless/intel/iwlwifi/mvm/ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,16 +891,9 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
/* Set EBS as successful as long as not stated otherwise by the FW. */
mvm->last_ebs_successful = true;

err = iwl_mvm_mac_setup_register(mvm);
if (err)
goto out_free;
mvm->hw_registered = true;

min_backoff = iwl_mvm_min_backoff(mvm);
iwl_mvm_thermal_initialize(mvm, min_backoff);

iwl_mvm_dbgfs_register(mvm, dbgfs_dir);

if (!iwl_mvm_has_new_rx_stats_api(mvm))
memset(&mvm->rx_stats_v3, 0,
sizeof(struct mvm_statistics_rx_v3));
Expand All @@ -909,8 +902,17 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,

iwl_mvm_toggle_tx_ant(mvm, &mvm->mgmt_last_antenna_idx);

err = iwl_mvm_mac_setup_register(mvm);
if (err)
goto out_thermal_exit;
mvm->hw_registered = true;

iwl_mvm_dbgfs_register(mvm, dbgfs_dir);

return op_mode;

out_thermal_exit:
iwl_mvm_thermal_exit(mvm);
out_free:
iwl_fw_flush_dumps(&mvm->fwrt);
iwl_fw_runtime_free(&mvm->fwrt);
Expand Down

0 comments on commit 46ad1ff

Please sign in to comment.