diff options
author | Sara Sharon <sara.sharon@intel.com> | 2016-08-31 05:37:55 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2016-09-22 16:13:29 -0400 |
commit | 56f2929b0f913163ba48c22ea4ae558ac61d3d1c (patch) | |
tree | 2dcda835499b0b8cacf0e0023537a25eb6af2881 | |
parent | 0979a913f879ea39504200d83fb9f275a555a58d (diff) |
iwlwifi: mvm: cleanup redundant no_power_up_nic_in_init config
This is never really used anymore.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 46 |
2 files changed, 15 insertions, 32 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index 6cecb1adf0c8..2660cc4b9f8c 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
@@ -359,7 +359,6 @@ struct iwl_cfg { | |||
359 | high_temp:1, | 359 | high_temp:1, |
360 | mac_addr_from_csr:1, | 360 | mac_addr_from_csr:1, |
361 | lp_xtal_workaround:1, | 361 | lp_xtal_workaround:1, |
362 | no_power_up_nic_in_init:1, | ||
363 | disable_dummy_notification:1, | 362 | disable_dummy_notification:1, |
364 | apmg_not_supported:1, | 363 | apmg_not_supported:1, |
365 | mq_rx_supported:1, | 364 | mq_rx_supported:1, |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 75f3ca0504fd..6c08aa3fd2df 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c | |||
@@ -712,37 +712,21 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
712 | IWL_DEBUG_EEPROM(mvm->trans->dev, | 712 | IWL_DEBUG_EEPROM(mvm->trans->dev, |
713 | "working without external nvm file\n"); | 713 | "working without external nvm file\n"); |
714 | 714 | ||
715 | if (WARN(cfg->no_power_up_nic_in_init && !mvm->nvm_file_name, | 715 | err = iwl_trans_start_hw(mvm->trans); |
716 | "not allowing power-up and not having nvm_file\n")) | 716 | if (err) |
717 | goto out_free; | 717 | goto out_free; |
718 | 718 | ||
719 | /* | 719 | mutex_lock(&mvm->mutex); |
720 | * Even if nvm exists in the nvm_file driver should read again the nvm | 720 | iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE); |
721 | * from the nic because there might be entries that exist in the OTP | 721 | err = iwl_run_init_mvm_ucode(mvm, true); |
722 | * and not in the file. | 722 | if (!err || !iwlmvm_mod_params.init_dbg) |
723 | * for nics with no_power_up_nic_in_init: rely completley on nvm_file | 723 | iwl_mvm_stop_device(mvm); |
724 | */ | 724 | iwl_mvm_unref(mvm, IWL_MVM_REF_INIT_UCODE); |
725 | if (cfg->no_power_up_nic_in_init && mvm->nvm_file_name) { | 725 | mutex_unlock(&mvm->mutex); |
726 | err = iwl_nvm_init(mvm, false); | 726 | /* returns 0 if successful, 1 if success but in rfkill */ |
727 | if (err) | 727 | if (err < 0 && !iwlmvm_mod_params.init_dbg) { |
728 | goto out_free; | 728 | IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", err); |
729 | } else { | 729 | goto out_free; |
730 | err = iwl_trans_start_hw(mvm->trans); | ||
731 | if (err) | ||
732 | goto out_free; | ||
733 | |||
734 | mutex_lock(&mvm->mutex); | ||
735 | iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE); | ||
736 | err = iwl_run_init_mvm_ucode(mvm, true); | ||
737 | if (!err || !iwlmvm_mod_params.init_dbg) | ||
738 | iwl_mvm_stop_device(mvm); | ||
739 | iwl_mvm_unref(mvm, IWL_MVM_REF_INIT_UCODE); | ||
740 | mutex_unlock(&mvm->mutex); | ||
741 | /* returns 0 if successful, 1 if success but in rfkill */ | ||
742 | if (err < 0 && !iwlmvm_mod_params.init_dbg) { | ||
743 | IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", err); | ||
744 | goto out_free; | ||
745 | } | ||
746 | } | 730 | } |
747 | 731 | ||
748 | scan_size = iwl_mvm_scan_size(mvm); | 732 | scan_size = iwl_mvm_scan_size(mvm); |
@@ -784,8 +768,8 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
784 | flush_delayed_work(&mvm->fw_dump_wk); | 768 | flush_delayed_work(&mvm->fw_dump_wk); |
785 | iwl_phy_db_free(mvm->phy_db); | 769 | iwl_phy_db_free(mvm->phy_db); |
786 | kfree(mvm->scan_cmd); | 770 | kfree(mvm->scan_cmd); |
787 | if (!cfg->no_power_up_nic_in_init || !mvm->nvm_file_name) | 771 | iwl_trans_op_mode_leave(trans); |
788 | iwl_trans_op_mode_leave(trans); | 772 | |
789 | ieee80211_free_hw(mvm->hw); | 773 | ieee80211_free_hw(mvm->hw); |
790 | return NULL; | 774 | return NULL; |
791 | } | 775 | } |