diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-03-05 06:06:13 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-03-26 03:15:36 -0400 |
commit | 5dd9c68a854a77da2091b08d8fb7717b04667c6d (patch) | |
tree | 7081f4b229c04e5b5a2257b2aa6b4ef189428d0b /drivers/net/wireless | |
parent | cb2513bb71cfaedfb9af37c27744b0e5cef15aa3 (diff) |
iwlwifi: drop support for early versions of 8000
These early versions are no longer supported.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-8000.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-config.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-drv.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-io.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | 57 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-nvm-parse.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-prph.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/nvm.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/ops.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 30 |
11 files changed, 46 insertions, 116 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-8000.c b/drivers/net/wireless/iwlwifi/iwl-8000.c index 9c396a42aec8..4ef50cf7d9a6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-8000.c +++ b/drivers/net/wireless/iwlwifi/iwl-8000.c | |||
@@ -94,7 +94,6 @@ | |||
94 | IWL8000_FW_PRE "-" __stringify(api) ".ucode" | 94 | IWL8000_FW_PRE "-" __stringify(api) ".ucode" |
95 | 95 | ||
96 | #define NVM_HW_SECTION_NUM_FAMILY_8000 10 | 96 | #define NVM_HW_SECTION_NUM_FAMILY_8000 10 |
97 | #define DEFAULT_NVM_FILE_FAMILY_8000A "iwl_nvm_8000.bin" | ||
98 | #define DEFAULT_NVM_FILE_FAMILY_8000 "iwl_nvm_8000B.bin" | 97 | #define DEFAULT_NVM_FILE_FAMILY_8000 "iwl_nvm_8000B.bin" |
99 | 98 | ||
100 | /* Max SDIO RX aggregation size of the ADDBA request/response */ | 99 | /* Max SDIO RX aggregation size of the ADDBA request/response */ |
@@ -178,7 +177,6 @@ const struct iwl_cfg iwl8260_2ac_sdio_cfg = { | |||
178 | .nvm_ver = IWL8000_NVM_VERSION, | 177 | .nvm_ver = IWL8000_NVM_VERSION, |
179 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, | 178 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, |
180 | .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000, | 179 | .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000, |
181 | .default_nvm_file_8000A = DEFAULT_NVM_FILE_FAMILY_8000A, | ||
182 | .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO, | 180 | .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO, |
183 | .disable_dummy_notification = true, | 181 | .disable_dummy_notification = true, |
184 | .max_ht_ampdu_exponent = MAX_HT_AMPDU_EXPONENT_8260_SDIO, | 182 | .max_ht_ampdu_exponent = MAX_HT_AMPDU_EXPONENT_8260_SDIO, |
@@ -193,7 +191,6 @@ const struct iwl_cfg iwl4165_2ac_sdio_cfg = { | |||
193 | .nvm_ver = IWL8000_NVM_VERSION, | 191 | .nvm_ver = IWL8000_NVM_VERSION, |
194 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, | 192 | .nvm_calib_ver = IWL8000_TX_POWER_VERSION, |
195 | .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000, | 193 | .default_nvm_file = DEFAULT_NVM_FILE_FAMILY_8000, |
196 | .default_nvm_file_8000A = DEFAULT_NVM_FILE_FAMILY_8000A, | ||
197 | .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO, | 194 | .max_rx_agg_size = MAX_RX_AGG_SIZE_8260_SDIO, |
198 | .bt_shared_single_ant = true, | 195 | .bt_shared_single_ant = true, |
199 | .disable_dummy_notification = true, | 196 | .disable_dummy_notification = true, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h index 4b190d98a1ec..aa41c778af83 100644 --- a/drivers/net/wireless/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/iwlwifi/iwl-config.h | |||
@@ -304,7 +304,6 @@ struct iwl_cfg { | |||
304 | const struct iwl_pwr_tx_backoff *pwr_tx_backoffs; | 304 | const struct iwl_pwr_tx_backoff *pwr_tx_backoffs; |
305 | bool no_power_up_nic_in_init; | 305 | bool no_power_up_nic_in_init; |
306 | const char *default_nvm_file; | 306 | const char *default_nvm_file; |
307 | const char *default_nvm_file_8000A; | ||
308 | unsigned int max_rx_agg_size; | 307 | unsigned int max_rx_agg_size; |
309 | bool disable_dummy_notification; | 308 | bool disable_dummy_notification; |
310 | unsigned int max_tx_agg_size; | 309 | unsigned int max_tx_agg_size; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c index 66ca000f0da1..885c78708639 100644 --- a/drivers/net/wireless/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c | |||
@@ -241,16 +241,10 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first) | |||
241 | * previous name and uses the new format. | 241 | * previous name and uses the new format. |
242 | */ | 242 | */ |
243 | if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) { | 243 | if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) { |
244 | char rev_step[2] = { | 244 | char rev_step = 'A' + CSR_HW_REV_STEP(drv->trans->hw_rev); |
245 | 'A' + CSR_HW_REV_STEP(drv->trans->hw_rev), 0 | ||
246 | }; | ||
247 | |||
248 | /* A-step doesn't have an indication */ | ||
249 | if (CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_A_STEP) | ||
250 | rev_step[0] = 0; | ||
251 | 245 | ||
252 | snprintf(drv->firmware_name, sizeof(drv->firmware_name), | 246 | snprintf(drv->firmware_name, sizeof(drv->firmware_name), |
253 | "%s%s-%s.ucode", name_pre, rev_step, tag); | 247 | "%s%c-%s.ucode", name_pre, rev_step, tag); |
254 | } | 248 | } |
255 | 249 | ||
256 | IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n", | 250 | IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.c b/drivers/net/wireless/iwlwifi/iwl-io.c index 78cac43e2bcd..27c66e477833 100644 --- a/drivers/net/wireless/iwlwifi/iwl-io.c +++ b/drivers/net/wireless/iwlwifi/iwl-io.c | |||
@@ -186,21 +186,14 @@ IWL_EXPORT_SYMBOL(iwl_clear_bits_prph); | |||
186 | 186 | ||
187 | void iwl_force_nmi(struct iwl_trans *trans) | 187 | void iwl_force_nmi(struct iwl_trans *trans) |
188 | { | 188 | { |
189 | /* | 189 | if (trans->cfg->device_family != IWL_DEVICE_FAMILY_8000) { |
190 | * In HW previous to the 8000 HW family, and in the 8000 HW family | ||
191 | * itself when the revision step==0, the DEVICE_SET_NMI_REG is used | ||
192 | * to force an NMI. Otherwise, a different register - | ||
193 | * DEVICE_SET_NMI_8000B_REG - is used. | ||
194 | */ | ||
195 | if ((trans->cfg->device_family != IWL_DEVICE_FAMILY_8000) || | ||
196 | (CSR_HW_REV_STEP(trans->hw_rev) == SILICON_A_STEP)) { | ||
197 | iwl_write_prph(trans, DEVICE_SET_NMI_REG, | 190 | iwl_write_prph(trans, DEVICE_SET_NMI_REG, |
198 | DEVICE_SET_NMI_VAL_DRV); | 191 | DEVICE_SET_NMI_VAL_DRV); |
199 | iwl_write_prph(trans, DEVICE_SET_NMI_REG, | 192 | iwl_write_prph(trans, DEVICE_SET_NMI_REG, |
200 | DEVICE_SET_NMI_VAL_HW); | 193 | DEVICE_SET_NMI_VAL_HW); |
201 | } else { | 194 | } else { |
202 | iwl_write_prph(trans, DEVICE_SET_NMI_8000B_REG, | 195 | iwl_write_prph(trans, DEVICE_SET_NMI_8000_REG, |
203 | DEVICE_SET_NMI_8000B_VAL); | 196 | DEVICE_SET_NMI_8000_VAL); |
204 | iwl_write_prph(trans, DEVICE_SET_NMI_REG, | 197 | iwl_write_prph(trans, DEVICE_SET_NMI_REG, |
205 | DEVICE_SET_NMI_VAL_DRV); | 198 | DEVICE_SET_NMI_VAL_DRV); |
206 | } | 199 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c index 774637746427..83903a5025c2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.c | |||
@@ -99,14 +99,9 @@ enum family_8000_nvm_offsets { | |||
99 | /* NVM SW-Section offset (in words) definitions */ | 99 | /* NVM SW-Section offset (in words) definitions */ |
100 | NVM_SW_SECTION_FAMILY_8000 = 0x1C0, | 100 | NVM_SW_SECTION_FAMILY_8000 = 0x1C0, |
101 | NVM_VERSION_FAMILY_8000 = 0, | 101 | NVM_VERSION_FAMILY_8000 = 0, |
102 | RADIO_CFG_FAMILY_8000 = 2, | 102 | RADIO_CFG_FAMILY_8000 = 0, |
103 | SKU_FAMILY_8000 = 4, | 103 | SKU_FAMILY_8000 = 2, |
104 | N_HW_ADDRS_FAMILY_8000 = 5, | 104 | N_HW_ADDRS_FAMILY_8000 = 3, |
105 | |||
106 | /* NVM PHY-SKU-Section offset (in words) for B0 */ | ||
107 | RADIO_CFG_FAMILY_8000_B0 = 0, | ||
108 | SKU_FAMILY_8000_B0 = 2, | ||
109 | N_HW_ADDRS_FAMILY_8000_B0 = 3, | ||
110 | 105 | ||
111 | /* NVM REGULATORY -Section offset (in words) definitions */ | 106 | /* NVM REGULATORY -Section offset (in words) definitions */ |
112 | NVM_CHANNELS_FAMILY_8000 = 0, | 107 | NVM_CHANNELS_FAMILY_8000 = 0, |
@@ -446,22 +441,16 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, | |||
446 | n_used, n_channels); | 441 | n_used, n_channels); |
447 | } | 442 | } |
448 | 443 | ||
449 | static int iwl_get_sku(const struct iwl_cfg *cfg, | 444 | static int iwl_get_sku(const struct iwl_cfg *cfg, const __le16 *nvm_sw, |
450 | const __le16 *nvm_sw, const __le16 *phy_sku, | 445 | const __le16 *phy_sku) |
451 | bool is_family_8000_a_step) | ||
452 | { | 446 | { |
453 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) | 447 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) |
454 | return le16_to_cpup(nvm_sw + SKU); | 448 | return le16_to_cpup(nvm_sw + SKU); |
455 | 449 | ||
456 | if (!is_family_8000_a_step) | 450 | return le32_to_cpup((__le32 *)(phy_sku + SKU_FAMILY_8000)); |
457 | return le32_to_cpup((__le32 *)(phy_sku + | ||
458 | SKU_FAMILY_8000_B0)); | ||
459 | else | ||
460 | return le32_to_cpup((__le32 *)(nvm_sw + SKU_FAMILY_8000)); | ||
461 | } | 451 | } |
462 | 452 | ||
463 | static int iwl_get_nvm_version(const struct iwl_cfg *cfg, | 453 | static int iwl_get_nvm_version(const struct iwl_cfg *cfg, const __le16 *nvm_sw) |
464 | const __le16 *nvm_sw) | ||
465 | { | 454 | { |
466 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) | 455 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) |
467 | return le16_to_cpup(nvm_sw + NVM_VERSION); | 456 | return le16_to_cpup(nvm_sw + NVM_VERSION); |
@@ -470,35 +459,24 @@ static int iwl_get_nvm_version(const struct iwl_cfg *cfg, | |||
470 | NVM_VERSION_FAMILY_8000)); | 459 | NVM_VERSION_FAMILY_8000)); |
471 | } | 460 | } |
472 | 461 | ||
473 | static int iwl_get_radio_cfg(const struct iwl_cfg *cfg, | 462 | static int iwl_get_radio_cfg(const struct iwl_cfg *cfg, const __le16 *nvm_sw, |
474 | const __le16 *nvm_sw, const __le16 *phy_sku, | 463 | const __le16 *phy_sku) |
475 | bool is_family_8000_a_step) | ||
476 | { | 464 | { |
477 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) | 465 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) |
478 | return le16_to_cpup(nvm_sw + RADIO_CFG); | 466 | return le16_to_cpup(nvm_sw + RADIO_CFG); |
479 | 467 | ||
480 | if (!is_family_8000_a_step) | 468 | return le32_to_cpup((__le32 *)(nvm_sw + RADIO_CFG_FAMILY_8000)); |
481 | return le32_to_cpup((__le32 *)(phy_sku + | ||
482 | RADIO_CFG_FAMILY_8000_B0)); | ||
483 | else | ||
484 | return le32_to_cpup((__le32 *)(nvm_sw + RADIO_CFG_FAMILY_8000)); | ||
485 | 469 | ||
486 | } | 470 | } |
487 | 471 | ||
488 | static int iwl_get_n_hw_addrs(const struct iwl_cfg *cfg, | 472 | static int iwl_get_n_hw_addrs(const struct iwl_cfg *cfg, const __le16 *nvm_sw) |
489 | const __le16 *nvm_sw, bool is_family_8000_a_step) | ||
490 | { | 473 | { |
491 | int n_hw_addr; | 474 | int n_hw_addr; |
492 | 475 | ||
493 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) | 476 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) |
494 | return le16_to_cpup(nvm_sw + N_HW_ADDRS); | 477 | return le16_to_cpup(nvm_sw + N_HW_ADDRS); |
495 | 478 | ||
496 | if (!is_family_8000_a_step) | 479 | n_hw_addr = le32_to_cpup((__le32 *)(nvm_sw + N_HW_ADDRS_FAMILY_8000)); |
497 | n_hw_addr = le32_to_cpup((__le32 *)(nvm_sw + | ||
498 | N_HW_ADDRS_FAMILY_8000_B0)); | ||
499 | else | ||
500 | n_hw_addr = le32_to_cpup((__le32 *)(nvm_sw + | ||
501 | N_HW_ADDRS_FAMILY_8000)); | ||
502 | 480 | ||
503 | return n_hw_addr & N_HW_ADDR_MASK; | 481 | return n_hw_addr & N_HW_ADDR_MASK; |
504 | } | 482 | } |
@@ -594,8 +572,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, | |||
594 | const __le16 *nvm_hw, const __le16 *nvm_sw, | 572 | const __le16 *nvm_hw, const __le16 *nvm_sw, |
595 | const __le16 *nvm_calib, const __le16 *regulatory, | 573 | const __le16 *nvm_calib, const __le16 *regulatory, |
596 | const __le16 *mac_override, const __le16 *phy_sku, | 574 | const __le16 *mac_override, const __le16 *phy_sku, |
597 | u8 tx_chains, u8 rx_chains, | 575 | u8 tx_chains, u8 rx_chains, bool lar_fw_supported, |
598 | bool lar_fw_supported, bool is_family_8000_a_step, | ||
599 | u32 mac_addr0, u32 mac_addr1) | 576 | u32 mac_addr0, u32 mac_addr1) |
600 | { | 577 | { |
601 | struct iwl_nvm_data *data; | 578 | struct iwl_nvm_data *data; |
@@ -618,15 +595,14 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, | |||
618 | 595 | ||
619 | data->nvm_version = iwl_get_nvm_version(cfg, nvm_sw); | 596 | data->nvm_version = iwl_get_nvm_version(cfg, nvm_sw); |
620 | 597 | ||
621 | radio_cfg = | 598 | radio_cfg = iwl_get_radio_cfg(cfg, nvm_sw, phy_sku); |
622 | iwl_get_radio_cfg(cfg, nvm_sw, phy_sku, is_family_8000_a_step); | ||
623 | iwl_set_radio_cfg(cfg, data, radio_cfg); | 599 | iwl_set_radio_cfg(cfg, data, radio_cfg); |
624 | if (data->valid_tx_ant) | 600 | if (data->valid_tx_ant) |
625 | tx_chains &= data->valid_tx_ant; | 601 | tx_chains &= data->valid_tx_ant; |
626 | if (data->valid_rx_ant) | 602 | if (data->valid_rx_ant) |
627 | rx_chains &= data->valid_rx_ant; | 603 | rx_chains &= data->valid_rx_ant; |
628 | 604 | ||
629 | sku = iwl_get_sku(cfg, nvm_sw, phy_sku, is_family_8000_a_step); | 605 | sku = iwl_get_sku(cfg, nvm_sw, phy_sku); |
630 | data->sku_cap_band_24GHz_enable = sku & NVM_SKU_CAP_BAND_24GHZ; | 606 | data->sku_cap_band_24GHz_enable = sku & NVM_SKU_CAP_BAND_24GHZ; |
631 | data->sku_cap_band_52GHz_enable = sku & NVM_SKU_CAP_BAND_52GHZ; | 607 | data->sku_cap_band_52GHz_enable = sku & NVM_SKU_CAP_BAND_52GHZ; |
632 | data->sku_cap_11n_enable = sku & NVM_SKU_CAP_11N_ENABLE; | 608 | data->sku_cap_11n_enable = sku & NVM_SKU_CAP_11N_ENABLE; |
@@ -635,8 +611,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, | |||
635 | data->sku_cap_11ac_enable = data->sku_cap_11n_enable && | 611 | data->sku_cap_11ac_enable = data->sku_cap_11n_enable && |
636 | (sku & NVM_SKU_CAP_11AC_ENABLE); | 612 | (sku & NVM_SKU_CAP_11AC_ENABLE); |
637 | 613 | ||
638 | data->n_hw_addrs = | 614 | data->n_hw_addrs = iwl_get_n_hw_addrs(cfg, nvm_sw); |
639 | iwl_get_n_hw_addrs(cfg, nvm_sw, is_family_8000_a_step); | ||
640 | 615 | ||
641 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) { | 616 | if (cfg->device_family != IWL_DEVICE_FAMILY_8000) { |
642 | /* Checking for required sections */ | 617 | /* Checking for required sections */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.h b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.h index c995d2cee3f6..822ba52e0e5a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-nvm-parse.h +++ b/drivers/net/wireless/iwlwifi/iwl-nvm-parse.h | |||
@@ -78,8 +78,7 @@ iwl_parse_nvm_data(struct device *dev, const struct iwl_cfg *cfg, | |||
78 | const __le16 *nvm_hw, const __le16 *nvm_sw, | 78 | const __le16 *nvm_hw, const __le16 *nvm_sw, |
79 | const __le16 *nvm_calib, const __le16 *regulatory, | 79 | const __le16 *nvm_calib, const __le16 *regulatory, |
80 | const __le16 *mac_override, const __le16 *phy_sku, | 80 | const __le16 *mac_override, const __le16 *phy_sku, |
81 | u8 tx_chains, u8 rx_chains, | 81 | u8 tx_chains, u8 rx_chains, bool lar_fw_supported, |
82 | bool lar_fw_supported, bool is_family_8000_a_step, | ||
83 | u32 mac_addr0, u32 mac_addr1); | 82 | u32 mac_addr0, u32 mac_addr1); |
84 | 83 | ||
85 | /** | 84 | /** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h index 467c4bc68269..88a57e6e232f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/iwlwifi/iwl-prph.h | |||
@@ -110,8 +110,8 @@ | |||
110 | #define DEVICE_SET_NMI_REG 0x00a01c30 | 110 | #define DEVICE_SET_NMI_REG 0x00a01c30 |
111 | #define DEVICE_SET_NMI_VAL_HW BIT(0) | 111 | #define DEVICE_SET_NMI_VAL_HW BIT(0) |
112 | #define DEVICE_SET_NMI_VAL_DRV BIT(7) | 112 | #define DEVICE_SET_NMI_VAL_DRV BIT(7) |
113 | #define DEVICE_SET_NMI_8000B_REG 0x00a01c24 | 113 | #define DEVICE_SET_NMI_8000_REG 0x00a01c24 |
114 | #define DEVICE_SET_NMI_8000B_VAL 0x1000000 | 114 | #define DEVICE_SET_NMI_8000_VAL 0x1000000 |
115 | 115 | ||
116 | /* Shared registers (0x0..0x3ff, via target indirect or periphery */ | 116 | /* Shared registers (0x0..0x3ff, via target indirect or periphery */ |
117 | #define SHR_BASE 0x00a10000 | 117 | #define SHR_BASE 0x00a10000 |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index b4e28ff596bf..213bd72bd849 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -1025,16 +1025,6 @@ void iwl_mvm_fw_error_dump(struct iwl_mvm *mvm) | |||
1025 | 1025 | ||
1026 | lockdep_assert_held(&mvm->mutex); | 1026 | lockdep_assert_held(&mvm->mutex); |
1027 | 1027 | ||
1028 | /* W/A for 8000 HW family A-step */ | ||
1029 | if (mvm->cfg->device_family == IWL_DEVICE_FAMILY_8000 && | ||
1030 | CSR_HW_REV_STEP(mvm->trans->hw_rev) == SILICON_A_STEP) { | ||
1031 | if (smem_len) | ||
1032 | smem_len = 0x38000; | ||
1033 | |||
1034 | if (sram2_len) | ||
1035 | sram2_len = 0x10000; | ||
1036 | } | ||
1037 | |||
1038 | fw_error_dump = kzalloc(sizeof(*fw_error_dump), GFP_KERNEL); | 1028 | fw_error_dump = kzalloc(sizeof(*fw_error_dump), GFP_KERNEL); |
1039 | if (!fw_error_dump) | 1029 | if (!fw_error_dump) |
1040 | return; | 1030 | return; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/nvm.c b/drivers/net/wireless/iwlwifi/mvm/nvm.c index 123e0a16aea8..675197d9f03e 100644 --- a/drivers/net/wireless/iwlwifi/mvm/nvm.c +++ b/drivers/net/wireless/iwlwifi/mvm/nvm.c | |||
@@ -77,8 +77,7 @@ | |||
77 | /* Default NVM size to read */ | 77 | /* Default NVM size to read */ |
78 | #define IWL_NVM_DEFAULT_CHUNK_SIZE (2*1024) | 78 | #define IWL_NVM_DEFAULT_CHUNK_SIZE (2*1024) |
79 | #define IWL_MAX_NVM_SECTION_SIZE 0x1b58 | 79 | #define IWL_MAX_NVM_SECTION_SIZE 0x1b58 |
80 | #define IWL_MAX_NVM_8000A_SECTION_SIZE 0xffc | 80 | #define IWL_MAX_NVM_8000_SECTION_SIZE 0x1ffc |
81 | #define IWL_MAX_NVM_8000B_SECTION_SIZE 0x1ffc | ||
82 | 81 | ||
83 | #define NVM_WRITE_OPCODE 1 | 82 | #define NVM_WRITE_OPCODE 1 |
84 | #define NVM_READ_OPCODE 0 | 83 | #define NVM_READ_OPCODE 0 |
@@ -267,7 +266,7 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm) | |||
267 | { | 266 | { |
268 | struct iwl_nvm_section *sections = mvm->nvm_sections; | 267 | struct iwl_nvm_section *sections = mvm->nvm_sections; |
269 | const __le16 *hw, *sw, *calib, *regulatory, *mac_override, *phy_sku; | 268 | const __le16 *hw, *sw, *calib, *regulatory, *mac_override, *phy_sku; |
270 | bool is_family_8000_a_step = false, lar_enabled; | 269 | bool lar_enabled; |
271 | u32 mac_addr0, mac_addr1; | 270 | u32 mac_addr0, mac_addr1; |
272 | 271 | ||
273 | /* Checking for required sections */ | 272 | /* Checking for required sections */ |
@@ -293,12 +292,8 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm) | |||
293 | return NULL; | 292 | return NULL; |
294 | } | 293 | } |
295 | 294 | ||
296 | if (CSR_HW_REV_STEP(mvm->trans->hw_rev) == SILICON_A_STEP) | ||
297 | is_family_8000_a_step = true; | ||
298 | |||
299 | /* PHY_SKU section is mandatory in B0 */ | 295 | /* PHY_SKU section is mandatory in B0 */ |
300 | if (!is_family_8000_a_step && | 296 | if (!mvm->nvm_sections[NVM_SECTION_TYPE_PHY_SKU].data) { |
301 | !mvm->nvm_sections[NVM_SECTION_TYPE_PHY_SKU].data) { | ||
302 | IWL_ERR(mvm, | 297 | IWL_ERR(mvm, |
303 | "Can't parse phy_sku in B0, empty sections\n"); | 298 | "Can't parse phy_sku in B0, empty sections\n"); |
304 | return NULL; | 299 | return NULL; |
@@ -327,8 +322,7 @@ iwl_parse_nvm_sections(struct iwl_mvm *mvm) | |||
327 | return iwl_parse_nvm_data(mvm->trans->dev, mvm->cfg, hw, sw, calib, | 322 | return iwl_parse_nvm_data(mvm->trans->dev, mvm->cfg, hw, sw, calib, |
328 | regulatory, mac_override, phy_sku, | 323 | regulatory, mac_override, phy_sku, |
329 | mvm->fw->valid_tx_ant, mvm->fw->valid_rx_ant, | 324 | mvm->fw->valid_tx_ant, mvm->fw->valid_rx_ant, |
330 | lar_enabled, is_family_8000_a_step, | 325 | lar_enabled, mac_addr0, mac_addr1); |
331 | mac_addr0, mac_addr1); | ||
332 | } | 326 | } |
333 | 327 | ||
334 | #define MAX_NVM_FILE_LEN 16384 | 328 | #define MAX_NVM_FILE_LEN 16384 |
@@ -381,10 +375,8 @@ static int iwl_mvm_read_external_nvm(struct iwl_mvm *mvm) | |||
381 | /* Maximal size depends on HW family and step */ | 375 | /* Maximal size depends on HW family and step */ |
382 | if (mvm->trans->cfg->device_family != IWL_DEVICE_FAMILY_8000) | 376 | if (mvm->trans->cfg->device_family != IWL_DEVICE_FAMILY_8000) |
383 | max_section_size = IWL_MAX_NVM_SECTION_SIZE; | 377 | max_section_size = IWL_MAX_NVM_SECTION_SIZE; |
384 | else if (CSR_HW_REV_STEP(mvm->trans->hw_rev) == SILICON_A_STEP) | 378 | else |
385 | max_section_size = IWL_MAX_NVM_8000A_SECTION_SIZE; | 379 | max_section_size = IWL_MAX_NVM_8000_SECTION_SIZE; |
386 | else /* Family 8000 B-step or C-step */ | ||
387 | max_section_size = IWL_MAX_NVM_8000B_SECTION_SIZE; | ||
388 | 380 | ||
389 | /* | 381 | /* |
390 | * Obtain NVM image via request_firmware. Since we already used | 382 | * Obtain NVM image via request_firmware. Since we already used |
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c index a28080ead54f..91361be3ecd8 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c | |||
@@ -522,15 +522,10 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
522 | min_backoff = calc_min_backoff(trans, cfg); | 522 | min_backoff = calc_min_backoff(trans, cfg); |
523 | iwl_mvm_tt_initialize(mvm, min_backoff); | 523 | iwl_mvm_tt_initialize(mvm, min_backoff); |
524 | /* set the nvm_file_name according to priority */ | 524 | /* set the nvm_file_name according to priority */ |
525 | if (iwlwifi_mod_params.nvm_file) { | 525 | if (iwlwifi_mod_params.nvm_file) |
526 | mvm->nvm_file_name = iwlwifi_mod_params.nvm_file; | 526 | mvm->nvm_file_name = iwlwifi_mod_params.nvm_file; |
527 | } else { | 527 | else |
528 | if ((trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) && | 528 | mvm->nvm_file_name = mvm->cfg->default_nvm_file; |
529 | (CSR_HW_REV_STEP(trans->hw_rev) == SILICON_A_STEP)) | ||
530 | mvm->nvm_file_name = mvm->cfg->default_nvm_file_8000A; | ||
531 | else | ||
532 | mvm->nvm_file_name = mvm->cfg->default_nvm_file; | ||
533 | } | ||
534 | 529 | ||
535 | if (WARN(cfg->no_power_up_nic_in_init && !mvm->nvm_file_name, | 530 | if (WARN(cfg->no_power_up_nic_in_init && !mvm->nvm_file_name, |
536 | "not allowing power-up and not having nvm_file\n")) | 531 | "not allowing power-up and not having nvm_file\n")) |
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 39e3cf06e364..d8984fbb1f0d 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -719,10 +719,10 @@ static int iwl_pcie_rsa_race_bug_wa(struct iwl_trans *trans) | |||
719 | return -EIO; | 719 | return -EIO; |
720 | } | 720 | } |
721 | 721 | ||
722 | static int iwl_pcie_load_cpu_sections_8000b(struct iwl_trans *trans, | 722 | static int iwl_pcie_load_cpu_sections_8000(struct iwl_trans *trans, |
723 | const struct fw_img *image, | 723 | const struct fw_img *image, |
724 | int cpu, | 724 | int cpu, |
725 | int *first_ucode_section) | 725 | int *first_ucode_section) |
726 | { | 726 | { |
727 | int shift_param; | 727 | int shift_param; |
728 | int i, ret = 0, sec_num = 0x1; | 728 | int i, ret = 0, sec_num = 0x1; |
@@ -917,16 +917,13 @@ static int iwl_pcie_load_given_ucode(struct iwl_trans *trans, | |||
917 | } | 917 | } |
918 | 918 | ||
919 | /* release CPU reset */ | 919 | /* release CPU reset */ |
920 | if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) | 920 | iwl_write32(trans, CSR_RESET, 0); |
921 | iwl_write_prph(trans, RELEASE_CPU_RESET, RELEASE_CPU_RESET_BIT); | ||
922 | else | ||
923 | iwl_write32(trans, CSR_RESET, 0); | ||
924 | 921 | ||
925 | return 0; | 922 | return 0; |
926 | } | 923 | } |
927 | 924 | ||
928 | static int iwl_pcie_load_given_ucode_8000b(struct iwl_trans *trans, | 925 | static int iwl_pcie_load_given_ucode_8000(struct iwl_trans *trans, |
929 | const struct fw_img *image) | 926 | const struct fw_img *image) |
930 | { | 927 | { |
931 | int ret = 0; | 928 | int ret = 0; |
932 | int first_ucode_section; | 929 | int first_ucode_section; |
@@ -947,14 +944,14 @@ static int iwl_pcie_load_given_ucode_8000b(struct iwl_trans *trans, | |||
947 | iwl_write_prph(trans, RELEASE_CPU_RESET, RELEASE_CPU_RESET_BIT); | 944 | iwl_write_prph(trans, RELEASE_CPU_RESET, RELEASE_CPU_RESET_BIT); |
948 | 945 | ||
949 | /* load to FW the binary Secured sections of CPU1 */ | 946 | /* load to FW the binary Secured sections of CPU1 */ |
950 | ret = iwl_pcie_load_cpu_sections_8000b(trans, image, 1, | 947 | ret = iwl_pcie_load_cpu_sections_8000(trans, image, 1, |
951 | &first_ucode_section); | 948 | &first_ucode_section); |
952 | if (ret) | 949 | if (ret) |
953 | return ret; | 950 | return ret; |
954 | 951 | ||
955 | /* load to FW the binary sections of CPU2 */ | 952 | /* load to FW the binary sections of CPU2 */ |
956 | ret = iwl_pcie_load_cpu_sections_8000b(trans, image, 2, | 953 | ret = iwl_pcie_load_cpu_sections_8000(trans, image, 2, |
957 | &first_ucode_section); | 954 | &first_ucode_section); |
958 | if (ret) | 955 | if (ret) |
959 | return ret; | 956 | return ret; |
960 | 957 | ||
@@ -1007,9 +1004,8 @@ static int iwl_trans_pcie_start_fw(struct iwl_trans *trans, | |||
1007 | iwl_write32(trans, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); | 1004 | iwl_write32(trans, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); |
1008 | 1005 | ||
1009 | /* Load the given image to the HW */ | 1006 | /* Load the given image to the HW */ |
1010 | if ((trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) && | 1007 | if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) |
1011 | (CSR_HW_REV_STEP(trans->hw_rev) != SILICON_A_STEP)) | 1008 | return iwl_pcie_load_given_ucode_8000(trans, fw); |
1012 | return iwl_pcie_load_given_ucode_8000b(trans, fw); | ||
1013 | else | 1009 | else |
1014 | return iwl_pcie_load_given_ucode(trans, fw); | 1010 | return iwl_pcie_load_given_ucode(trans, fw); |
1015 | } | 1011 | } |