diff options
author | Eytan Lifshitz <eytan.lifshitz@intel.com> | 2012-12-01 13:59:49 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-12-06 16:21:38 -0500 |
commit | b7998c8b4459deff3ea9c939e90812439423ab89 (patch) | |
tree | bbf1dbd2d390f9829b0344cec0b1098acbd893d0 /drivers/net/wireless/iwlwifi | |
parent | 59f547ac5ba71a01232b023cb80f1fe05739dbbf (diff) |
iwlwifi: Change define and struct names in iwl-eeprom-parse.h
Since we will have several forms of NVM (EEPROM, OTP, etc.)
and they will have different layouts, make the parsed data
more generic. This allows functional code to be independent
of a specific layout.
Also change some variables and function names from having
"eeprom" to "nvm" in their name.
Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
20 files changed, 214 insertions, 186 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/calib.c b/drivers/net/wireless/iwlwifi/dvm/calib.c index f2dd671d7dc8..de54713b680c 100644 --- a/drivers/net/wireless/iwlwifi/dvm/calib.c +++ b/drivers/net/wireless/iwlwifi/dvm/calib.c | |||
@@ -833,14 +833,14 @@ static void iwl_find_disconn_antenna(struct iwl_priv *priv, u32* average_sig, | |||
833 | * To be safe, simply mask out any chains that we know | 833 | * To be safe, simply mask out any chains that we know |
834 | * are not on the device. | 834 | * are not on the device. |
835 | */ | 835 | */ |
836 | active_chains &= priv->eeprom_data->valid_rx_ant; | 836 | active_chains &= priv->nvm_data->valid_rx_ant; |
837 | 837 | ||
838 | num_tx_chains = 0; | 838 | num_tx_chains = 0; |
839 | for (i = 0; i < NUM_RX_CHAINS; i++) { | 839 | for (i = 0; i < NUM_RX_CHAINS; i++) { |
840 | /* loops on all the bits of | 840 | /* loops on all the bits of |
841 | * priv->hw_setting.valid_tx_ant */ | 841 | * priv->hw_setting.valid_tx_ant */ |
842 | u8 ant_msk = (1 << i); | 842 | u8 ant_msk = (1 << i); |
843 | if (!(priv->eeprom_data->valid_tx_ant & ant_msk)) | 843 | if (!(priv->nvm_data->valid_tx_ant & ant_msk)) |
844 | continue; | 844 | continue; |
845 | 845 | ||
846 | num_tx_chains++; | 846 | num_tx_chains++; |
@@ -854,7 +854,7 @@ static void iwl_find_disconn_antenna(struct iwl_priv *priv, u32* average_sig, | |||
854 | * connect the first valid tx chain | 854 | * connect the first valid tx chain |
855 | */ | 855 | */ |
856 | first_chain = | 856 | first_chain = |
857 | find_first_chain(priv->eeprom_data->valid_tx_ant); | 857 | find_first_chain(priv->nvm_data->valid_tx_ant); |
858 | data->disconn_array[first_chain] = 0; | 858 | data->disconn_array[first_chain] = 0; |
859 | active_chains |= BIT(first_chain); | 859 | active_chains |= BIT(first_chain); |
860 | IWL_DEBUG_CALIB(priv, | 860 | IWL_DEBUG_CALIB(priv, |
@@ -864,13 +864,13 @@ static void iwl_find_disconn_antenna(struct iwl_priv *priv, u32* average_sig, | |||
864 | } | 864 | } |
865 | } | 865 | } |
866 | 866 | ||
867 | if (active_chains != priv->eeprom_data->valid_rx_ant && | 867 | if (active_chains != priv->nvm_data->valid_rx_ant && |
868 | active_chains != priv->chain_noise_data.active_chains) | 868 | active_chains != priv->chain_noise_data.active_chains) |
869 | IWL_DEBUG_CALIB(priv, | 869 | IWL_DEBUG_CALIB(priv, |
870 | "Detected that not all antennas are connected! " | 870 | "Detected that not all antennas are connected! " |
871 | "Connected: %#x, valid: %#x.\n", | 871 | "Connected: %#x, valid: %#x.\n", |
872 | active_chains, | 872 | active_chains, |
873 | priv->eeprom_data->valid_rx_ant); | 873 | priv->nvm_data->valid_rx_ant); |
874 | 874 | ||
875 | /* Save for use within RXON, TX, SCAN commands, etc. */ | 875 | /* Save for use within RXON, TX, SCAN commands, etc. */ |
876 | data->active_chains = active_chains; | 876 | data->active_chains = active_chains; |
@@ -1055,7 +1055,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv) | |||
1055 | priv->cfg->bt_params->advanced_bt_coexist) { | 1055 | priv->cfg->bt_params->advanced_bt_coexist) { |
1056 | /* Disable disconnected antenna algorithm for advanced | 1056 | /* Disable disconnected antenna algorithm for advanced |
1057 | bt coex, assuming valid antennas are connected */ | 1057 | bt coex, assuming valid antennas are connected */ |
1058 | data->active_chains = priv->eeprom_data->valid_rx_ant; | 1058 | data->active_chains = priv->nvm_data->valid_rx_ant; |
1059 | for (i = 0; i < NUM_RX_CHAINS; i++) | 1059 | for (i = 0; i < NUM_RX_CHAINS; i++) |
1060 | if (!(data->active_chains & (1<<i))) | 1060 | if (!(data->active_chains & (1<<i))) |
1061 | data->disconn_array[i] = 1; | 1061 | data->disconn_array[i] = 1; |
@@ -1086,7 +1086,7 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv) | |||
1086 | 1086 | ||
1087 | iwlagn_gain_computation( | 1087 | iwlagn_gain_computation( |
1088 | priv, average_noise, | 1088 | priv, average_noise, |
1089 | find_first_chain(priv->eeprom_data->valid_rx_ant)); | 1089 | find_first_chain(priv->nvm_data->valid_rx_ant)); |
1090 | 1090 | ||
1091 | /* Some power changes may have been made during the calibration. | 1091 | /* Some power changes may have been made during the calibration. |
1092 | * Update and commit the RXON | 1092 | * Update and commit the RXON |
diff --git a/drivers/net/wireless/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/iwlwifi/dvm/debugfs.c index 769a08bca86f..5b9533eef54d 100644 --- a/drivers/net/wireless/iwlwifi/dvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/dvm/debugfs.c | |||
@@ -305,7 +305,7 @@ static ssize_t iwl_dbgfs_nvm_read(struct file *file, | |||
305 | int pos = 0, ofs = 0, buf_size = 0; | 305 | int pos = 0, ofs = 0, buf_size = 0; |
306 | const u8 *ptr; | 306 | const u8 *ptr; |
307 | char *buf; | 307 | char *buf; |
308 | u16 eeprom_ver; | 308 | u16 nvm_ver; |
309 | size_t eeprom_len = priv->eeprom_blob_size; | 309 | size_t eeprom_len = priv->eeprom_blob_size; |
310 | buf_size = 4 * eeprom_len + 256; | 310 | buf_size = 4 * eeprom_len + 256; |
311 | 311 | ||
@@ -321,9 +321,9 @@ static ssize_t iwl_dbgfs_nvm_read(struct file *file, | |||
321 | if (!buf) | 321 | if (!buf) |
322 | return -ENOMEM; | 322 | return -ENOMEM; |
323 | 323 | ||
324 | eeprom_ver = priv->eeprom_data->eeprom_version; | 324 | nvm_ver = priv->nvm_data->nvm_version; |
325 | pos += scnprintf(buf + pos, buf_size - pos, | 325 | pos += scnprintf(buf + pos, buf_size - pos, |
326 | "NVM version: 0x%x\n", eeprom_ver); | 326 | "NVM version: 0x%x\n", nvm_ver); |
327 | for (ofs = 0 ; ofs < eeprom_len ; ofs += 16) { | 327 | for (ofs = 0 ; ofs < eeprom_len ; ofs += 16) { |
328 | pos += scnprintf(buf + pos, buf_size - pos, "0x%.4x ", ofs); | 328 | pos += scnprintf(buf + pos, buf_size - pos, "0x%.4x ", ofs); |
329 | hex_dump_to_buffer(ptr + ofs, 16 , 16, 2, buf + pos, | 329 | hex_dump_to_buffer(ptr + ofs, 16 , 16, 2, buf + pos, |
@@ -1333,17 +1333,17 @@ static ssize_t iwl_dbgfs_ucode_tx_stats_read(struct file *file, | |||
1333 | if (tx->tx_power.ant_a || tx->tx_power.ant_b || tx->tx_power.ant_c) { | 1333 | if (tx->tx_power.ant_a || tx->tx_power.ant_b || tx->tx_power.ant_c) { |
1334 | pos += scnprintf(buf + pos, bufsz - pos, | 1334 | pos += scnprintf(buf + pos, bufsz - pos, |
1335 | "tx power: (1/2 dB step)\n"); | 1335 | "tx power: (1/2 dB step)\n"); |
1336 | if ((priv->eeprom_data->valid_tx_ant & ANT_A) && | 1336 | if ((priv->nvm_data->valid_tx_ant & ANT_A) && |
1337 | tx->tx_power.ant_a) | 1337 | tx->tx_power.ant_a) |
1338 | pos += scnprintf(buf + pos, bufsz - pos, | 1338 | pos += scnprintf(buf + pos, bufsz - pos, |
1339 | fmt_hex, "antenna A:", | 1339 | fmt_hex, "antenna A:", |
1340 | tx->tx_power.ant_a); | 1340 | tx->tx_power.ant_a); |
1341 | if ((priv->eeprom_data->valid_tx_ant & ANT_B) && | 1341 | if ((priv->nvm_data->valid_tx_ant & ANT_B) && |
1342 | tx->tx_power.ant_b) | 1342 | tx->tx_power.ant_b) |
1343 | pos += scnprintf(buf + pos, bufsz - pos, | 1343 | pos += scnprintf(buf + pos, bufsz - pos, |
1344 | fmt_hex, "antenna B:", | 1344 | fmt_hex, "antenna B:", |
1345 | tx->tx_power.ant_b); | 1345 | tx->tx_power.ant_b); |
1346 | if ((priv->eeprom_data->valid_tx_ant & ANT_C) && | 1346 | if ((priv->nvm_data->valid_tx_ant & ANT_C) && |
1347 | tx->tx_power.ant_c) | 1347 | tx->tx_power.ant_c) |
1348 | pos += scnprintf(buf + pos, bufsz - pos, | 1348 | pos += scnprintf(buf + pos, bufsz - pos, |
1349 | fmt_hex, "antenna C:", | 1349 | fmt_hex, "antenna C:", |
diff --git a/drivers/net/wireless/iwlwifi/dvm/dev.h b/drivers/net/wireless/iwlwifi/dvm/dev.h index 8141f91c3725..fce0f4376fe0 100644 --- a/drivers/net/wireless/iwlwifi/dvm/dev.h +++ b/drivers/net/wireless/iwlwifi/dvm/dev.h | |||
@@ -844,7 +844,7 @@ struct iwl_priv { | |||
844 | void *wowlan_sram; | 844 | void *wowlan_sram; |
845 | #endif /* CONFIG_IWLWIFI_DEBUGFS */ | 845 | #endif /* CONFIG_IWLWIFI_DEBUGFS */ |
846 | 846 | ||
847 | struct iwl_eeprom_data *eeprom_data; | 847 | struct iwl_nvm_data *nvm_data; |
848 | /* eeprom blob for debugfs/testmode */ | 848 | /* eeprom blob for debugfs/testmode */ |
849 | u8 *eeprom_blob; | 849 | u8 *eeprom_blob; |
850 | size_t eeprom_blob_size; | 850 | size_t eeprom_blob_size; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/devices.c b/drivers/net/wireless/iwlwifi/dvm/devices.c index 349c205d5f62..f837912e4626 100644 --- a/drivers/net/wireless/iwlwifi/dvm/devices.c +++ b/drivers/net/wireless/iwlwifi/dvm/devices.c | |||
@@ -305,8 +305,8 @@ static s32 iwl_temp_calib_to_offset(struct iwl_priv *priv) | |||
305 | { | 305 | { |
306 | u16 temperature, voltage; | 306 | u16 temperature, voltage; |
307 | 307 | ||
308 | temperature = le16_to_cpu(priv->eeprom_data->kelvin_temperature); | 308 | temperature = le16_to_cpu(priv->nvm_data->kelvin_temperature); |
309 | voltage = le16_to_cpu(priv->eeprom_data->kelvin_voltage); | 309 | voltage = le16_to_cpu(priv->nvm_data->kelvin_voltage); |
310 | 310 | ||
311 | /* offset = temp - volt / coeff */ | 311 | /* offset = temp - volt / coeff */ |
312 | return (s32)(temperature - | 312 | return (s32)(temperature - |
@@ -460,13 +460,13 @@ static void iwl6000_nic_config(struct iwl_priv *priv) | |||
460 | break; | 460 | break; |
461 | case IWL_DEVICE_FAMILY_6050: | 461 | case IWL_DEVICE_FAMILY_6050: |
462 | /* Indicate calibration version to uCode. */ | 462 | /* Indicate calibration version to uCode. */ |
463 | if (priv->eeprom_data->calib_version >= 6) | 463 | if (priv->nvm_data->calib_version >= 6) |
464 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, | 464 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, |
465 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | 465 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); |
466 | break; | 466 | break; |
467 | case IWL_DEVICE_FAMILY_6150: | 467 | case IWL_DEVICE_FAMILY_6150: |
468 | /* Indicate calibration version to uCode. */ | 468 | /* Indicate calibration version to uCode. */ |
469 | if (priv->eeprom_data->calib_version >= 6) | 469 | if (priv->nvm_data->calib_version >= 6) |
470 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, | 470 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, |
471 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | 471 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); |
472 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, | 472 | iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG, |
diff --git a/drivers/net/wireless/iwlwifi/dvm/lib.c b/drivers/net/wireless/iwlwifi/dvm/lib.c index 7e59be4b89b8..6ff46605ad4f 100644 --- a/drivers/net/wireless/iwlwifi/dvm/lib.c +++ b/drivers/net/wireless/iwlwifi/dvm/lib.c | |||
@@ -59,7 +59,7 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) | |||
59 | /* half dBm need to multiply */ | 59 | /* half dBm need to multiply */ |
60 | tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt); | 60 | tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt); |
61 | 61 | ||
62 | if (tx_power_cmd.global_lmt > priv->eeprom_data->max_tx_pwr_half_dbm) { | 62 | if (tx_power_cmd.global_lmt > priv->nvm_data->max_tx_pwr_half_dbm) { |
63 | /* | 63 | /* |
64 | * For the newer devices which using enhanced/extend tx power | 64 | * For the newer devices which using enhanced/extend tx power |
65 | * table in EEPROM, the format is in half dBm. driver need to | 65 | * table in EEPROM, the format is in half dBm. driver need to |
@@ -72,7 +72,7 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) | |||
72 | * half-dBm format), lower the tx power based on EEPROM | 72 | * half-dBm format), lower the tx power based on EEPROM |
73 | */ | 73 | */ |
74 | tx_power_cmd.global_lmt = | 74 | tx_power_cmd.global_lmt = |
75 | priv->eeprom_data->max_tx_pwr_half_dbm; | 75 | priv->nvm_data->max_tx_pwr_half_dbm; |
76 | } | 76 | } |
77 | tx_power_cmd.flags = IWLAGN_TX_POWER_NO_CLOSED; | 77 | tx_power_cmd.flags = IWLAGN_TX_POWER_NO_CLOSED; |
78 | tx_power_cmd.srv_chan_lmt = IWLAGN_TX_POWER_AUTO; | 78 | tx_power_cmd.srv_chan_lmt = IWLAGN_TX_POWER_AUTO; |
@@ -159,7 +159,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv) | |||
159 | IWL_PAN_SCD_MGMT_MSK | | 159 | IWL_PAN_SCD_MGMT_MSK | |
160 | IWL_PAN_SCD_MULTICAST_MSK; | 160 | IWL_PAN_SCD_MULTICAST_MSK; |
161 | 161 | ||
162 | if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE) | 162 | if (priv->nvm_data->sku_cap_11n_enable) |
163 | flush_cmd.queue_control |= IWL_AGG_TX_QUEUE_MSK; | 163 | flush_cmd.queue_control |= IWL_AGG_TX_QUEUE_MSK; |
164 | 164 | ||
165 | IWL_DEBUG_INFO(priv, "queue control: 0x%x\n", | 165 | IWL_DEBUG_INFO(priv, "queue control: 0x%x\n", |
@@ -825,7 +825,7 @@ void iwlagn_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
825 | if (priv->chain_noise_data.active_chains) | 825 | if (priv->chain_noise_data.active_chains) |
826 | active_chains = priv->chain_noise_data.active_chains; | 826 | active_chains = priv->chain_noise_data.active_chains; |
827 | else | 827 | else |
828 | active_chains = priv->eeprom_data->valid_rx_ant; | 828 | active_chains = priv->nvm_data->valid_rx_ant; |
829 | 829 | ||
830 | if (priv->cfg->bt_params && | 830 | if (priv->cfg->bt_params && |
831 | priv->cfg->bt_params->advanced_bt_coexist && | 831 | priv->cfg->bt_params->advanced_bt_coexist && |
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c index a275eb902b7d..5b0877a043a9 100644 --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c | |||
@@ -164,7 +164,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
164 | hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF; | 164 | hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF; |
165 | */ | 165 | */ |
166 | 166 | ||
167 | if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE) | 167 | if (priv->nvm_data->sku_cap_11n_enable) |
168 | hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | | 168 | hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS | |
169 | IEEE80211_HW_SUPPORTS_STATIC_SMPS; | 169 | IEEE80211_HW_SUPPORTS_STATIC_SMPS; |
170 | 170 | ||
@@ -242,12 +242,12 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
242 | 242 | ||
243 | hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; | 243 | hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; |
244 | 244 | ||
245 | if (priv->eeprom_data->bands[IEEE80211_BAND_2GHZ].n_channels) | 245 | if (priv->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels) |
246 | priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 246 | priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = |
247 | &priv->eeprom_data->bands[IEEE80211_BAND_2GHZ]; | 247 | &priv->nvm_data->bands[IEEE80211_BAND_2GHZ]; |
248 | if (priv->eeprom_data->bands[IEEE80211_BAND_5GHZ].n_channels) | 248 | if (priv->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels) |
249 | priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 249 | priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = |
250 | &priv->eeprom_data->bands[IEEE80211_BAND_5GHZ]; | 250 | &priv->nvm_data->bands[IEEE80211_BAND_5GHZ]; |
251 | 251 | ||
252 | hw->wiphy->hw_version = priv->trans->hw_id; | 252 | hw->wiphy->hw_version = priv->trans->hw_id; |
253 | 253 | ||
@@ -654,7 +654,7 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, | |||
654 | IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n", | 654 | IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n", |
655 | sta->addr, tid); | 655 | sta->addr, tid); |
656 | 656 | ||
657 | if (!(priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE)) | 657 | if (!(priv->nvm_data->sku_cap_11n_enable)) |
658 | return -EACCES; | 658 | return -EACCES; |
659 | 659 | ||
660 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 660 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c index ac2681cd9b3f..8f11198eb83c 100644 --- a/drivers/net/wireless/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/iwlwifi/dvm/main.c | |||
@@ -185,7 +185,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv) | |||
185 | rate = info->control.rates[0].idx; | 185 | rate = info->control.rates[0].idx; |
186 | 186 | ||
187 | priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant, | 187 | priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant, |
188 | priv->eeprom_data->valid_tx_ant); | 188 | priv->nvm_data->valid_tx_ant); |
189 | rate_flags = iwl_ant_idx_to_flags(priv->mgmt_tx_ant); | 189 | rate_flags = iwl_ant_idx_to_flags(priv->mgmt_tx_ant); |
190 | 190 | ||
191 | /* In mac80211, rates for 5 GHz start at 0 */ | 191 | /* In mac80211, rates for 5 GHz start at 0 */ |
@@ -776,7 +776,7 @@ int iwl_alive_start(struct iwl_priv *priv) | |||
776 | ieee80211_wake_queues(priv->hw); | 776 | ieee80211_wake_queues(priv->hw); |
777 | 777 | ||
778 | /* Configure Tx antenna selection based on H/W config */ | 778 | /* Configure Tx antenna selection based on H/W config */ |
779 | iwlagn_send_tx_ant_config(priv, priv->eeprom_data->valid_tx_ant); | 779 | iwlagn_send_tx_ant_config(priv, priv->nvm_data->valid_tx_ant); |
780 | 780 | ||
781 | if (iwl_is_associated_ctx(ctx) && !priv->wowlan) { | 781 | if (iwl_is_associated_ctx(ctx) && !priv->wowlan) { |
782 | struct iwl_rxon_cmd *active_rxon = | 782 | struct iwl_rxon_cmd *active_rxon = |
@@ -1191,30 +1191,38 @@ static void iwl_option_config(struct iwl_priv *priv) | |||
1191 | 1191 | ||
1192 | static int iwl_eeprom_init_hw_params(struct iwl_priv *priv) | 1192 | static int iwl_eeprom_init_hw_params(struct iwl_priv *priv) |
1193 | { | 1193 | { |
1194 | if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE && | 1194 | struct iwl_nvm_data *data = priv->nvm_data; |
1195 | char *debug_msg; | ||
1196 | |||
1197 | if (data->sku_cap_11n_enable && | ||
1195 | !priv->cfg->ht_params) { | 1198 | !priv->cfg->ht_params) { |
1196 | IWL_ERR(priv, "Invalid 11n configuration\n"); | 1199 | IWL_ERR(priv, "Invalid 11n configuration\n"); |
1197 | return -EINVAL; | 1200 | return -EINVAL; |
1198 | } | 1201 | } |
1199 | 1202 | ||
1200 | if (!priv->eeprom_data->sku) { | 1203 | if (!data->sku_cap_11n_enable && !data->sku_cap_band_24GHz_enable && |
1204 | !data->sku_cap_band_52GHz_enable) { | ||
1201 | IWL_ERR(priv, "Invalid device sku\n"); | 1205 | IWL_ERR(priv, "Invalid device sku\n"); |
1202 | return -EINVAL; | 1206 | return -EINVAL; |
1203 | } | 1207 | } |
1204 | 1208 | ||
1205 | IWL_DEBUG_INFO(priv, "Device SKU: 0x%X\n", priv->eeprom_data->sku); | 1209 | debug_msg = "Device SKU: 24GHz %s %s, 52GHz %s %s, 11.n %s %s\n"; |
1210 | IWL_DEBUG_INFO(priv, debug_msg, | ||
1211 | data->sku_cap_band_24GHz_enable ? "" : "NOT", "enabled", | ||
1212 | data->sku_cap_band_52GHz_enable ? "" : "NOT", "enabled", | ||
1213 | data->sku_cap_11n_enable ? "" : "NOT", "enabled"); | ||
1206 | 1214 | ||
1207 | priv->hw_params.tx_chains_num = | 1215 | priv->hw_params.tx_chains_num = |
1208 | num_of_ant(priv->eeprom_data->valid_tx_ant); | 1216 | num_of_ant(data->valid_tx_ant); |
1209 | if (priv->cfg->rx_with_siso_diversity) | 1217 | if (priv->cfg->rx_with_siso_diversity) |
1210 | priv->hw_params.rx_chains_num = 1; | 1218 | priv->hw_params.rx_chains_num = 1; |
1211 | else | 1219 | else |
1212 | priv->hw_params.rx_chains_num = | 1220 | priv->hw_params.rx_chains_num = |
1213 | num_of_ant(priv->eeprom_data->valid_rx_ant); | 1221 | num_of_ant(data->valid_rx_ant); |
1214 | 1222 | ||
1215 | IWL_DEBUG_INFO(priv, "Valid Tx ant: 0x%X, Valid Rx ant: 0x%X\n", | 1223 | IWL_DEBUG_INFO(priv, "Valid Tx ant: 0x%X, Valid Rx ant: 0x%X\n", |
1216 | priv->eeprom_data->valid_tx_ant, | 1224 | data->valid_tx_ant, |
1217 | priv->eeprom_data->valid_rx_ant); | 1225 | data->valid_rx_ant); |
1218 | 1226 | ||
1219 | return 0; | 1227 | return 0; |
1220 | } | 1228 | } |
@@ -1374,24 +1382,24 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1374 | /* Reset chip to save power until we load uCode during "up". */ | 1382 | /* Reset chip to save power until we load uCode during "up". */ |
1375 | iwl_trans_stop_hw(priv->trans, false); | 1383 | iwl_trans_stop_hw(priv->trans, false); |
1376 | 1384 | ||
1377 | priv->eeprom_data = iwl_parse_eeprom_data(priv->trans->dev, priv->cfg, | 1385 | priv->nvm_data = iwl_parse_eeprom_data(priv->trans->dev, priv->cfg, |
1378 | priv->eeprom_blob, | 1386 | priv->eeprom_blob, |
1379 | priv->eeprom_blob_size); | 1387 | priv->eeprom_blob_size); |
1380 | if (!priv->eeprom_data) | 1388 | if (!priv->nvm_data) |
1381 | goto out_free_eeprom_blob; | 1389 | goto out_free_eeprom_blob; |
1382 | 1390 | ||
1383 | if (iwl_eeprom_check_version(priv->eeprom_data, priv->trans)) | 1391 | if (iwl_nvm_check_version(priv->nvm_data, priv->trans)) |
1384 | goto out_free_eeprom; | 1392 | goto out_free_eeprom; |
1385 | 1393 | ||
1386 | if (iwl_eeprom_init_hw_params(priv)) | 1394 | if (iwl_eeprom_init_hw_params(priv)) |
1387 | goto out_free_eeprom; | 1395 | goto out_free_eeprom; |
1388 | 1396 | ||
1389 | /* extract MAC Address */ | 1397 | /* extract MAC Address */ |
1390 | memcpy(priv->addresses[0].addr, priv->eeprom_data->hw_addr, ETH_ALEN); | 1398 | memcpy(priv->addresses[0].addr, priv->nvm_data->hw_addr, ETH_ALEN); |
1391 | IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->addresses[0].addr); | 1399 | IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->addresses[0].addr); |
1392 | priv->hw->wiphy->addresses = priv->addresses; | 1400 | priv->hw->wiphy->addresses = priv->addresses; |
1393 | priv->hw->wiphy->n_addresses = 1; | 1401 | priv->hw->wiphy->n_addresses = 1; |
1394 | num_mac = priv->eeprom_data->n_hw_addrs; | 1402 | num_mac = priv->nvm_data->n_hw_addrs; |
1395 | if (num_mac > 1) { | 1403 | if (num_mac > 1) { |
1396 | memcpy(priv->addresses[1].addr, priv->addresses[0].addr, | 1404 | memcpy(priv->addresses[1].addr, priv->addresses[0].addr, |
1397 | ETH_ALEN); | 1405 | ETH_ALEN); |
@@ -1404,7 +1412,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1404 | ************************/ | 1412 | ************************/ |
1405 | iwl_set_hw_params(priv); | 1413 | iwl_set_hw_params(priv); |
1406 | 1414 | ||
1407 | if (!(priv->eeprom_data->sku & EEPROM_SKU_CAP_IPAN_ENABLE)) { | 1415 | if (!(priv->nvm_data->sku_cap_ipan_enable)) { |
1408 | IWL_DEBUG_INFO(priv, "Your EEPROM disabled PAN"); | 1416 | IWL_DEBUG_INFO(priv, "Your EEPROM disabled PAN"); |
1409 | ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN; | 1417 | ucode_flags &= ~IWL_UCODE_TLV_FLAGS_PAN; |
1410 | /* | 1418 | /* |
@@ -1486,7 +1494,7 @@ out_destroy_workqueue: | |||
1486 | out_free_eeprom_blob: | 1494 | out_free_eeprom_blob: |
1487 | kfree(priv->eeprom_blob); | 1495 | kfree(priv->eeprom_blob); |
1488 | out_free_eeprom: | 1496 | out_free_eeprom: |
1489 | iwl_free_eeprom_data(priv->eeprom_data); | 1497 | iwl_free_nvm_data(priv->nvm_data); |
1490 | out_free_hw: | 1498 | out_free_hw: |
1491 | ieee80211_free_hw(priv->hw); | 1499 | ieee80211_free_hw(priv->hw); |
1492 | out: | 1500 | out: |
@@ -1506,7 +1514,7 @@ static void iwl_op_mode_dvm_stop(struct iwl_op_mode *op_mode) | |||
1506 | iwl_tt_exit(priv); | 1514 | iwl_tt_exit(priv); |
1507 | 1515 | ||
1508 | kfree(priv->eeprom_blob); | 1516 | kfree(priv->eeprom_blob); |
1509 | iwl_free_eeprom_data(priv->eeprom_data); | 1517 | iwl_free_nvm_data(priv->nvm_data); |
1510 | 1518 | ||
1511 | /*netif_stop_queue(dev); */ | 1519 | /*netif_stop_queue(dev); */ |
1512 | flush_workqueue(priv->workqueue); | 1520 | flush_workqueue(priv->workqueue); |
@@ -1980,7 +1988,6 @@ static void iwl_cmd_queue_full(struct iwl_op_mode *op_mode) | |||
1980 | static void iwl_nic_config(struct iwl_op_mode *op_mode) | 1988 | static void iwl_nic_config(struct iwl_op_mode *op_mode) |
1981 | { | 1989 | { |
1982 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); | 1990 | struct iwl_priv *priv = IWL_OP_MODE_GET_DVM(op_mode); |
1983 | u16 radio_cfg = priv->eeprom_data->radio_cfg; | ||
1984 | 1991 | ||
1985 | /* SKU Control */ | 1992 | /* SKU Control */ |
1986 | iwl_set_bits_mask(priv->trans, CSR_HW_IF_CONFIG_REG, | 1993 | iwl_set_bits_mask(priv->trans, CSR_HW_IF_CONFIG_REG, |
@@ -1992,13 +1999,13 @@ static void iwl_nic_config(struct iwl_op_mode *op_mode) | |||
1992 | CSR_HW_IF_CONFIG_REG_POS_MAC_DASH)); | 1999 | CSR_HW_IF_CONFIG_REG_POS_MAC_DASH)); |
1993 | 2000 | ||
1994 | /* write radio config values to register */ | 2001 | /* write radio config values to register */ |
1995 | if (EEPROM_RF_CFG_TYPE_MSK(radio_cfg) <= EEPROM_RF_CONFIG_TYPE_MAX) { | 2002 | if (priv->nvm_data->radio_cfg_type <= EEPROM_RF_CONFIG_TYPE_MAX) { |
1996 | u32 reg_val = | 2003 | u32 reg_val = |
1997 | EEPROM_RF_CFG_TYPE_MSK(radio_cfg) << | 2004 | priv->nvm_data->radio_cfg_type << |
1998 | CSR_HW_IF_CONFIG_REG_POS_PHY_TYPE | | 2005 | CSR_HW_IF_CONFIG_REG_POS_PHY_TYPE | |
1999 | EEPROM_RF_CFG_STEP_MSK(radio_cfg) << | 2006 | priv->nvm_data->radio_cfg_step << |
2000 | CSR_HW_IF_CONFIG_REG_POS_PHY_STEP | | 2007 | CSR_HW_IF_CONFIG_REG_POS_PHY_STEP | |
2001 | EEPROM_RF_CFG_DASH_MSK(radio_cfg) << | 2008 | priv->nvm_data->radio_cfg_dash << |
2002 | CSR_HW_IF_CONFIG_REG_POS_PHY_DASH; | 2009 | CSR_HW_IF_CONFIG_REG_POS_PHY_DASH; |
2003 | 2010 | ||
2004 | iwl_set_bits_mask(priv->trans, CSR_HW_IF_CONFIG_REG, | 2011 | iwl_set_bits_mask(priv->trans, CSR_HW_IF_CONFIG_REG, |
@@ -2007,9 +2014,9 @@ static void iwl_nic_config(struct iwl_op_mode *op_mode) | |||
2007 | CSR_HW_IF_CONFIG_REG_MSK_PHY_DASH, reg_val); | 2014 | CSR_HW_IF_CONFIG_REG_MSK_PHY_DASH, reg_val); |
2008 | 2015 | ||
2009 | IWL_INFO(priv, "Radio type=0x%x-0x%x-0x%x\n", | 2016 | IWL_INFO(priv, "Radio type=0x%x-0x%x-0x%x\n", |
2010 | EEPROM_RF_CFG_TYPE_MSK(radio_cfg), | 2017 | priv->nvm_data->radio_cfg_type, |
2011 | EEPROM_RF_CFG_STEP_MSK(radio_cfg), | 2018 | priv->nvm_data->radio_cfg_step, |
2012 | EEPROM_RF_CFG_DASH_MSK(radio_cfg)); | 2019 | priv->nvm_data->radio_cfg_dash); |
2013 | } else { | 2020 | } else { |
2014 | WARN_ON(1); | 2021 | WARN_ON(1); |
2015 | } | 2022 | } |
diff --git a/drivers/net/wireless/iwlwifi/dvm/rs.c b/drivers/net/wireless/iwlwifi/dvm/rs.c index a82f46c10f5e..f3dd0da60d8a 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rs.c +++ b/drivers/net/wireless/iwlwifi/dvm/rs.c | |||
@@ -820,7 +820,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta, | |||
820 | 820 | ||
821 | if (num_of_ant(tbl->ant_type) > 1) | 821 | if (num_of_ant(tbl->ant_type) > 1) |
822 | tbl->ant_type = | 822 | tbl->ant_type = |
823 | first_antenna(priv->eeprom_data->valid_tx_ant); | 823 | first_antenna(priv->nvm_data->valid_tx_ant); |
824 | 824 | ||
825 | tbl->is_ht40 = 0; | 825 | tbl->is_ht40 = 0; |
826 | tbl->is_SGI = 0; | 826 | tbl->is_SGI = 0; |
@@ -1448,7 +1448,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv, | |||
1448 | u32 sz = (sizeof(struct iwl_scale_tbl_info) - | 1448 | u32 sz = (sizeof(struct iwl_scale_tbl_info) - |
1449 | (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); | 1449 | (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); |
1450 | u8 start_action; | 1450 | u8 start_action; |
1451 | u8 valid_tx_ant = priv->eeprom_data->valid_tx_ant; | 1451 | u8 valid_tx_ant = priv->nvm_data->valid_tx_ant; |
1452 | u8 tx_chains_num = priv->hw_params.tx_chains_num; | 1452 | u8 tx_chains_num = priv->hw_params.tx_chains_num; |
1453 | int ret = 0; | 1453 | int ret = 0; |
1454 | u8 update_search_tbl_counter = 0; | 1454 | u8 update_search_tbl_counter = 0; |
@@ -1466,7 +1466,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv, | |||
1466 | case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS: | 1466 | case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS: |
1467 | /* avoid antenna B and MIMO */ | 1467 | /* avoid antenna B and MIMO */ |
1468 | valid_tx_ant = | 1468 | valid_tx_ant = |
1469 | first_antenna(priv->eeprom_data->valid_tx_ant); | 1469 | first_antenna(priv->nvm_data->valid_tx_ant); |
1470 | if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2 && | 1470 | if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2 && |
1471 | tbl->action != IWL_LEGACY_SWITCH_SISO) | 1471 | tbl->action != IWL_LEGACY_SWITCH_SISO) |
1472 | tbl->action = IWL_LEGACY_SWITCH_SISO; | 1472 | tbl->action = IWL_LEGACY_SWITCH_SISO; |
@@ -1490,7 +1490,7 @@ static int rs_move_legacy_other(struct iwl_priv *priv, | |||
1490 | else if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) | 1490 | else if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) |
1491 | tbl->action = IWL_LEGACY_SWITCH_SISO; | 1491 | tbl->action = IWL_LEGACY_SWITCH_SISO; |
1492 | valid_tx_ant = | 1492 | valid_tx_ant = |
1493 | first_antenna(priv->eeprom_data->valid_tx_ant); | 1493 | first_antenna(priv->nvm_data->valid_tx_ant); |
1494 | } | 1494 | } |
1495 | 1495 | ||
1496 | start_action = tbl->action; | 1496 | start_action = tbl->action; |
@@ -1624,7 +1624,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv, | |||
1624 | u32 sz = (sizeof(struct iwl_scale_tbl_info) - | 1624 | u32 sz = (sizeof(struct iwl_scale_tbl_info) - |
1625 | (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); | 1625 | (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); |
1626 | u8 start_action; | 1626 | u8 start_action; |
1627 | u8 valid_tx_ant = priv->eeprom_data->valid_tx_ant; | 1627 | u8 valid_tx_ant = priv->nvm_data->valid_tx_ant; |
1628 | u8 tx_chains_num = priv->hw_params.tx_chains_num; | 1628 | u8 tx_chains_num = priv->hw_params.tx_chains_num; |
1629 | u8 update_search_tbl_counter = 0; | 1629 | u8 update_search_tbl_counter = 0; |
1630 | int ret; | 1630 | int ret; |
@@ -1642,7 +1642,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv, | |||
1642 | case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS: | 1642 | case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS: |
1643 | /* avoid antenna B and MIMO */ | 1643 | /* avoid antenna B and MIMO */ |
1644 | valid_tx_ant = | 1644 | valid_tx_ant = |
1645 | first_antenna(priv->eeprom_data->valid_tx_ant); | 1645 | first_antenna(priv->nvm_data->valid_tx_ant); |
1646 | if (tbl->action != IWL_SISO_SWITCH_ANTENNA1) | 1646 | if (tbl->action != IWL_SISO_SWITCH_ANTENNA1) |
1647 | tbl->action = IWL_SISO_SWITCH_ANTENNA1; | 1647 | tbl->action = IWL_SISO_SWITCH_ANTENNA1; |
1648 | break; | 1648 | break; |
@@ -1660,7 +1660,7 @@ static int rs_move_siso_to_other(struct iwl_priv *priv, | |||
1660 | /* configure as 1x1 if bt full concurrency */ | 1660 | /* configure as 1x1 if bt full concurrency */ |
1661 | if (priv->bt_full_concurrent) { | 1661 | if (priv->bt_full_concurrent) { |
1662 | valid_tx_ant = | 1662 | valid_tx_ant = |
1663 | first_antenna(priv->eeprom_data->valid_tx_ant); | 1663 | first_antenna(priv->nvm_data->valid_tx_ant); |
1664 | if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) | 1664 | if (tbl->action >= IWL_LEGACY_SWITCH_ANTENNA2) |
1665 | tbl->action = IWL_SISO_SWITCH_ANTENNA1; | 1665 | tbl->action = IWL_SISO_SWITCH_ANTENNA1; |
1666 | } | 1666 | } |
@@ -1796,7 +1796,7 @@ static int rs_move_mimo2_to_other(struct iwl_priv *priv, | |||
1796 | u32 sz = (sizeof(struct iwl_scale_tbl_info) - | 1796 | u32 sz = (sizeof(struct iwl_scale_tbl_info) - |
1797 | (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); | 1797 | (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); |
1798 | u8 start_action; | 1798 | u8 start_action; |
1799 | u8 valid_tx_ant = priv->eeprom_data->valid_tx_ant; | 1799 | u8 valid_tx_ant = priv->nvm_data->valid_tx_ant; |
1800 | u8 tx_chains_num = priv->hw_params.tx_chains_num; | 1800 | u8 tx_chains_num = priv->hw_params.tx_chains_num; |
1801 | u8 update_search_tbl_counter = 0; | 1801 | u8 update_search_tbl_counter = 0; |
1802 | int ret; | 1802 | int ret; |
@@ -1966,7 +1966,7 @@ static int rs_move_mimo3_to_other(struct iwl_priv *priv, | |||
1966 | u32 sz = (sizeof(struct iwl_scale_tbl_info) - | 1966 | u32 sz = (sizeof(struct iwl_scale_tbl_info) - |
1967 | (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); | 1967 | (sizeof(struct iwl_rate_scale_data) * IWL_RATE_COUNT)); |
1968 | u8 start_action; | 1968 | u8 start_action; |
1969 | u8 valid_tx_ant = priv->eeprom_data->valid_tx_ant; | 1969 | u8 valid_tx_ant = priv->nvm_data->valid_tx_ant; |
1970 | u8 tx_chains_num = priv->hw_params.tx_chains_num; | 1970 | u8 tx_chains_num = priv->hw_params.tx_chains_num; |
1971 | int ret; | 1971 | int ret; |
1972 | u8 update_search_tbl_counter = 0; | 1972 | u8 update_search_tbl_counter = 0; |
@@ -2700,7 +2700,7 @@ static void rs_initialize_lq(struct iwl_priv *priv, | |||
2700 | 2700 | ||
2701 | i = lq_sta->last_txrate_idx; | 2701 | i = lq_sta->last_txrate_idx; |
2702 | 2702 | ||
2703 | valid_tx_ant = priv->eeprom_data->valid_tx_ant; | 2703 | valid_tx_ant = priv->nvm_data->valid_tx_ant; |
2704 | 2704 | ||
2705 | if (!lq_sta->search_better_tbl) | 2705 | if (!lq_sta->search_better_tbl) |
2706 | active_tbl = lq_sta->active_tbl; | 2706 | active_tbl = lq_sta->active_tbl; |
@@ -2894,15 +2894,15 @@ void iwl_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta, u8 sta_i | |||
2894 | 2894 | ||
2895 | /* These values will be overridden later */ | 2895 | /* These values will be overridden later */ |
2896 | lq_sta->lq.general_params.single_stream_ant_msk = | 2896 | lq_sta->lq.general_params.single_stream_ant_msk = |
2897 | first_antenna(priv->eeprom_data->valid_tx_ant); | 2897 | first_antenna(priv->nvm_data->valid_tx_ant); |
2898 | lq_sta->lq.general_params.dual_stream_ant_msk = | 2898 | lq_sta->lq.general_params.dual_stream_ant_msk = |
2899 | priv->eeprom_data->valid_tx_ant & | 2899 | priv->nvm_data->valid_tx_ant & |
2900 | ~first_antenna(priv->eeprom_data->valid_tx_ant); | 2900 | ~first_antenna(priv->nvm_data->valid_tx_ant); |
2901 | if (!lq_sta->lq.general_params.dual_stream_ant_msk) { | 2901 | if (!lq_sta->lq.general_params.dual_stream_ant_msk) { |
2902 | lq_sta->lq.general_params.dual_stream_ant_msk = ANT_AB; | 2902 | lq_sta->lq.general_params.dual_stream_ant_msk = ANT_AB; |
2903 | } else if (num_of_ant(priv->eeprom_data->valid_tx_ant) == 2) { | 2903 | } else if (num_of_ant(priv->nvm_data->valid_tx_ant) == 2) { |
2904 | lq_sta->lq.general_params.dual_stream_ant_msk = | 2904 | lq_sta->lq.general_params.dual_stream_ant_msk = |
2905 | priv->eeprom_data->valid_tx_ant; | 2905 | priv->nvm_data->valid_tx_ant; |
2906 | } | 2906 | } |
2907 | 2907 | ||
2908 | /* as default allow aggregation for all tids */ | 2908 | /* as default allow aggregation for all tids */ |
@@ -2948,7 +2948,7 @@ static void rs_fill_link_cmd(struct iwl_priv *priv, | |||
2948 | if (priv && priv->bt_full_concurrent) { | 2948 | if (priv && priv->bt_full_concurrent) { |
2949 | /* 1x1 only */ | 2949 | /* 1x1 only */ |
2950 | tbl_type.ant_type = | 2950 | tbl_type.ant_type = |
2951 | first_antenna(priv->eeprom_data->valid_tx_ant); | 2951 | first_antenna(priv->nvm_data->valid_tx_ant); |
2952 | } | 2952 | } |
2953 | 2953 | ||
2954 | /* How many times should we repeat the initial rate? */ | 2954 | /* How many times should we repeat the initial rate? */ |
@@ -2980,7 +2980,7 @@ static void rs_fill_link_cmd(struct iwl_priv *priv, | |||
2980 | if (priv->bt_full_concurrent) | 2980 | if (priv->bt_full_concurrent) |
2981 | valid_tx_ant = ANT_A; | 2981 | valid_tx_ant = ANT_A; |
2982 | else | 2982 | else |
2983 | valid_tx_ant = priv->eeprom_data->valid_tx_ant; | 2983 | valid_tx_ant = priv->nvm_data->valid_tx_ant; |
2984 | } | 2984 | } |
2985 | 2985 | ||
2986 | /* Fill rest of rate table */ | 2986 | /* Fill rest of rate table */ |
@@ -3014,7 +3014,7 @@ static void rs_fill_link_cmd(struct iwl_priv *priv, | |||
3014 | if (priv && priv->bt_full_concurrent) { | 3014 | if (priv && priv->bt_full_concurrent) { |
3015 | /* 1x1 only */ | 3015 | /* 1x1 only */ |
3016 | tbl_type.ant_type = | 3016 | tbl_type.ant_type = |
3017 | first_antenna(priv->eeprom_data->valid_tx_ant); | 3017 | first_antenna(priv->nvm_data->valid_tx_ant); |
3018 | } | 3018 | } |
3019 | 3019 | ||
3020 | /* Indicate to uCode which entries might be MIMO. | 3020 | /* Indicate to uCode which entries might be MIMO. |
@@ -3101,7 +3101,7 @@ static void rs_dbgfs_set_mcs(struct iwl_lq_sta *lq_sta, | |||
3101 | u8 ant_sel_tx; | 3101 | u8 ant_sel_tx; |
3102 | 3102 | ||
3103 | priv = lq_sta->drv; | 3103 | priv = lq_sta->drv; |
3104 | valid_tx_ant = priv->eeprom_data->valid_tx_ant; | 3104 | valid_tx_ant = priv->nvm_data->valid_tx_ant; |
3105 | if (lq_sta->dbg_fixed_rate) { | 3105 | if (lq_sta->dbg_fixed_rate) { |
3106 | ant_sel_tx = | 3106 | ant_sel_tx = |
3107 | ((lq_sta->dbg_fixed_rate & RATE_MCS_ANT_ABC_MSK) | 3107 | ((lq_sta->dbg_fixed_rate & RATE_MCS_ANT_ABC_MSK) |
@@ -3172,9 +3172,9 @@ static ssize_t rs_sta_dbgfs_scale_table_read(struct file *file, | |||
3172 | desc += sprintf(buff+desc, "fixed rate 0x%X\n", | 3172 | desc += sprintf(buff+desc, "fixed rate 0x%X\n", |
3173 | lq_sta->dbg_fixed_rate); | 3173 | lq_sta->dbg_fixed_rate); |
3174 | desc += sprintf(buff+desc, "valid_tx_ant %s%s%s\n", | 3174 | desc += sprintf(buff+desc, "valid_tx_ant %s%s%s\n", |
3175 | (priv->eeprom_data->valid_tx_ant & ANT_A) ? "ANT_A," : "", | 3175 | (priv->nvm_data->valid_tx_ant & ANT_A) ? "ANT_A," : "", |
3176 | (priv->eeprom_data->valid_tx_ant & ANT_B) ? "ANT_B," : "", | 3176 | (priv->nvm_data->valid_tx_ant & ANT_B) ? "ANT_B," : "", |
3177 | (priv->eeprom_data->valid_tx_ant & ANT_C) ? "ANT_C" : ""); | 3177 | (priv->nvm_data->valid_tx_ant & ANT_C) ? "ANT_C" : ""); |
3178 | desc += sprintf(buff+desc, "lq type %s\n", | 3178 | desc += sprintf(buff+desc, "lq type %s\n", |
3179 | (is_legacy(tbl->lq_type)) ? "legacy" : "HT"); | 3179 | (is_legacy(tbl->lq_type)) ? "legacy" : "HT"); |
3180 | if (is_Ht(tbl->lq_type)) { | 3180 | if (is_Ht(tbl->lq_type)) { |
diff --git a/drivers/net/wireless/iwlwifi/dvm/rxon.c b/drivers/net/wireless/iwlwifi/dvm/rxon.c index 10896393e5a0..b43370d70b18 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rxon.c +++ b/drivers/net/wireless/iwlwifi/dvm/rxon.c | |||
@@ -420,10 +420,10 @@ static int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force) | |||
420 | return -EINVAL; | 420 | return -EINVAL; |
421 | } | 421 | } |
422 | 422 | ||
423 | if (tx_power > DIV_ROUND_UP(priv->eeprom_data->max_tx_pwr_half_dbm, 2)) { | 423 | if (tx_power > DIV_ROUND_UP(priv->nvm_data->max_tx_pwr_half_dbm, 2)) { |
424 | IWL_WARN(priv, | 424 | IWL_WARN(priv, |
425 | "Requested user TXPOWER %d above upper limit %d.\n", | 425 | "Requested user TXPOWER %d above upper limit %d.\n", |
426 | tx_power, priv->eeprom_data->max_tx_pwr_half_dbm); | 426 | tx_power, priv->nvm_data->max_tx_pwr_half_dbm); |
427 | return -EINVAL; | 427 | return -EINVAL; |
428 | } | 428 | } |
429 | 429 | ||
diff --git a/drivers/net/wireless/iwlwifi/dvm/scan.c b/drivers/net/wireless/iwlwifi/dvm/scan.c index bb9f6252d28f..aad5fa424a58 100644 --- a/drivers/net/wireless/iwlwifi/dvm/scan.c +++ b/drivers/net/wireless/iwlwifi/dvm/scan.c | |||
@@ -660,12 +660,12 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
660 | u16 rx_chain = 0; | 660 | u16 rx_chain = 0; |
661 | enum ieee80211_band band; | 661 | enum ieee80211_band band; |
662 | u8 n_probes = 0; | 662 | u8 n_probes = 0; |
663 | u8 rx_ant = priv->eeprom_data->valid_rx_ant; | 663 | u8 rx_ant = priv->nvm_data->valid_rx_ant; |
664 | u8 rate; | 664 | u8 rate; |
665 | bool is_active = false; | 665 | bool is_active = false; |
666 | int chan_mod; | 666 | int chan_mod; |
667 | u8 active_chains; | 667 | u8 active_chains; |
668 | u8 scan_tx_antennas = priv->eeprom_data->valid_tx_ant; | 668 | u8 scan_tx_antennas = priv->nvm_data->valid_tx_ant; |
669 | int ret; | 669 | int ret; |
670 | int scan_cmd_size = sizeof(struct iwl_scan_cmd) + | 670 | int scan_cmd_size = sizeof(struct iwl_scan_cmd) + |
671 | MAX_SCAN_CHANNEL * sizeof(struct iwl_scan_channel) + | 671 | MAX_SCAN_CHANNEL * sizeof(struct iwl_scan_channel) + |
@@ -881,7 +881,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
881 | 881 | ||
882 | /* MIMO is not used here, but value is required */ | 882 | /* MIMO is not used here, but value is required */ |
883 | rx_chain |= | 883 | rx_chain |= |
884 | priv->eeprom_data->valid_rx_ant << RXON_RX_CHAIN_VALID_POS; | 884 | priv->nvm_data->valid_rx_ant << RXON_RX_CHAIN_VALID_POS; |
885 | rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS; | 885 | rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS; |
886 | rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_SEL_POS; | 886 | rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_SEL_POS; |
887 | rx_chain |= 0x1 << RXON_RX_CHAIN_DRIVER_FORCE_POS; | 887 | rx_chain |= 0x1 << RXON_RX_CHAIN_DRIVER_FORCE_POS; |
@@ -998,7 +998,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
998 | 998 | ||
999 | void iwl_init_scan_params(struct iwl_priv *priv) | 999 | void iwl_init_scan_params(struct iwl_priv *priv) |
1000 | { | 1000 | { |
1001 | u8 ant_idx = fls(priv->eeprom_data->valid_tx_ant) - 1; | 1001 | u8 ant_idx = fls(priv->nvm_data->valid_tx_ant) - 1; |
1002 | if (!priv->scan_tx_ant[IEEE80211_BAND_5GHZ]) | 1002 | if (!priv->scan_tx_ant[IEEE80211_BAND_5GHZ]) |
1003 | priv->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx; | 1003 | priv->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx; |
1004 | if (!priv->scan_tx_ant[IEEE80211_BAND_2GHZ]) | 1004 | if (!priv->scan_tx_ant[IEEE80211_BAND_2GHZ]) |
diff --git a/drivers/net/wireless/iwlwifi/dvm/sta.c b/drivers/net/wireless/iwlwifi/dvm/sta.c index cd9b6de4273e..bdba9543c351 100644 --- a/drivers/net/wireless/iwlwifi/dvm/sta.c +++ b/drivers/net/wireless/iwlwifi/dvm/sta.c | |||
@@ -634,23 +634,23 @@ static void iwl_sta_fill_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
634 | if (r >= IWL_FIRST_CCK_RATE && r <= IWL_LAST_CCK_RATE) | 634 | if (r >= IWL_FIRST_CCK_RATE && r <= IWL_LAST_CCK_RATE) |
635 | rate_flags |= RATE_MCS_CCK_MSK; | 635 | rate_flags |= RATE_MCS_CCK_MSK; |
636 | 636 | ||
637 | rate_flags |= first_antenna(priv->eeprom_data->valid_tx_ant) << | 637 | rate_flags |= first_antenna(priv->nvm_data->valid_tx_ant) << |
638 | RATE_MCS_ANT_POS; | 638 | RATE_MCS_ANT_POS; |
639 | rate_n_flags = iwl_hw_set_rate_n_flags(iwl_rates[r].plcp, rate_flags); | 639 | rate_n_flags = iwl_hw_set_rate_n_flags(iwl_rates[r].plcp, rate_flags); |
640 | for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) | 640 | for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) |
641 | link_cmd->rs_table[i].rate_n_flags = rate_n_flags; | 641 | link_cmd->rs_table[i].rate_n_flags = rate_n_flags; |
642 | 642 | ||
643 | link_cmd->general_params.single_stream_ant_msk = | 643 | link_cmd->general_params.single_stream_ant_msk = |
644 | first_antenna(priv->eeprom_data->valid_tx_ant); | 644 | first_antenna(priv->nvm_data->valid_tx_ant); |
645 | 645 | ||
646 | link_cmd->general_params.dual_stream_ant_msk = | 646 | link_cmd->general_params.dual_stream_ant_msk = |
647 | priv->eeprom_data->valid_tx_ant & | 647 | priv->nvm_data->valid_tx_ant & |
648 | ~first_antenna(priv->eeprom_data->valid_tx_ant); | 648 | ~first_antenna(priv->nvm_data->valid_tx_ant); |
649 | if (!link_cmd->general_params.dual_stream_ant_msk) { | 649 | if (!link_cmd->general_params.dual_stream_ant_msk) { |
650 | link_cmd->general_params.dual_stream_ant_msk = ANT_AB; | 650 | link_cmd->general_params.dual_stream_ant_msk = ANT_AB; |
651 | } else if (num_of_ant(priv->eeprom_data->valid_tx_ant) == 2) { | 651 | } else if (num_of_ant(priv->nvm_data->valid_tx_ant) == 2) { |
652 | link_cmd->general_params.dual_stream_ant_msk = | 652 | link_cmd->general_params.dual_stream_ant_msk = |
653 | priv->eeprom_data->valid_tx_ant; | 653 | priv->nvm_data->valid_tx_ant; |
654 | } | 654 | } |
655 | 655 | ||
656 | link_cmd->agg_params.agg_dis_start_th = | 656 | link_cmd->agg_params.agg_dis_start_th = |
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c index 4ae031f6726b..7d6cc5dffc20 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tx.c +++ b/drivers/net/wireless/iwlwifi/dvm/tx.c | |||
@@ -188,7 +188,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | |||
188 | if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS || | 188 | if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS || |
189 | (rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY)) | 189 | (rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY)) |
190 | rate_idx = rate_lowest_index( | 190 | rate_idx = rate_lowest_index( |
191 | &priv->eeprom_data->bands[info->band], sta); | 191 | &priv->nvm_data->bands[info->band], sta); |
192 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ | 192 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ |
193 | if (info->band == IEEE80211_BAND_5GHZ) | 193 | if (info->band == IEEE80211_BAND_5GHZ) |
194 | rate_idx += IWL_FIRST_OFDM_RATE; | 194 | rate_idx += IWL_FIRST_OFDM_RATE; |
@@ -207,11 +207,11 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | |||
207 | priv->bt_full_concurrent) { | 207 | priv->bt_full_concurrent) { |
208 | /* operated as 1x1 in full concurrency mode */ | 208 | /* operated as 1x1 in full concurrency mode */ |
209 | priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant, | 209 | priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant, |
210 | first_antenna(priv->eeprom_data->valid_tx_ant)); | 210 | first_antenna(priv->nvm_data->valid_tx_ant)); |
211 | } else | 211 | } else |
212 | priv->mgmt_tx_ant = iwl_toggle_tx_ant( | 212 | priv->mgmt_tx_ant = iwl_toggle_tx_ant( |
213 | priv, priv->mgmt_tx_ant, | 213 | priv, priv->mgmt_tx_ant, |
214 | priv->eeprom_data->valid_tx_ant); | 214 | priv->nvm_data->valid_tx_ant); |
215 | rate_flags |= iwl_ant_idx_to_flags(priv->mgmt_tx_ant); | 215 | rate_flags |= iwl_ant_idx_to_flags(priv->mgmt_tx_ant); |
216 | 216 | ||
217 | /* Set the rate in the TX cmd */ | 217 | /* Set the rate in the TX cmd */ |
diff --git a/drivers/net/wireless/iwlwifi/dvm/ucode.c b/drivers/net/wireless/iwlwifi/dvm/ucode.c index 95e6d33f5159..c6467e5554f5 100644 --- a/drivers/net/wireless/iwlwifi/dvm/ucode.c +++ b/drivers/net/wireless/iwlwifi/dvm/ucode.c | |||
@@ -61,7 +61,7 @@ iwl_get_ucode_image(struct iwl_priv *priv, enum iwl_ucode_type ucode_type) | |||
61 | static int iwl_set_Xtal_calib(struct iwl_priv *priv) | 61 | static int iwl_set_Xtal_calib(struct iwl_priv *priv) |
62 | { | 62 | { |
63 | struct iwl_calib_xtal_freq_cmd cmd; | 63 | struct iwl_calib_xtal_freq_cmd cmd; |
64 | __le16 *xtal_calib = priv->eeprom_data->xtal_calib; | 64 | __le16 *xtal_calib = priv->nvm_data->xtal_calib; |
65 | 65 | ||
66 | iwl_set_calib_hdr(&cmd.hdr, IWL_PHY_CALIBRATE_CRYSTAL_FRQ_CMD); | 66 | iwl_set_calib_hdr(&cmd.hdr, IWL_PHY_CALIBRATE_CRYSTAL_FRQ_CMD); |
67 | cmd.cap_pin1 = le16_to_cpu(xtal_calib[0]); | 67 | cmd.cap_pin1 = le16_to_cpu(xtal_calib[0]); |
@@ -75,7 +75,7 @@ static int iwl_set_temperature_offset_calib(struct iwl_priv *priv) | |||
75 | 75 | ||
76 | memset(&cmd, 0, sizeof(cmd)); | 76 | memset(&cmd, 0, sizeof(cmd)); |
77 | iwl_set_calib_hdr(&cmd.hdr, IWL_PHY_CALIBRATE_TEMP_OFFSET_CMD); | 77 | iwl_set_calib_hdr(&cmd.hdr, IWL_PHY_CALIBRATE_TEMP_OFFSET_CMD); |
78 | cmd.radio_sensor_offset = priv->eeprom_data->raw_temperature; | 78 | cmd.radio_sensor_offset = priv->nvm_data->raw_temperature; |
79 | if (!(cmd.radio_sensor_offset)) | 79 | if (!(cmd.radio_sensor_offset)) |
80 | cmd.radio_sensor_offset = DEFAULT_RADIO_SENSOR_OFFSET; | 80 | cmd.radio_sensor_offset = DEFAULT_RADIO_SENSOR_OFFSET; |
81 | 81 | ||
@@ -90,14 +90,14 @@ static int iwl_set_temperature_offset_calib_v2(struct iwl_priv *priv) | |||
90 | 90 | ||
91 | memset(&cmd, 0, sizeof(cmd)); | 91 | memset(&cmd, 0, sizeof(cmd)); |
92 | iwl_set_calib_hdr(&cmd.hdr, IWL_PHY_CALIBRATE_TEMP_OFFSET_CMD); | 92 | iwl_set_calib_hdr(&cmd.hdr, IWL_PHY_CALIBRATE_TEMP_OFFSET_CMD); |
93 | cmd.radio_sensor_offset_high = priv->eeprom_data->kelvin_temperature; | 93 | cmd.radio_sensor_offset_high = priv->nvm_data->kelvin_temperature; |
94 | cmd.radio_sensor_offset_low = priv->eeprom_data->raw_temperature; | 94 | cmd.radio_sensor_offset_low = priv->nvm_data->raw_temperature; |
95 | if (!cmd.radio_sensor_offset_low) { | 95 | if (!cmd.radio_sensor_offset_low) { |
96 | IWL_DEBUG_CALIB(priv, "no info in EEPROM, use default\n"); | 96 | IWL_DEBUG_CALIB(priv, "no info in EEPROM, use default\n"); |
97 | cmd.radio_sensor_offset_low = DEFAULT_RADIO_SENSOR_OFFSET; | 97 | cmd.radio_sensor_offset_low = DEFAULT_RADIO_SENSOR_OFFSET; |
98 | cmd.radio_sensor_offset_high = DEFAULT_RADIO_SENSOR_OFFSET; | 98 | cmd.radio_sensor_offset_high = DEFAULT_RADIO_SENSOR_OFFSET; |
99 | } | 99 | } |
100 | cmd.burntVoltageRef = priv->eeprom_data->calib_voltage; | 100 | cmd.burntVoltageRef = priv->nvm_data->calib_voltage; |
101 | 101 | ||
102 | IWL_DEBUG_CALIB(priv, "Radio sensor offset high: %d\n", | 102 | IWL_DEBUG_CALIB(priv, "Radio sensor offset high: %d\n", |
103 | le16_to_cpu(cmd.radio_sensor_offset_high)); | 103 | le16_to_cpu(cmd.radio_sensor_offset_high)); |
@@ -257,7 +257,7 @@ static int iwl_alive_notify(struct iwl_priv *priv) | |||
257 | iwl_trans_fw_alive(priv->trans, 0); | 257 | iwl_trans_fw_alive(priv->trans, 0); |
258 | 258 | ||
259 | if (priv->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN && | 259 | if (priv->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_PAN && |
260 | priv->eeprom_data->sku & EEPROM_SKU_CAP_IPAN_ENABLE) { | 260 | priv->nvm_data->sku_cap_ipan_enable) { |
261 | n_queues = ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo); | 261 | n_queues = ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo); |
262 | queue_to_txf = iwlagn_ipan_queue_to_tx_fifo; | 262 | queue_to_txf = iwlagn_ipan_queue_to_tx_fifo; |
263 | } else { | 263 | } else { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h index 196266aa5a9d..864219d2136a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/iwlwifi/iwl-config.h | |||
@@ -226,8 +226,8 @@ struct iwl_eeprom_params { | |||
226 | * @max_data_size: The maximal length of the fw data section | 226 | * @max_data_size: The maximal length of the fw data section |
227 | * @valid_tx_ant: valid transmit antenna | 227 | * @valid_tx_ant: valid transmit antenna |
228 | * @valid_rx_ant: valid receive antenna | 228 | * @valid_rx_ant: valid receive antenna |
229 | * @eeprom_ver: EEPROM version | 229 | * @nvm_ver: NVM version |
230 | * @eeprom_calib_ver: EEPROM calibration version | 230 | * @nvm_calib_ver: NVM calibration version |
231 | * @lib: pointer to the lib ops | 231 | * @lib: pointer to the lib ops |
232 | * @base_params: pointer to basic parameters | 232 | * @base_params: pointer to basic parameters |
233 | * @ht_params: point to ht patameters | 233 | * @ht_params: point to ht patameters |
@@ -257,8 +257,8 @@ struct iwl_cfg { | |||
257 | const u32 max_inst_size; | 257 | const u32 max_inst_size; |
258 | u8 valid_tx_ant; | 258 | u8 valid_tx_ant; |
259 | u8 valid_rx_ant; | 259 | u8 valid_rx_ant; |
260 | u16 eeprom_ver; | 260 | u16 nvm_ver; |
261 | u16 eeprom_calib_ver; | 261 | u16 nvm_calib_ver; |
262 | /* params not likely to change within a device family */ | 262 | /* params not likely to change within a device family */ |
263 | const struct iwl_base_params *base_params; | 263 | const struct iwl_base_params *base_params; |
264 | /* params likely to change within a device family */ | 264 | /* params likely to change within a device family */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c b/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c index 4a9dc9629efe..471986690cf0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c | |||
@@ -116,6 +116,24 @@ struct iwl_eeprom_calib_hdr { | |||
116 | #define EEPROM_KELVIN_TEMPERATURE ((2*0x12A) | EEPROM_CALIB_ALL) | 116 | #define EEPROM_KELVIN_TEMPERATURE ((2*0x12A) | EEPROM_CALIB_ALL) |
117 | #define EEPROM_RAW_TEMPERATURE ((2*0x12B) | EEPROM_CALIB_ALL) | 117 | #define EEPROM_RAW_TEMPERATURE ((2*0x12B) | EEPROM_CALIB_ALL) |
118 | 118 | ||
119 | /* SKU Capabilities (actual values from EEPROM definition) */ | ||
120 | enum eeprom_sku_bits { | ||
121 | EEPROM_SKU_CAP_BAND_24GHZ = BIT(4), | ||
122 | EEPROM_SKU_CAP_BAND_52GHZ = BIT(5), | ||
123 | EEPROM_SKU_CAP_11N_ENABLE = BIT(6), | ||
124 | EEPROM_SKU_CAP_AMT_ENABLE = BIT(7), | ||
125 | EEPROM_SKU_CAP_IPAN_ENABLE = BIT(8) | ||
126 | }; | ||
127 | |||
128 | /* radio config bits (actual values from EEPROM definition) */ | ||
129 | #define EEPROM_RF_CFG_TYPE_MSK(x) (x & 0x3) /* bits 0-1 */ | ||
130 | #define EEPROM_RF_CFG_STEP_MSK(x) ((x >> 2) & 0x3) /* bits 2-3 */ | ||
131 | #define EEPROM_RF_CFG_DASH_MSK(x) ((x >> 4) & 0x3) /* bits 4-5 */ | ||
132 | #define EEPROM_RF_CFG_PNUM_MSK(x) ((x >> 6) & 0x3) /* bits 6-7 */ | ||
133 | #define EEPROM_RF_CFG_TX_ANT_MSK(x) ((x >> 8) & 0xF) /* bits 8-11 */ | ||
134 | #define EEPROM_RF_CFG_RX_ANT_MSK(x) ((x >> 12) & 0xF) /* bits 12-15 */ | ||
135 | |||
136 | |||
119 | /* | 137 | /* |
120 | * EEPROM bands | 138 | * EEPROM bands |
121 | * These are the channel numbers from each band in the order | 139 | * These are the channel numbers from each band in the order |
@@ -251,7 +269,7 @@ static const u8 *iwl_eeprom_query_addr(const u8 *eeprom, size_t eeprom_size, | |||
251 | } | 269 | } |
252 | 270 | ||
253 | static int iwl_eeprom_read_calib(const u8 *eeprom, size_t eeprom_size, | 271 | static int iwl_eeprom_read_calib(const u8 *eeprom, size_t eeprom_size, |
254 | struct iwl_eeprom_data *data) | 272 | struct iwl_nvm_data *data) |
255 | { | 273 | { |
256 | struct iwl_eeprom_calib_hdr *hdr; | 274 | struct iwl_eeprom_calib_hdr *hdr; |
257 | 275 | ||
@@ -330,7 +348,7 @@ struct iwl_eeprom_enhanced_txpwr { | |||
330 | s8 mimo3_max; | 348 | s8 mimo3_max; |
331 | } __packed; | 349 | } __packed; |
332 | 350 | ||
333 | static s8 iwl_get_max_txpwr_half_dbm(const struct iwl_eeprom_data *data, | 351 | static s8 iwl_get_max_txpwr_half_dbm(const struct iwl_nvm_data *data, |
334 | struct iwl_eeprom_enhanced_txpwr *txp) | 352 | struct iwl_eeprom_enhanced_txpwr *txp) |
335 | { | 353 | { |
336 | s8 result = 0; /* (.5 dBm) */ | 354 | s8 result = 0; /* (.5 dBm) */ |
@@ -364,7 +382,7 @@ static s8 iwl_get_max_txpwr_half_dbm(const struct iwl_eeprom_data *data, | |||
364 | ((txp->flags & IWL_EEPROM_ENH_TXP_FL_##x) ? # x " " : "") | 382 | ((txp->flags & IWL_EEPROM_ENH_TXP_FL_##x) ? # x " " : "") |
365 | 383 | ||
366 | static void | 384 | static void |
367 | iwl_eeprom_enh_txp_read_element(struct iwl_eeprom_data *data, | 385 | iwl_eeprom_enh_txp_read_element(struct iwl_nvm_data *data, |
368 | struct iwl_eeprom_enhanced_txpwr *txp, | 386 | struct iwl_eeprom_enhanced_txpwr *txp, |
369 | int n_channels, s8 max_txpower_avg) | 387 | int n_channels, s8 max_txpower_avg) |
370 | { | 388 | { |
@@ -392,7 +410,7 @@ iwl_eeprom_enh_txp_read_element(struct iwl_eeprom_data *data, | |||
392 | } | 410 | } |
393 | 411 | ||
394 | static void iwl_eeprom_enhanced_txpower(struct device *dev, | 412 | static void iwl_eeprom_enhanced_txpower(struct device *dev, |
395 | struct iwl_eeprom_data *data, | 413 | struct iwl_nvm_data *data, |
396 | const u8 *eeprom, size_t eeprom_size, | 414 | const u8 *eeprom, size_t eeprom_size, |
397 | int n_channels) | 415 | int n_channels) |
398 | { | 416 | { |
@@ -504,7 +522,7 @@ static void iwl_init_band_reference(const struct iwl_cfg *cfg, | |||
504 | ((eeprom_ch->flags & EEPROM_CHANNEL_##x) ? # x " " : "") | 522 | ((eeprom_ch->flags & EEPROM_CHANNEL_##x) ? # x " " : "") |
505 | 523 | ||
506 | static void iwl_mod_ht40_chan_info(struct device *dev, | 524 | static void iwl_mod_ht40_chan_info(struct device *dev, |
507 | struct iwl_eeprom_data *data, int n_channels, | 525 | struct iwl_nvm_data *data, int n_channels, |
508 | enum ieee80211_band band, u16 channel, | 526 | enum ieee80211_band band, u16 channel, |
509 | const struct iwl_eeprom_channel *eeprom_ch, | 527 | const struct iwl_eeprom_channel *eeprom_ch, |
510 | u8 clear_ht40_extension_channel) | 528 | u8 clear_ht40_extension_channel) |
@@ -547,7 +565,7 @@ static void iwl_mod_ht40_chan_info(struct device *dev, | |||
547 | ((eeprom_ch_info[ch_idx].flags & EEPROM_CHANNEL_##x) ? # x " " : "") | 565 | ((eeprom_ch_info[ch_idx].flags & EEPROM_CHANNEL_##x) ? # x " " : "") |
548 | 566 | ||
549 | static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, | 567 | static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, |
550 | struct iwl_eeprom_data *data, | 568 | struct iwl_nvm_data *data, |
551 | const u8 *eeprom, size_t eeprom_size) | 569 | const u8 *eeprom, size_t eeprom_size) |
552 | { | 570 | { |
553 | int band, ch_idx; | 571 | int band, ch_idx; |
@@ -685,7 +703,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, | |||
685 | return n_channels; | 703 | return n_channels; |
686 | } | 704 | } |
687 | 705 | ||
688 | static int iwl_init_sband_channels(struct iwl_eeprom_data *data, | 706 | static int iwl_init_sband_channels(struct iwl_nvm_data *data, |
689 | struct ieee80211_supported_band *sband, | 707 | struct ieee80211_supported_band *sband, |
690 | int n_channels, enum ieee80211_band band) | 708 | int n_channels, enum ieee80211_band band) |
691 | { | 709 | { |
@@ -711,7 +729,7 @@ static int iwl_init_sband_channels(struct iwl_eeprom_data *data, | |||
711 | #define MAX_BIT_RATE_20_MHZ 72 /* Mbps */ | 729 | #define MAX_BIT_RATE_20_MHZ 72 /* Mbps */ |
712 | 730 | ||
713 | static void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, | 731 | static void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, |
714 | struct iwl_eeprom_data *data, | 732 | struct iwl_nvm_data *data, |
715 | struct ieee80211_sta_ht_cap *ht_info, | 733 | struct ieee80211_sta_ht_cap *ht_info, |
716 | enum ieee80211_band band) | 734 | enum ieee80211_band band) |
717 | { | 735 | { |
@@ -725,7 +743,7 @@ static void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, | |||
725 | else | 743 | else |
726 | rx_chains = hweight8(data->valid_rx_ant); | 744 | rx_chains = hweight8(data->valid_rx_ant); |
727 | 745 | ||
728 | if (!(data->sku & EEPROM_SKU_CAP_11N_ENABLE) || !cfg->ht_params) { | 746 | if (!(data->sku_cap_11n_enable) || !cfg->ht_params) { |
729 | ht_info->ht_supported = false; | 747 | ht_info->ht_supported = false; |
730 | return; | 748 | return; |
731 | } | 749 | } |
@@ -773,7 +791,7 @@ static void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, | |||
773 | } | 791 | } |
774 | 792 | ||
775 | static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, | 793 | static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, |
776 | struct iwl_eeprom_data *data, | 794 | struct iwl_nvm_data *data, |
777 | const u8 *eeprom, size_t eeprom_size) | 795 | const u8 *eeprom, size_t eeprom_size) |
778 | { | 796 | { |
779 | int n_channels = iwl_init_channel_map(dev, cfg, data, | 797 | int n_channels = iwl_init_channel_map(dev, cfg, data, |
@@ -804,12 +822,13 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, | |||
804 | 822 | ||
805 | /* EEPROM data functions */ | 823 | /* EEPROM data functions */ |
806 | 824 | ||
807 | struct iwl_eeprom_data * | 825 | struct iwl_nvm_data * |
808 | iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, | 826 | iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, |
809 | const u8 *eeprom, size_t eeprom_size) | 827 | const u8 *eeprom, size_t eeprom_size) |
810 | { | 828 | { |
811 | struct iwl_eeprom_data *data; | 829 | struct iwl_nvm_data *data; |
812 | const void *tmp; | 830 | const void *tmp; |
831 | u16 radio_cfg, sku; | ||
813 | 832 | ||
814 | if (WARN_ON(!cfg || !cfg->eeprom_params)) | 833 | if (WARN_ON(!cfg || !cfg->eeprom_params)) |
815 | return NULL; | 834 | return NULL; |
@@ -849,18 +868,27 @@ iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, | |||
849 | data->kelvin_temperature = *(__le16 *)tmp; | 868 | data->kelvin_temperature = *(__le16 *)tmp; |
850 | data->kelvin_voltage = *((__le16 *)tmp + 1); | 869 | data->kelvin_voltage = *((__le16 *)tmp + 1); |
851 | 870 | ||
852 | data->radio_cfg = iwl_eeprom_query16(eeprom, eeprom_size, | 871 | radio_cfg = iwl_eeprom_query16(eeprom, eeprom_size, |
853 | EEPROM_RADIO_CONFIG); | 872 | EEPROM_RADIO_CONFIG); |
854 | data->sku = iwl_eeprom_query16(eeprom, eeprom_size, | 873 | data->radio_cfg_dash = EEPROM_RF_CFG_DASH_MSK(radio_cfg); |
855 | EEPROM_SKU_CAP); | 874 | data->radio_cfg_pnum = EEPROM_RF_CFG_PNUM_MSK(radio_cfg); |
875 | data->radio_cfg_step = EEPROM_RF_CFG_STEP_MSK(radio_cfg); | ||
876 | data->radio_cfg_type = EEPROM_RF_CFG_TYPE_MSK(radio_cfg); | ||
877 | data->valid_rx_ant = EEPROM_RF_CFG_RX_ANT_MSK(radio_cfg); | ||
878 | data->valid_tx_ant = EEPROM_RF_CFG_TX_ANT_MSK(radio_cfg); | ||
879 | |||
880 | sku = iwl_eeprom_query16(eeprom, eeprom_size, | ||
881 | EEPROM_SKU_CAP); | ||
882 | data->sku_cap_11n_enable = sku & EEPROM_SKU_CAP_11N_ENABLE; | ||
883 | data->sku_cap_amt_enable = sku & EEPROM_SKU_CAP_AMT_ENABLE; | ||
884 | data->sku_cap_band_24GHz_enable = sku & EEPROM_SKU_CAP_BAND_24GHZ; | ||
885 | data->sku_cap_band_52GHz_enable = sku & EEPROM_SKU_CAP_BAND_52GHZ; | ||
886 | data->sku_cap_ipan_enable = sku & EEPROM_SKU_CAP_IPAN_ENABLE; | ||
856 | if (iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_ALL) | 887 | if (iwlwifi_mod_params.disable_11n & IWL_DISABLE_HT_ALL) |
857 | data->sku &= ~EEPROM_SKU_CAP_11N_ENABLE; | 888 | data->sku_cap_11n_enable = false; |
858 | |||
859 | data->eeprom_version = iwl_eeprom_query16(eeprom, eeprom_size, | ||
860 | EEPROM_VERSION); | ||
861 | 889 | ||
862 | data->valid_tx_ant = EEPROM_RF_CFG_TX_ANT_MSK(data->radio_cfg); | 890 | data->nvm_version = iwl_eeprom_query16(eeprom, eeprom_size, |
863 | data->valid_rx_ant = EEPROM_RF_CFG_RX_ANT_MSK(data->radio_cfg); | 891 | EEPROM_VERSION); |
864 | 892 | ||
865 | /* check overrides (some devices have wrong EEPROM) */ | 893 | /* check overrides (some devices have wrong EEPROM) */ |
866 | if (cfg->valid_tx_ant) | 894 | if (cfg->valid_tx_ant) |
@@ -884,20 +912,20 @@ iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, | |||
884 | EXPORT_SYMBOL_GPL(iwl_parse_eeprom_data); | 912 | EXPORT_SYMBOL_GPL(iwl_parse_eeprom_data); |
885 | 913 | ||
886 | /* helper functions */ | 914 | /* helper functions */ |
887 | int iwl_eeprom_check_version(struct iwl_eeprom_data *data, | 915 | int iwl_nvm_check_version(struct iwl_nvm_data *data, |
888 | struct iwl_trans *trans) | 916 | struct iwl_trans *trans) |
889 | { | 917 | { |
890 | if (data->eeprom_version >= trans->cfg->eeprom_ver || | 918 | if (data->nvm_version >= trans->cfg->nvm_ver || |
891 | data->calib_version >= trans->cfg->eeprom_calib_ver) { | 919 | data->calib_version >= trans->cfg->nvm_calib_ver) { |
892 | IWL_DEBUG_INFO(trans, "device EEPROM VER=0x%x, CALIB=0x%x\n", | 920 | IWL_DEBUG_INFO(trans, "device EEPROM VER=0x%x, CALIB=0x%x\n", |
893 | data->eeprom_version, data->calib_version); | 921 | data->nvm_version, data->calib_version); |
894 | return 0; | 922 | return 0; |
895 | } | 923 | } |
896 | 924 | ||
897 | IWL_ERR(trans, | 925 | IWL_ERR(trans, |
898 | "Unsupported (too old) EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n", | 926 | "Unsupported (too old) EEPROM VER=0x%x < 0x%x CALIB=0x%x < 0x%x\n", |
899 | data->eeprom_version, trans->cfg->eeprom_ver, | 927 | data->nvm_version, trans->cfg->nvm_ver, |
900 | data->calib_version, trans->cfg->eeprom_calib_ver); | 928 | data->calib_version, trans->cfg->nvm_calib_ver); |
901 | return -EINVAL; | 929 | return -EINVAL; |
902 | } | 930 | } |
903 | EXPORT_SYMBOL_GPL(iwl_eeprom_check_version); | 931 | EXPORT_SYMBOL_GPL(iwl_nvm_check_version); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.h b/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.h index a5e425718f56..555f0eb61d48 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.h +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom-parse.h | |||
@@ -66,22 +66,7 @@ | |||
66 | #include <linux/if_ether.h> | 66 | #include <linux/if_ether.h> |
67 | #include "iwl-trans.h" | 67 | #include "iwl-trans.h" |
68 | 68 | ||
69 | /* SKU Capabilities (actual values from EEPROM definition) */ | 69 | struct iwl_nvm_data { |
70 | #define EEPROM_SKU_CAP_BAND_24GHZ (1 << 4) | ||
71 | #define EEPROM_SKU_CAP_BAND_52GHZ (1 << 5) | ||
72 | #define EEPROM_SKU_CAP_11N_ENABLE (1 << 6) | ||
73 | #define EEPROM_SKU_CAP_AMT_ENABLE (1 << 7) | ||
74 | #define EEPROM_SKU_CAP_IPAN_ENABLE (1 << 8) | ||
75 | |||
76 | /* radio config bits (actual values from EEPROM definition) */ | ||
77 | #define EEPROM_RF_CFG_TYPE_MSK(x) (x & 0x3) /* bits 0-1 */ | ||
78 | #define EEPROM_RF_CFG_STEP_MSK(x) ((x >> 2) & 0x3) /* bits 2-3 */ | ||
79 | #define EEPROM_RF_CFG_DASH_MSK(x) ((x >> 4) & 0x3) /* bits 4-5 */ | ||
80 | #define EEPROM_RF_CFG_PNUM_MSK(x) ((x >> 6) & 0x3) /* bits 6-7 */ | ||
81 | #define EEPROM_RF_CFG_TX_ANT_MSK(x) ((x >> 8) & 0xF) /* bits 8-11 */ | ||
82 | #define EEPROM_RF_CFG_RX_ANT_MSK(x) ((x >> 12) & 0xF) /* bits 12-15 */ | ||
83 | |||
84 | struct iwl_eeprom_data { | ||
85 | int n_hw_addrs; | 70 | int n_hw_addrs; |
86 | u8 hw_addr[ETH_ALEN]; | 71 | u8 hw_addr[ETH_ALEN]; |
87 | 72 | ||
@@ -93,13 +78,21 @@ struct iwl_eeprom_data { | |||
93 | __le16 kelvin_voltage; | 78 | __le16 kelvin_voltage; |
94 | __le16 xtal_calib[2]; | 79 | __le16 xtal_calib[2]; |
95 | 80 | ||
96 | u16 sku; | 81 | bool sku_cap_band_24GHz_enable; |
97 | u16 radio_cfg; | 82 | bool sku_cap_band_52GHz_enable; |
98 | u16 eeprom_version; | 83 | bool sku_cap_11n_enable; |
99 | s8 max_tx_pwr_half_dbm; | 84 | bool sku_cap_amt_enable; |
85 | bool sku_cap_ipan_enable; | ||
100 | 86 | ||
87 | u8 radio_cfg_type; | ||
88 | u8 radio_cfg_step; | ||
89 | u8 radio_cfg_dash; | ||
90 | u8 radio_cfg_pnum; | ||
101 | u8 valid_tx_ant, valid_rx_ant; | 91 | u8 valid_tx_ant, valid_rx_ant; |
102 | 92 | ||
93 | u16 nvm_version; | ||
94 | s8 max_tx_pwr_half_dbm; | ||
95 | |||
103 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | 96 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; |
104 | struct ieee80211_channel channels[]; | 97 | struct ieee80211_channel channels[]; |
105 | }; | 98 | }; |
@@ -115,22 +108,22 @@ struct iwl_eeprom_data { | |||
115 | * This function parses all EEPROM values we need and then | 108 | * This function parses all EEPROM values we need and then |
116 | * returns a (newly allocated) struct containing all the | 109 | * returns a (newly allocated) struct containing all the |
117 | * relevant values for driver use. The struct must be freed | 110 | * relevant values for driver use. The struct must be freed |
118 | * later with iwl_free_eeprom_data(). | 111 | * later with iwl_free_nvm_data(). |
119 | */ | 112 | */ |
120 | struct iwl_eeprom_data * | 113 | struct iwl_nvm_data * |
121 | iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, | 114 | iwl_parse_eeprom_data(struct device *dev, const struct iwl_cfg *cfg, |
122 | const u8 *eeprom, size_t eeprom_size); | 115 | const u8 *eeprom, size_t eeprom_size); |
123 | 116 | ||
124 | /** | 117 | /** |
125 | * iwl_free_eeprom_data - free EEPROM data | 118 | * iwl_free_nvm_data - free NVM data |
126 | * @data: the data to free | 119 | * @data: the data to free |
127 | */ | 120 | */ |
128 | static inline void iwl_free_eeprom_data(struct iwl_eeprom_data *data) | 121 | static inline void iwl_free_nvm_data(struct iwl_nvm_data *data) |
129 | { | 122 | { |
130 | kfree(data); | 123 | kfree(data); |
131 | } | 124 | } |
132 | 125 | ||
133 | int iwl_eeprom_check_version(struct iwl_eeprom_data *data, | 126 | int iwl_nvm_check_version(struct iwl_nvm_data *data, |
134 | struct iwl_trans *trans); | 127 | struct iwl_trans *trans); |
135 | 128 | ||
136 | #endif /* __iwl_eeprom_parse_h__ */ | 129 | #endif /* __iwl_eeprom_parse_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/1000.c b/drivers/net/wireless/iwlwifi/pcie/1000.c index 81b83f484f08..f8620ecae6b4 100644 --- a/drivers/net/wireless/iwlwifi/pcie/1000.c +++ b/drivers/net/wireless/iwlwifi/pcie/1000.c | |||
@@ -94,8 +94,8 @@ static const struct iwl_eeprom_params iwl1000_eeprom_params = { | |||
94 | .device_family = IWL_DEVICE_FAMILY_1000, \ | 94 | .device_family = IWL_DEVICE_FAMILY_1000, \ |
95 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 95 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
96 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 96 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
97 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ | 97 | .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ |
98 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ | 98 | .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ |
99 | .base_params = &iwl1000_base_params, \ | 99 | .base_params = &iwl1000_base_params, \ |
100 | .eeprom_params = &iwl1000_eeprom_params, \ | 100 | .eeprom_params = &iwl1000_eeprom_params, \ |
101 | .led_mode = IWL_LED_BLINK | 101 | .led_mode = IWL_LED_BLINK |
@@ -119,8 +119,8 @@ const struct iwl_cfg iwl1000_bg_cfg = { | |||
119 | .device_family = IWL_DEVICE_FAMILY_100, \ | 119 | .device_family = IWL_DEVICE_FAMILY_100, \ |
120 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 120 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
121 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 121 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
122 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ | 122 | .nvm_ver = EEPROM_1000_EEPROM_VERSION, \ |
123 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ | 123 | .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ |
124 | .base_params = &iwl1000_base_params, \ | 124 | .base_params = &iwl1000_base_params, \ |
125 | .eeprom_params = &iwl1000_eeprom_params, \ | 125 | .eeprom_params = &iwl1000_eeprom_params, \ |
126 | .led_mode = IWL_LED_RF_STATE, \ | 126 | .led_mode = IWL_LED_RF_STATE, \ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/2000.c b/drivers/net/wireless/iwlwifi/pcie/2000.c index 9fbde32f7559..244019cec3e1 100644 --- a/drivers/net/wireless/iwlwifi/pcie/2000.c +++ b/drivers/net/wireless/iwlwifi/pcie/2000.c | |||
@@ -138,8 +138,8 @@ static const struct iwl_eeprom_params iwl20x0_eeprom_params = { | |||
138 | .device_family = IWL_DEVICE_FAMILY_2000, \ | 138 | .device_family = IWL_DEVICE_FAMILY_2000, \ |
139 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 139 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
140 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 140 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
141 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ | 141 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
142 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | 142 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ |
143 | .base_params = &iwl2000_base_params, \ | 143 | .base_params = &iwl2000_base_params, \ |
144 | .eeprom_params = &iwl20x0_eeprom_params, \ | 144 | .eeprom_params = &iwl20x0_eeprom_params, \ |
145 | .need_temp_offset_calib = true, \ | 145 | .need_temp_offset_calib = true, \ |
@@ -166,8 +166,8 @@ const struct iwl_cfg iwl2000_2bgn_d_cfg = { | |||
166 | .device_family = IWL_DEVICE_FAMILY_2030, \ | 166 | .device_family = IWL_DEVICE_FAMILY_2030, \ |
167 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 167 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
168 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 168 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
169 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ | 169 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
170 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | 170 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ |
171 | .base_params = &iwl2030_base_params, \ | 171 | .base_params = &iwl2030_base_params, \ |
172 | .bt_params = &iwl2030_bt_params, \ | 172 | .bt_params = &iwl2030_bt_params, \ |
173 | .eeprom_params = &iwl20x0_eeprom_params, \ | 173 | .eeprom_params = &iwl20x0_eeprom_params, \ |
@@ -190,8 +190,8 @@ const struct iwl_cfg iwl2030_2bgn_cfg = { | |||
190 | .device_family = IWL_DEVICE_FAMILY_105, \ | 190 | .device_family = IWL_DEVICE_FAMILY_105, \ |
191 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 191 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
192 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 192 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
193 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ | 193 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
194 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | 194 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ |
195 | .base_params = &iwl2000_base_params, \ | 195 | .base_params = &iwl2000_base_params, \ |
196 | .eeprom_params = &iwl20x0_eeprom_params, \ | 196 | .eeprom_params = &iwl20x0_eeprom_params, \ |
197 | .need_temp_offset_calib = true, \ | 197 | .need_temp_offset_calib = true, \ |
@@ -220,8 +220,8 @@ const struct iwl_cfg iwl105_bgn_d_cfg = { | |||
220 | .device_family = IWL_DEVICE_FAMILY_135, \ | 220 | .device_family = IWL_DEVICE_FAMILY_135, \ |
221 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 221 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
222 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 222 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
223 | .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ | 223 | .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ |
224 | .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ | 224 | .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ |
225 | .base_params = &iwl2030_base_params, \ | 225 | .base_params = &iwl2030_base_params, \ |
226 | .bt_params = &iwl2030_bt_params, \ | 226 | .bt_params = &iwl2030_bt_params, \ |
227 | .eeprom_params = &iwl20x0_eeprom_params, \ | 227 | .eeprom_params = &iwl20x0_eeprom_params, \ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/5000.c b/drivers/net/wireless/iwlwifi/pcie/5000.c index d1665fa6d15a..83ca40321ff1 100644 --- a/drivers/net/wireless/iwlwifi/pcie/5000.c +++ b/drivers/net/wireless/iwlwifi/pcie/5000.c | |||
@@ -92,8 +92,8 @@ static const struct iwl_eeprom_params iwl5000_eeprom_params = { | |||
92 | .device_family = IWL_DEVICE_FAMILY_5000, \ | 92 | .device_family = IWL_DEVICE_FAMILY_5000, \ |
93 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 93 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
94 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 94 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
95 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \ | 95 | .nvm_ver = EEPROM_5000_EEPROM_VERSION, \ |
96 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ | 96 | .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ |
97 | .base_params = &iwl5000_base_params, \ | 97 | .base_params = &iwl5000_base_params, \ |
98 | .eeprom_params = &iwl5000_eeprom_params, \ | 98 | .eeprom_params = &iwl5000_eeprom_params, \ |
99 | .led_mode = IWL_LED_BLINK | 99 | .led_mode = IWL_LED_BLINK |
@@ -139,8 +139,8 @@ const struct iwl_cfg iwl5350_agn_cfg = { | |||
139 | .device_family = IWL_DEVICE_FAMILY_5000, | 139 | .device_family = IWL_DEVICE_FAMILY_5000, |
140 | .max_inst_size = IWLAGN_RTC_INST_SIZE, | 140 | .max_inst_size = IWLAGN_RTC_INST_SIZE, |
141 | .max_data_size = IWLAGN_RTC_DATA_SIZE, | 141 | .max_data_size = IWLAGN_RTC_DATA_SIZE, |
142 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, | 142 | .nvm_ver = EEPROM_5050_EEPROM_VERSION, |
143 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, | 143 | .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, |
144 | .base_params = &iwl5000_base_params, | 144 | .base_params = &iwl5000_base_params, |
145 | .eeprom_params = &iwl5000_eeprom_params, | 145 | .eeprom_params = &iwl5000_eeprom_params, |
146 | .ht_params = &iwl5000_ht_params, | 146 | .ht_params = &iwl5000_ht_params, |
@@ -156,8 +156,8 @@ const struct iwl_cfg iwl5350_agn_cfg = { | |||
156 | .device_family = IWL_DEVICE_FAMILY_5150, \ | 156 | .device_family = IWL_DEVICE_FAMILY_5150, \ |
157 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 157 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
158 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 158 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
159 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \ | 159 | .nvm_ver = EEPROM_5050_EEPROM_VERSION, \ |
160 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ | 160 | .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ |
161 | .base_params = &iwl5000_base_params, \ | 161 | .base_params = &iwl5000_base_params, \ |
162 | .eeprom_params = &iwl5000_eeprom_params, \ | 162 | .eeprom_params = &iwl5000_eeprom_params, \ |
163 | .no_xtal_calib = true, \ | 163 | .no_xtal_calib = true, \ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/6000.c b/drivers/net/wireless/iwlwifi/pcie/6000.c index 4a57624afc40..d4df976d4709 100644 --- a/drivers/net/wireless/iwlwifi/pcie/6000.c +++ b/drivers/net/wireless/iwlwifi/pcie/6000.c | |||
@@ -160,8 +160,8 @@ static const struct iwl_eeprom_params iwl6000_eeprom_params = { | |||
160 | .device_family = IWL_DEVICE_FAMILY_6005, \ | 160 | .device_family = IWL_DEVICE_FAMILY_6005, \ |
161 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 161 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
162 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 162 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
163 | .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \ | 163 | .nvm_ver = EEPROM_6005_EEPROM_VERSION, \ |
164 | .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ | 164 | .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ |
165 | .base_params = &iwl6000_g2_base_params, \ | 165 | .base_params = &iwl6000_g2_base_params, \ |
166 | .eeprom_params = &iwl6000_eeprom_params, \ | 166 | .eeprom_params = &iwl6000_eeprom_params, \ |
167 | .need_temp_offset_calib = true, \ | 167 | .need_temp_offset_calib = true, \ |
@@ -215,8 +215,8 @@ const struct iwl_cfg iwl6005_2agn_mow2_cfg = { | |||
215 | .device_family = IWL_DEVICE_FAMILY_6030, \ | 215 | .device_family = IWL_DEVICE_FAMILY_6030, \ |
216 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 216 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
217 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 217 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
218 | .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ | 218 | .nvm_ver = EEPROM_6030_EEPROM_VERSION, \ |
219 | .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ | 219 | .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ |
220 | .base_params = &iwl6000_g2_base_params, \ | 220 | .base_params = &iwl6000_g2_base_params, \ |
221 | .bt_params = &iwl6000_bt_params, \ | 221 | .bt_params = &iwl6000_bt_params, \ |
222 | .eeprom_params = &iwl6000_eeprom_params, \ | 222 | .eeprom_params = &iwl6000_eeprom_params, \ |
@@ -254,8 +254,8 @@ const struct iwl_cfg iwl6030_2bg_cfg = { | |||
254 | .device_family = IWL_DEVICE_FAMILY_6030, \ | 254 | .device_family = IWL_DEVICE_FAMILY_6030, \ |
255 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 255 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
256 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 256 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
257 | .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ | 257 | .nvm_ver = EEPROM_6030_EEPROM_VERSION, \ |
258 | .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ | 258 | .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ |
259 | .base_params = &iwl6000_g2_base_params, \ | 259 | .base_params = &iwl6000_g2_base_params, \ |
260 | .bt_params = &iwl6000_bt_params, \ | 260 | .bt_params = &iwl6000_bt_params, \ |
261 | .eeprom_params = &iwl6000_eeprom_params, \ | 261 | .eeprom_params = &iwl6000_eeprom_params, \ |
@@ -306,8 +306,8 @@ const struct iwl_cfg iwl130_bg_cfg = { | |||
306 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 306 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
307 | .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \ | 307 | .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \ |
308 | .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \ | 308 | .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \ |
309 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \ | 309 | .nvm_ver = EEPROM_6000_EEPROM_VERSION, \ |
310 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \ | 310 | .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \ |
311 | .base_params = &iwl6000_base_params, \ | 311 | .base_params = &iwl6000_base_params, \ |
312 | .eeprom_params = &iwl6000_eeprom_params, \ | 312 | .eeprom_params = &iwl6000_eeprom_params, \ |
313 | .led_mode = IWL_LED_BLINK | 313 | .led_mode = IWL_LED_BLINK |
@@ -337,8 +337,8 @@ const struct iwl_cfg iwl6000i_2bg_cfg = { | |||
337 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 337 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
338 | .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \ | 338 | .valid_tx_ant = ANT_AB, /* .cfg overwrite */ \ |
339 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \ | 339 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ \ |
340 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \ | 340 | .nvm_ver = EEPROM_6050_EEPROM_VERSION, \ |
341 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \ | 341 | .nvm_calib_ver = EEPROM_6050_TX_POWER_VERSION, \ |
342 | .base_params = &iwl6050_base_params, \ | 342 | .base_params = &iwl6050_base_params, \ |
343 | .eeprom_params = &iwl6000_eeprom_params, \ | 343 | .eeprom_params = &iwl6000_eeprom_params, \ |
344 | .led_mode = IWL_LED_BLINK, \ | 344 | .led_mode = IWL_LED_BLINK, \ |
@@ -362,8 +362,8 @@ const struct iwl_cfg iwl6050_2abg_cfg = { | |||
362 | .device_family = IWL_DEVICE_FAMILY_6150, \ | 362 | .device_family = IWL_DEVICE_FAMILY_6150, \ |
363 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 363 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
364 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 364 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
365 | .eeprom_ver = EEPROM_6150_EEPROM_VERSION, \ | 365 | .nvm_ver = EEPROM_6150_EEPROM_VERSION, \ |
366 | .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \ | 366 | .nvm_calib_ver = EEPROM_6150_TX_POWER_VERSION, \ |
367 | .base_params = &iwl6050_base_params, \ | 367 | .base_params = &iwl6050_base_params, \ |
368 | .eeprom_params = &iwl6000_eeprom_params, \ | 368 | .eeprom_params = &iwl6000_eeprom_params, \ |
369 | .led_mode = IWL_LED_BLINK, \ | 369 | .led_mode = IWL_LED_BLINK, \ |
@@ -389,8 +389,8 @@ const struct iwl_cfg iwl6000_3agn_cfg = { | |||
389 | .device_family = IWL_DEVICE_FAMILY_6000, | 389 | .device_family = IWL_DEVICE_FAMILY_6000, |
390 | .max_inst_size = IWL60_RTC_INST_SIZE, | 390 | .max_inst_size = IWL60_RTC_INST_SIZE, |
391 | .max_data_size = IWL60_RTC_DATA_SIZE, | 391 | .max_data_size = IWL60_RTC_DATA_SIZE, |
392 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 392 | .nvm_ver = EEPROM_6000_EEPROM_VERSION, |
393 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 393 | .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
394 | .base_params = &iwl6000_base_params, | 394 | .base_params = &iwl6000_base_params, |
395 | .eeprom_params = &iwl6000_eeprom_params, | 395 | .eeprom_params = &iwl6000_eeprom_params, |
396 | .ht_params = &iwl6000_ht_params, | 396 | .ht_params = &iwl6000_ht_params, |