aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-10-05 11:14:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-05 11:14:58 -0400
commitb1a9338d5eaa9c38c326e20ce339247f4d585b62 (patch)
treed2e48e2120e96c4427a5d6897312c15a0111c429
parent1728943d83e9fd919e454332fe344944123b3c3a (diff)
parent62cb3c6ac47a5ab7d8c67dbbf8cbdcd5ae735410 (diff)
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c73
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c61
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c29
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h15
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-csr.h3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h2
8 files changed, 176 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 56ef4ed0db47..19dbef06d52c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -50,14 +50,20 @@
50 50
51/* Highest firmware API version supported */ 51/* Highest firmware API version supported */
52#define IWL1000_UCODE_API_MAX 3 52#define IWL1000_UCODE_API_MAX 3
53#define IWL100_UCODE_API_MAX 5
53 54
54/* Lowest firmware API version supported */ 55/* Lowest firmware API version supported */
55#define IWL1000_UCODE_API_MIN 1 56#define IWL1000_UCODE_API_MIN 1
57#define IWL100_UCODE_API_MIN 5
56 58
57#define IWL1000_FW_PRE "iwlwifi-1000-" 59#define IWL1000_FW_PRE "iwlwifi-1000-"
58#define _IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE #api ".ucode" 60#define _IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE #api ".ucode"
59#define IWL1000_MODULE_FIRMWARE(api) _IWL1000_MODULE_FIRMWARE(api) 61#define IWL1000_MODULE_FIRMWARE(api) _IWL1000_MODULE_FIRMWARE(api)
60 62
63#define IWL100_FW_PRE "iwlwifi-100-"
64#define _IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE #api ".ucode"
65#define IWL100_MODULE_FIRMWARE(api) _IWL100_MODULE_FIRMWARE(api)
66
61 67
62/* 68/*
63 * For 1000, use advance thermal throttling critical temperature threshold, 69 * For 1000, use advance thermal throttling critical temperature threshold,
@@ -310,4 +316,71 @@ struct iwl_cfg iwl1000_bg_cfg = {
310 .chain_noise_calib_by_driver = true, 316 .chain_noise_calib_by_driver = true,
311}; 317};
312 318
319struct iwl_cfg iwl100_bgn_cfg = {
320 .name = "Intel(R) 100 Series 1x1 BGN",
321 .fw_name_pre = IWL100_FW_PRE,
322 .ucode_api_max = IWL100_UCODE_API_MAX,
323 .ucode_api_min = IWL100_UCODE_API_MIN,
324 .sku = IWL_SKU_G|IWL_SKU_N,
325 .ops = &iwl1000_ops,
326 .eeprom_size = OTP_LOW_IMAGE_SIZE,
327 .eeprom_ver = EEPROM_1000_EEPROM_VERSION,
328 .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION,
329 .num_of_queues = IWLAGN_NUM_QUEUES,
330 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
331 .mod_params = &iwlagn_mod_params,
332 .valid_tx_ant = ANT_A,
333 .valid_rx_ant = ANT_A,
334 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
335 .set_l0s = true,
336 .use_bsm = false,
337 .max_ll_items = OTP_MAX_LL_ITEMS_1000,
338 .shadow_ram_support = false,
339 .ht_greenfield_support = true,
340 .led_compensation = 51,
341 .use_rts_for_aggregation = true, /* use rts/cts protection */
342 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
343 .support_ct_kill_exit = true,
344 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
345 .chain_noise_scale = 1000,
346 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
347 .max_event_log_size = 128,
348 .ucode_tracing = true,
349 .sensitivity_calib_by_driver = true,
350 .chain_noise_calib_by_driver = true,
351};
352
353struct iwl_cfg iwl100_bg_cfg = {
354 .name = "Intel(R) 100 Series 1x1 BG",
355 .fw_name_pre = IWL100_FW_PRE,
356 .ucode_api_max = IWL100_UCODE_API_MAX,
357 .ucode_api_min = IWL100_UCODE_API_MIN,
358 .sku = IWL_SKU_G,
359 .ops = &iwl1000_ops,
360 .eeprom_size = OTP_LOW_IMAGE_SIZE,
361 .eeprom_ver = EEPROM_1000_EEPROM_VERSION,
362 .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION,
363 .num_of_queues = IWLAGN_NUM_QUEUES,
364 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
365 .mod_params = &iwlagn_mod_params,
366 .valid_tx_ant = ANT_A,
367 .valid_rx_ant = ANT_A,
368 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
369 .set_l0s = true,
370 .use_bsm = false,
371 .max_ll_items = OTP_MAX_LL_ITEMS_1000,
372 .shadow_ram_support = false,
373 .led_compensation = 51,
374 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
375 .support_ct_kill_exit = true,
376 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
377 .chain_noise_scale = 1000,
378 .monitor_recover_period = IWL_DEF_MONITORING_PERIOD,
379 .max_event_log_size = 128,
380 .ucode_tracing = true,
381 .sensitivity_calib_by_driver = true,
382 .chain_noise_calib_by_driver = true,
383};
384
313MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 385MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
386MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX));
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 9f43f2770c96..4d45932e901e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -51,7 +51,7 @@
51 51
52/* Highest firmware API version supported */ 52/* Highest firmware API version supported */
53#define IWL6000_UCODE_API_MAX 4 53#define IWL6000_UCODE_API_MAX 4
54#define IWL6050_UCODE_API_MAX 4 54#define IWL6050_UCODE_API_MAX 5
55#define IWL6000G2_UCODE_API_MAX 5 55#define IWL6000G2_UCODE_API_MAX 5
56 56
57/* Lowest firmware API version supported */ 57/* Lowest firmware API version supported */
@@ -83,15 +83,24 @@ static void iwl6000_set_ct_threshold(struct iwl_priv *priv)
83 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; 83 priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD;
84} 84}
85 85
86/* Indicate calibration version to uCode. */ 86static void iwl6050_additional_nic_config(struct iwl_priv *priv)
87static void iwl6000_set_calib_version(struct iwl_priv *priv)
88{ 87{
89 if (priv->cfg->need_dc_calib && 88 /* Indicate calibration version to uCode. */
90 (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)) 89 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
91 iwl_set_bit(priv, CSR_GP_DRIVER_REG, 90 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
92 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); 91 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
93} 92}
94 93
94static void iwl6050g2_additional_nic_config(struct iwl_priv *priv)
95{
96 /* Indicate calibration version to uCode. */
97 if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)
98 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
99 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
100 iwl_set_bit(priv, CSR_GP_DRIVER_REG,
101 CSR_GP_DRIVER_REG_BIT_6050_1x2);
102}
103
95/* NIC configuration for 6000 series */ 104/* NIC configuration for 6000 series */
96static void iwl6000_nic_config(struct iwl_priv *priv) 105static void iwl6000_nic_config(struct iwl_priv *priv)
97{ 106{
@@ -117,9 +126,11 @@ static void iwl6000_nic_config(struct iwl_priv *priv)
117 iwl_write32(priv, CSR_GP_DRIVER_REG, 126 iwl_write32(priv, CSR_GP_DRIVER_REG,
118 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); 127 CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
119 } 128 }
120 /* else do nothing, uCode configured */ 129 /* do additional nic configuration if needed */
121 if (priv->cfg->ops->lib->temp_ops.set_calib_version) 130 if (priv->cfg->ops->nic &&
122 priv->cfg->ops->lib->temp_ops.set_calib_version(priv); 131 priv->cfg->ops->nic->additional_nic_config) {
132 priv->cfg->ops->nic->additional_nic_config(priv);
133 }
123} 134}
124 135
125static struct iwl_sensitivity_ranges iwl6000_sensitivity = { 136static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
@@ -188,7 +199,7 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
188 BIT(IWL_CALIB_TX_IQ) | 199 BIT(IWL_CALIB_TX_IQ) |
189 BIT(IWL_CALIB_BASE_BAND); 200 BIT(IWL_CALIB_BASE_BAND);
190 if (priv->cfg->need_dc_calib) 201 if (priv->cfg->need_dc_calib)
191 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC); 202 priv->hw_params.calib_rt_cfg |= BIT(IWL_CALIB_CFG_DC_IDX);
192 203
193 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; 204 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
194 205
@@ -320,7 +331,6 @@ static struct iwl_lib_ops iwl6000_lib = {
320 .temp_ops = { 331 .temp_ops = {
321 .temperature = iwlagn_temperature, 332 .temperature = iwlagn_temperature,
322 .set_ct_kill = iwl6000_set_ct_threshold, 333 .set_ct_kill = iwl6000_set_ct_threshold,
323 .set_calib_version = iwl6000_set_calib_version,
324 }, 334 },
325 .manage_ibss_station = iwlagn_manage_ibss_station, 335 .manage_ibss_station = iwlagn_manage_ibss_station,
326 .update_bcast_stations = iwl_update_bcast_stations, 336 .update_bcast_stations = iwl_update_bcast_stations,
@@ -396,7 +406,6 @@ static struct iwl_lib_ops iwl6000g2b_lib = {
396 .temp_ops = { 406 .temp_ops = {
397 .temperature = iwlagn_temperature, 407 .temperature = iwlagn_temperature,
398 .set_ct_kill = iwl6000_set_ct_threshold, 408 .set_ct_kill = iwl6000_set_ct_threshold,
399 .set_calib_version = iwl6000_set_calib_version,
400 }, 409 },
401 .manage_ibss_station = iwlagn_manage_ibss_station, 410 .manage_ibss_station = iwlagn_manage_ibss_station,
402 .update_bcast_stations = iwl_update_bcast_stations, 411 .update_bcast_stations = iwl_update_bcast_stations,
@@ -419,6 +428,14 @@ static struct iwl_lib_ops iwl6000g2b_lib = {
419 } 428 }
420}; 429};
421 430
431static struct iwl_nic_ops iwl6050_nic_ops = {
432 .additional_nic_config = &iwl6050_additional_nic_config,
433};
434
435static struct iwl_nic_ops iwl6050g2_nic_ops = {
436 .additional_nic_config = &iwl6050g2_additional_nic_config,
437};
438
422static const struct iwl_ops iwl6000_ops = { 439static const struct iwl_ops iwl6000_ops = {
423 .lib = &iwl6000_lib, 440 .lib = &iwl6000_lib,
424 .hcmd = &iwlagn_hcmd, 441 .hcmd = &iwlagn_hcmd,
@@ -426,6 +443,22 @@ static const struct iwl_ops iwl6000_ops = {
426 .led = &iwlagn_led_ops, 443 .led = &iwlagn_led_ops,
427}; 444};
428 445
446static const struct iwl_ops iwl6050_ops = {
447 .lib = &iwl6000_lib,
448 .hcmd = &iwlagn_hcmd,
449 .utils = &iwlagn_hcmd_utils,
450 .led = &iwlagn_led_ops,
451 .nic = &iwl6050_nic_ops,
452};
453
454static const struct iwl_ops iwl6050g2_ops = {
455 .lib = &iwl6000_lib,
456 .hcmd = &iwlagn_hcmd,
457 .utils = &iwlagn_hcmd_utils,
458 .led = &iwlagn_led_ops,
459 .nic = &iwl6050g2_nic_ops,
460};
461
429static const struct iwl_ops iwl6000g2b_ops = { 462static const struct iwl_ops iwl6000g2b_ops = {
430 .lib = &iwl6000g2b_lib, 463 .lib = &iwl6000g2b_lib,
431 .hcmd = &iwlagn_bt_hcmd, 464 .hcmd = &iwlagn_bt_hcmd,
@@ -909,7 +942,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
909 .ucode_api_max = IWL6050_UCODE_API_MAX, 942 .ucode_api_max = IWL6050_UCODE_API_MAX,
910 .ucode_api_min = IWL6050_UCODE_API_MIN, 943 .ucode_api_min = IWL6050_UCODE_API_MIN,
911 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, 944 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
912 .ops = &iwl6000_ops, 945 .ops = &iwl6050_ops,
913 .eeprom_size = OTP_LOW_IMAGE_SIZE, 946 .eeprom_size = OTP_LOW_IMAGE_SIZE,
914 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, 947 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
915 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, 948 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
@@ -947,7 +980,7 @@ struct iwl_cfg iwl6050g2_bgn_cfg = {
947 .ucode_api_max = IWL6050_UCODE_API_MAX, 980 .ucode_api_max = IWL6050_UCODE_API_MAX,
948 .ucode_api_min = IWL6050_UCODE_API_MIN, 981 .ucode_api_min = IWL6050_UCODE_API_MIN,
949 .sku = IWL_SKU_G|IWL_SKU_N, 982 .sku = IWL_SKU_G|IWL_SKU_N,
950 .ops = &iwl6000_ops, 983 .ops = &iwl6050g2_ops,
951 .eeprom_size = OTP_LOW_IMAGE_SIZE, 984 .eeprom_size = OTP_LOW_IMAGE_SIZE,
952 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION, 985 .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION,
953 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION, 986 .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION,
@@ -985,7 +1018,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
985 .ucode_api_max = IWL6050_UCODE_API_MAX, 1018 .ucode_api_max = IWL6050_UCODE_API_MAX,
986 .ucode_api_min = IWL6050_UCODE_API_MIN, 1019 .ucode_api_min = IWL6050_UCODE_API_MIN,
987 .sku = IWL_SKU_A|IWL_SKU_G, 1020 .sku = IWL_SKU_A|IWL_SKU_G,
988 .ops = &iwl6000_ops, 1021 .ops = &iwl6050_ops,
989 .eeprom_size = OTP_LOW_IMAGE_SIZE, 1022 .eeprom_size = OTP_LOW_IMAGE_SIZE,
990 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, 1023 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
991 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, 1024 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 646864a26eaf..e23c554b73a8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2765,6 +2765,25 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv)
2765 } 2765 }
2766} 2766}
2767 2767
2768static int iwlagn_send_calib_cfg_rt(struct iwl_priv *priv, u32 cfg)
2769{
2770 struct iwl_calib_cfg_cmd calib_cfg_cmd;
2771 struct iwl_host_cmd cmd = {
2772 .id = CALIBRATION_CFG_CMD,
2773 .len = sizeof(struct iwl_calib_cfg_cmd),
2774 .data = &calib_cfg_cmd,
2775 };
2776
2777 memset(&calib_cfg_cmd, 0, sizeof(calib_cfg_cmd));
2778 calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_INIT_CFG_ALL;
2779 calib_cfg_cmd.ucd_calib_cfg.once.start = cfg;
2780 calib_cfg_cmd.ucd_calib_cfg.once.send_res = 0;
2781 calib_cfg_cmd.ucd_calib_cfg.flags = 0;
2782
2783 return iwl_send_cmd(priv, &cmd);
2784}
2785
2786
2768/** 2787/**
2769 * iwl_alive_start - called after REPLY_ALIVE notification received 2788 * iwl_alive_start - called after REPLY_ALIVE notification received
2770 * from protocol/runtime uCode (initialization uCode's 2789 * from protocol/runtime uCode (initialization uCode's
@@ -2801,6 +2820,10 @@ static void iwl_alive_start(struct iwl_priv *priv)
2801 goto restart; 2820 goto restart;
2802 } 2821 }
2803 2822
2823 if (priv->hw_params.calib_rt_cfg)
2824 iwlagn_send_calib_cfg_rt(priv, priv->hw_params.calib_rt_cfg);
2825
2826
2804 /* After the ALIVE response, we can send host commands to the uCode */ 2827 /* After the ALIVE response, we can send host commands to the uCode */
2805 set_bit(STATUS_ALIVE, &priv->status); 2828 set_bit(STATUS_ALIVE, &priv->status);
2806 2829
@@ -4788,6 +4811,12 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
4788 {IWL_PCI_DEVICE(0x0083, 0x1326, iwl1000_bg_cfg)}, 4811 {IWL_PCI_DEVICE(0x0083, 0x1326, iwl1000_bg_cfg)},
4789 {IWL_PCI_DEVICE(0x0084, 0x1216, iwl1000_bg_cfg)}, 4812 {IWL_PCI_DEVICE(0x0084, 0x1216, iwl1000_bg_cfg)},
4790 {IWL_PCI_DEVICE(0x0084, 0x1316, iwl1000_bg_cfg)}, 4813 {IWL_PCI_DEVICE(0x0084, 0x1316, iwl1000_bg_cfg)},
4814
4815 {IWL_PCI_DEVICE(0x08AE, 0x1005, iwl100_bgn_cfg)},
4816 {IWL_PCI_DEVICE(0x08AF, 0x1015, iwl100_bgn_cfg)},
4817 {IWL_PCI_DEVICE(0x08AE, 0x1025, iwl100_bgn_cfg)},
4818 {IWL_PCI_DEVICE(0x08AE, 0x1007, iwl100_bg_cfg)},
4819 {IWL_PCI_DEVICE(0x08AE, 0x1017, iwl100_bg_cfg)},
4791#endif /* CONFIG_IWL5000 */ 4820#endif /* CONFIG_IWL5000 */
4792 4821
4793 {0} 4822 {0}
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index a372184ac210..d5dc824ebbfb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -92,6 +92,8 @@ extern struct iwl_cfg iwl6050_2abg_cfg;
92extern struct iwl_cfg iwl6050g2_bgn_cfg; 92extern struct iwl_cfg iwl6050g2_bgn_cfg;
93extern struct iwl_cfg iwl1000_bgn_cfg; 93extern struct iwl_cfg iwl1000_bgn_cfg;
94extern struct iwl_cfg iwl1000_bg_cfg; 94extern struct iwl_cfg iwl1000_bg_cfg;
95extern struct iwl_cfg iwl100_bgn_cfg;
96extern struct iwl_cfg iwl100_bg_cfg;
95 97
96extern struct iwl_mod_params iwlagn_mod_params; 98extern struct iwl_mod_params iwlagn_mod_params;
97extern struct iwl_hcmd_ops iwlagn_hcmd; 99extern struct iwl_hcmd_ops iwlagn_hcmd;
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 27e250c8d4b5..27350eebb132 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -3800,6 +3800,21 @@ enum {
3800 3800
3801#define IWL_CALIB_INIT_CFG_ALL cpu_to_le32(0xffffffff) 3801#define IWL_CALIB_INIT_CFG_ALL cpu_to_le32(0xffffffff)
3802 3802
3803/* This enum defines the bitmap of various calibrations to enable in both
3804 * init ucode and runtime ucode through CALIBRATION_CFG_CMD.
3805 */
3806enum iwl_ucode_calib_cfg {
3807 IWL_CALIB_CFG_RX_BB_IDX,
3808 IWL_CALIB_CFG_DC_IDX,
3809 IWL_CALIB_CFG_TX_IQ_IDX,
3810 IWL_CALIB_CFG_RX_IQ_IDX,
3811 IWL_CALIB_CFG_NOISE_IDX,
3812 IWL_CALIB_CFG_CRYSTAL_IDX,
3813 IWL_CALIB_CFG_TEMPERATURE_IDX,
3814 IWL_CALIB_CFG_PAPD_IDX,
3815};
3816
3817
3803struct iwl_calib_cfg_elmnt_s { 3818struct iwl_calib_cfg_elmnt_s {
3804 __le32 is_enable; 3819 __le32 is_enable;
3805 __le32 start; 3820 __le32 start;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index f0302bfe85f5..5daa1893fd03 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -137,7 +137,6 @@ struct iwl_debugfs_ops {
137struct iwl_temp_ops { 137struct iwl_temp_ops {
138 void (*temperature)(struct iwl_priv *priv); 138 void (*temperature)(struct iwl_priv *priv);
139 void (*set_ct_kill)(struct iwl_priv *priv); 139 void (*set_ct_kill)(struct iwl_priv *priv);
140 void (*set_calib_version)(struct iwl_priv *priv);
141}; 140};
142 141
143struct iwl_tt_ops { 142struct iwl_tt_ops {
@@ -233,11 +232,17 @@ struct iwl_led_ops {
233 int (*off)(struct iwl_priv *priv); 232 int (*off)(struct iwl_priv *priv);
234}; 233};
235 234
235/* NIC specific ops */
236struct iwl_nic_ops {
237 void (*additional_nic_config)(struct iwl_priv *priv);
238};
239
236struct iwl_ops { 240struct iwl_ops {
237 const struct iwl_lib_ops *lib; 241 const struct iwl_lib_ops *lib;
238 const struct iwl_hcmd_ops *hcmd; 242 const struct iwl_hcmd_ops *hcmd;
239 const struct iwl_hcmd_utils_ops *utils; 243 const struct iwl_hcmd_utils_ops *utils;
240 const struct iwl_led_ops *led; 244 const struct iwl_led_ops *led;
245 const struct iwl_nic_ops *nic;
241}; 246};
242 247
243struct iwl_mod_params { 248struct iwl_mod_params {
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h
index ecf98e7ac4ed..2aa15ab13892 100644
--- a/drivers/net/wireless/iwlwifi/iwl-csr.h
+++ b/drivers/net/wireless/iwlwifi/iwl-csr.h
@@ -371,7 +371,8 @@
371#define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_3x3_HYB (0x00000000) 371#define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_3x3_HYB (0x00000000)
372#define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_HYB (0x00000001) 372#define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_HYB (0x00000001)
373#define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA (0x00000002) 373#define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA (0x00000002)
374#define CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6 (0x00000004) 374#define CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6 (0x00000004)
375#define CSR_GP_DRIVER_REG_BIT_6050_1x2 (0x00000008)
375 376
376/* GIO Chicken Bits (PCI Express bus link power management) */ 377/* GIO Chicken Bits (PCI Express bus link power management) */
377#define CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX (0x00800000) 378#define CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX (0x00800000)
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 74d25bcbfcb2..90a37a94c698 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -684,6 +684,7 @@ struct iwl_sensitivity_ranges {
684 * @ct_kill_threshold: temperature threshold 684 * @ct_kill_threshold: temperature threshold
685 * @beacon_time_tsf_bits: number of valid tsf bits for beacon time 685 * @beacon_time_tsf_bits: number of valid tsf bits for beacon time
686 * @calib_init_cfg: setup initial calibrations for the hw 686 * @calib_init_cfg: setup initial calibrations for the hw
687 * @calib_rt_cfg: setup runtime calibrations for the hw
687 * @struct iwl_sensitivity_ranges: range of sensitivity values 688 * @struct iwl_sensitivity_ranges: range of sensitivity values
688 */ 689 */
689struct iwl_hw_params { 690struct iwl_hw_params {
@@ -710,6 +711,7 @@ struct iwl_hw_params {
710 /* for 1000, 6000 series and up */ 711 /* for 1000, 6000 series and up */
711 u16 beacon_time_tsf_bits; 712 u16 beacon_time_tsf_bits;
712 u32 calib_init_cfg; 713 u32 calib_init_cfg;
714 u32 calib_rt_cfg;
713 const struct iwl_sensitivity_ranges *sens; 715 const struct iwl_sensitivity_ranges *sens;
714}; 716};
715 717