summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2019-01-24 13:26:28 +0100
committerLuca Coelho <luciano.coelho@intel.com>2019-02-20 20:47:55 +0200
commitde645e8992ef79a952cd5c7ca728f44c1c6b7ee6 (patch)
tree9d6e721cc03327638c3b775cc59c5e7f7242f45f /drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
parent6b367c9f88b0813f6a557e688b665324499a159e (diff)
downloadlinux-stable-de645e8992ef79a952cd5c7ca728f44c1c6b7ee6.tar.gz
linux-stable-de645e8992ef79a952cd5c7ca728f44c1c6b7ee6.tar.bz2
linux-stable-de645e8992ef79a952cd5c7ca728f44c1c6b7ee6.zip
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: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index a3bbf2ce571f..a585ee509987 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -796,16 +796,19 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
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)
wiphy_ext_feature_set(hw->wiphy,
NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER);
- return ret;
+ ret = ieee80211_register_hw(mvm->hw);
+ if (ret) {
+ iwl_mvm_leds_exit(mvm);
+ 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,