diff options
author | Liad Kaufman <liad.kaufman@intel.com> | 2017-06-05 16:39:39 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-08-01 12:41:45 +0300 |
commit | f6aa45f67aaa03bd294040508218bc72c5958ad6 (patch) | |
tree | 6d1e4147d78e6114603bb04ca5628ff79014d8f0 /drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | |
parent | c1b68c194ed72a5df55e7344b19c50ccb357f690 (diff) | |
download | linux-f6aa45f67aaa03bd294040508218bc72c5958ad6.tar.xz |
iwlwifi: mvm: support fw reading empty OTP
If the OTP is empty, the NVM_GET_INFO command returns
with flags' bit(0) on. This means the FW returns the
default values for working with. This is allowed, so
use this returned data.
Fixes: e9e1ba3dbf00 ("iwlwifi: mvm: support getting nvm data from firmware")
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/nvm.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c index dac7e542a190..5cc749261ce3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/nvm.c @@ -576,11 +576,8 @@ int iwl_mvm_nvm_get_from_fw(struct iwl_mvm *mvm) } rsp = (void *)hcmd.resp_pkt->data; - if (le32_to_cpu(rsp->general.flags)) { - IWL_ERR(mvm, "Invalid NVM data from FW\n"); - ret = -EINVAL; - goto out; - } + if (le32_to_cpu(rsp->general.flags) & NVM_GENERAL_FLAGS_EMPTY_OTP) + IWL_INFO(mvm, "OTP is empty\n"); mvm->nvm_data = kzalloc(sizeof(*mvm->nvm_data) + sizeof(struct ieee80211_channel) * |