diff options
author | Arik Nemtsov | 2015-02-04 15:38:56 +0200 |
---|---|---|
committer | Emmanuel Grumbach | 2015-03-12 09:57:37 +0200 |
commit | f55286313a6597d075f409f111b4f516a3feb830 (patch) | |
tree | d6875c6d2c2ac0f3e9ee44e12cc3134cc80a78c4 /drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | |
parent | e70fe7eb9dec9c7b7c570a489f198b93b5ca609b (diff) |
iwlwifi: use correct NVM offset for LAR enable for new NVMs
New NVM versions in LnP platforms have the lar_enable bits in a different
offset.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-nvm-parse.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c index 54e447b9978c..b372105604a0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c @@ -110,7 +110,8 @@ enum family_8000_nvm_offsets { /* NVM REGULATORY -Section offset (in words) definitions */ NVM_CHANNELS_FAMILY_8000 = 0, - NVM_LAR_OFFSET_FAMILY_8000 = 0x4C7, + NVM_LAR_OFFSET_FAMILY_8000_OLD = 0x4C7, + NVM_LAR_OFFSET_FAMILY_8000 = 0x507, NVM_LAR_ENABLED_FAMILY_8000 = 0x7, /* NVM calibration section offset (in words) definitions */ @@ -656,8 +657,11 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, iwl_init_sbands(dev, cfg, data, nvm_sw, tx_chains, rx_chains, lar_fw_supported); } else { - lar_config = le16_to_cpup(regulatory + - NVM_LAR_OFFSET_FAMILY_8000); + u16 lar_offset = data->nvm_version < 0xE39 ? + NVM_LAR_OFFSET_FAMILY_8000_OLD : + NVM_LAR_OFFSET_FAMILY_8000; + + lar_config = le16_to_cpup(regulatory + lar_offset); data->lar_enabled = !!(lar_config & NVM_LAR_ENABLED_FAMILY_8000); |