aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
diff options
context:
space:
mode:
authorMatti Gottlieb <matti.gottlieb@intel.com>2014-07-31 02:16:25 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-03-12 03:57:27 -0400
commitd0d151973626eec3b8651311bdec209ba9050869 (patch)
tree4e968b74820fe4976f8dd6910d1c2d3a630cd38a /drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
parent02a50495dec111c68d82ecf3ac1e00224e880790 (diff)
iwlwifi: iwlmvm: LAR: disable LAR support due to NVM vs TLV conflict
If LAR is supported in TLV, but the NVM does not enable it, then disable LAR support and ignore the TLV's bit that enabled LAR. Signed-off-by: Matti Gottlieb <matti.gottlieb@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.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
index 83ba307f0618..88ee84cbd7d5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c
@@ -105,6 +105,8 @@ enum family_8000_nvm_offsets {
105 105
106 /* NVM REGULATORY -Section offset (in words) definitions */ 106 /* NVM REGULATORY -Section offset (in words) definitions */
107 NVM_CHANNELS_FAMILY_8000 = 0, 107 NVM_CHANNELS_FAMILY_8000 = 0,
108 NVM_LAR_OFFSET_FAMILY_8000 = 0x4C7,
109 NVM_LAR_ENABLED_FAMILY_8000 = 0x7,
108 110
109 /* NVM calibration section offset (in words) definitions */ 111 /* NVM calibration section offset (in words) definitions */
110 NVM_CALIB_SECTION_FAMILY_8000 = 0x2B8, 112 NVM_CALIB_SECTION_FAMILY_8000 = 0x2B8,
@@ -597,11 +599,12 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg,
597 const __le16 *nvm_hw, const __le16 *nvm_sw, 599 const __le16 *nvm_hw, const __le16 *nvm_sw,
598 const __le16 *nvm_calib, const __le16 *regulatory, 600 const __le16 *nvm_calib, const __le16 *regulatory,
599 const __le16 *mac_override, u8 tx_chains, u8 rx_chains, 601 const __le16 *mac_override, u8 tx_chains, u8 rx_chains,
600 bool lar_supported) 602 bool lar_fw_supported)
601{ 603{
602 struct iwl_nvm_data *data; 604 struct iwl_nvm_data *data;
603 u32 sku; 605 u32 sku;
604 u32 radio_cfg; 606 u32 radio_cfg;
607 u16 lar_config;
605 608
606 if (cfg->device_family != IWL_DEVICE_FAMILY_8000) 609 if (cfg->device_family != IWL_DEVICE_FAMILY_8000)
607 data = kzalloc(sizeof(*data) + 610 data = kzalloc(sizeof(*data) +
@@ -653,15 +656,21 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg,
653 656
654 iwl_init_sbands(dev, cfg, data, nvm_sw, 657 iwl_init_sbands(dev, cfg, data, nvm_sw,
655 sku & NVM_SKU_CAP_11AC_ENABLE, tx_chains, 658 sku & NVM_SKU_CAP_11AC_ENABLE, tx_chains,
656 rx_chains, lar_supported); 659 rx_chains, lar_fw_supported);
657 } else { 660 } else {
661 lar_config = le16_to_cpup(regulatory +
662 NVM_LAR_OFFSET_FAMILY_8000);
663 data->lar_enabled = !!(lar_config &
664 NVM_LAR_ENABLED_FAMILY_8000);
665
658 /* MAC address in family 8000 */ 666 /* MAC address in family 8000 */
659 iwl_set_hw_address_family_8000(dev, cfg, data, mac_override, 667 iwl_set_hw_address_family_8000(dev, cfg, data, mac_override,
660 nvm_hw); 668 nvm_hw);
661 669
662 iwl_init_sbands(dev, cfg, data, regulatory, 670 iwl_init_sbands(dev, cfg, data, regulatory,
663 sku & NVM_SKU_CAP_11AC_ENABLE, tx_chains, 671 sku & NVM_SKU_CAP_11AC_ENABLE, tx_chains,
664 rx_chains, lar_supported); 672 rx_chains, lar_fw_supported &&
673 data->lar_enabled);
665 } 674 }
666 675
667 data->calib_version = 255; 676 data->calib_version = 255;