Commit de645e89 authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho

iwlwifi: mvm: fix error path in iwl_mvm_mac_setup_register()

The IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE bit shouldn't be set,
and realistically we should complete all setup before we call the
ieee80211_register_hw() function. Fix this.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 6b367c9f
...@@ -796,16 +796,19 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) ...@@ -796,16 +796,19 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
hw->netdev_features |= IWL_TX_CSUM_NETIF_FLAGS; hw->netdev_features |= IWL_TX_CSUM_NETIF_FLAGS;
} }
ret = ieee80211_register_hw(mvm->hw);
if (ret)
iwl_mvm_leds_exit(mvm);
mvm->init_status |= IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE;
if (mvm->cfg->vht_mu_mimo_supported) if (mvm->cfg->vht_mu_mimo_supported)
wiphy_ext_feature_set(hw->wiphy, wiphy_ext_feature_set(hw->wiphy,
NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER); NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER);
ret = ieee80211_register_hw(mvm->hw);
if (ret) {
iwl_mvm_leds_exit(mvm);
return ret; return ret;
}
mvm->init_status |= IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE;
return 0;
} }
static bool iwl_mvm_defer_tx(struct iwl_mvm *mvm, static bool iwl_mvm_defer_tx(struct iwl_mvm *mvm,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment