iwlwifi: mvm: remove IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE
authorJohannes Berg <johannes.berg@intel.com>
Tue, 29 Jan 2019 12:23:05 +0000 (13:23 +0100)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 20 Feb 2019 18:47:57 +0000 (20:47 +0200)
There's no point in this, we already do everything in a nested
fashion, and if we didn't we'd already crash in iwl_mvm_leds_exit()
etc. Just remove the bit.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@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 a585ee50998745b2c482d22a354bde9c473192d3..24556a7cd29c4183eef22a33cf3165ae5d02b357 100644 (file)
@@ -803,12 +803,9 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
        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;
+       return ret;
 }
 
 static bool iwl_mvm_defer_tx(struct iwl_mvm *mvm,
index 148aee1ad79da931fa7743f7bd9af33fd5ab3f8f..bca6f6b536d9754133c9ac8ab00e271c1f2bb06f 100644 (file)
@@ -1221,7 +1221,6 @@ enum iwl_mvm_status {
 enum iwl_mvm_init_status {
        IWL_MVM_INIT_STATUS_THERMAL_INIT_COMPLETE = BIT(0),
        IWL_MVM_INIT_STATUS_LEDS_INIT_COMPLETE = BIT(1),
-       IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE = BIT(2),
 };
 
 static inline bool iwl_mvm_is_radio_killed(struct iwl_mvm *mvm)
index 0996c97c4b94a3ff39a7234bf6cb9ea2fbc4524e..ba27dce4c2bbda399ce95865aeb3c9dda81e1adc 100644 (file)
@@ -919,10 +919,7 @@ static void iwl_op_mode_mvm_stop(struct iwl_op_mode *op_mode)
 
        iwl_mvm_thermal_exit(mvm);
 
-       if (mvm->init_status & IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE) {
-               ieee80211_unregister_hw(mvm->hw);
-               mvm->init_status &= ~IWL_MVM_INIT_STATUS_REG_HW_INIT_COMPLETE;
-       }
+       ieee80211_unregister_hw(mvm->hw);
 
        kfree(mvm->scan_cmd);
        kfree(mvm->mcast_filter_cmd);