aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-05-17 04:36:29 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-05-27 07:11:42 -0400
commit0d8877a10d65f3c9bb84ad150e524d95ebd377fb (patch)
tree628329246e509f0a574b0fa017f2f55489e1b4c9 /drivers/net/wireless
parentee4d5471333c323693f79cdb7b145b40e12baa77 (diff)
iwlwifi: move some configuration parameters into DVM
There are a number of parameters that aren't really hardware specific but rather define how the DVM firmware is used. Move these into the DVM configuration. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/agn.h7
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/calib.c8
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/dev.h53
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/devices.c93
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/lib.c20
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/mac80211.c6
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/main.c35
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/power.c6
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/rs.c8
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/rx.c2
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/scan.c12
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/tt.c2
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/tx.c12
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/ucode.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c39
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c32
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-7000.c9
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-config.h43
20 files changed, 217 insertions, 187 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/agn.h b/drivers/net/wireless/iwlwifi/dvm/agn.h
index ff47fce6c58e..df64a546f52d 100644
--- a/drivers/net/wireless/iwlwifi/dvm/agn.h
+++ b/drivers/net/wireless/iwlwifi/dvm/agn.h
@@ -78,10 +78,13 @@
78/* device operations */ 78/* device operations */
79extern struct iwl_dvm_cfg iwl_dvm_1000_cfg; 79extern struct iwl_dvm_cfg iwl_dvm_1000_cfg;
80extern struct iwl_dvm_cfg iwl_dvm_2000_cfg; 80extern struct iwl_dvm_cfg iwl_dvm_2000_cfg;
81extern struct iwl_dvm_cfg iwl_dvm_105_cfg;
81extern struct iwl_dvm_cfg iwl_dvm_2030_cfg; 82extern struct iwl_dvm_cfg iwl_dvm_2030_cfg;
82extern struct iwl_dvm_cfg iwl_dvm_5000_cfg; 83extern struct iwl_dvm_cfg iwl_dvm_5000_cfg;
83extern struct iwl_dvm_cfg iwl_dvm_5150_cfg; 84extern struct iwl_dvm_cfg iwl_dvm_5150_cfg;
84extern struct iwl_dvm_cfg iwl_dvm_6000_cfg; 85extern struct iwl_dvm_cfg iwl_dvm_6000_cfg;
86extern struct iwl_dvm_cfg iwl_dvm_6005_cfg;
87extern struct iwl_dvm_cfg iwl_dvm_6050_cfg;
85extern struct iwl_dvm_cfg iwl_dvm_6030_cfg; 88extern struct iwl_dvm_cfg iwl_dvm_6030_cfg;
86 89
87 90
@@ -291,8 +294,8 @@ void iwlagn_bt_adjust_rssi_monitor(struct iwl_priv *priv, bool rssi_ena);
291 294
292static inline bool iwl_advanced_bt_coexist(struct iwl_priv *priv) 295static inline bool iwl_advanced_bt_coexist(struct iwl_priv *priv)
293{ 296{
294 return priv->cfg->bt_params && 297 return priv->lib->bt_params &&
295 priv->cfg->bt_params->advanced_bt_coexist; 298 priv->lib->bt_params->advanced_bt_coexist;
296} 299}
297 300
298#ifdef CONFIG_IWLWIFI_DEBUG 301#ifdef CONFIG_IWLWIFI_DEBUG
diff --git a/drivers/net/wireless/iwlwifi/dvm/calib.c b/drivers/net/wireless/iwlwifi/dvm/calib.c
index d6c4cf2ad7c5..1b0f0d502568 100644
--- a/drivers/net/wireless/iwlwifi/dvm/calib.c
+++ b/drivers/net/wireless/iwlwifi/dvm/calib.c
@@ -521,7 +521,7 @@ static int iwl_enhance_sensitivity_write(struct iwl_priv *priv)
521 521
522 iwl_prepare_legacy_sensitivity_tbl(priv, data, &cmd.enhance_table[0]); 522 iwl_prepare_legacy_sensitivity_tbl(priv, data, &cmd.enhance_table[0]);
523 523
524 if (priv->cfg->base_params->hd_v2) { 524 if (priv->lib->hd_v2) {
525 cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX] = 525 cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX] =
526 HD_INA_NON_SQUARE_DET_OFDM_DATA_V2; 526 HD_INA_NON_SQUARE_DET_OFDM_DATA_V2;
527 cmd.enhance_table[HD_INA_NON_SQUARE_DET_CCK_INDEX] = 527 cmd.enhance_table[HD_INA_NON_SQUARE_DET_CCK_INDEX] =
@@ -895,7 +895,7 @@ static void iwlagn_gain_computation(struct iwl_priv *priv,
895 continue; 895 continue;
896 } 896 }
897 897
898 delta_g = (priv->cfg->base_params->chain_noise_scale * 898 delta_g = (priv->lib->chain_noise_scale *
899 ((s32)average_noise[default_chain] - 899 ((s32)average_noise[default_chain] -
900 (s32)average_noise[i])) / 1500; 900 (s32)average_noise[i])) / 1500;
901 901
@@ -1051,8 +1051,8 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
1051 return; 1051 return;
1052 1052
1053 /* Analyze signal for disconnected antenna */ 1053 /* Analyze signal for disconnected antenna */
1054 if (priv->cfg->bt_params && 1054 if (priv->lib->bt_params &&
1055 priv->cfg->bt_params->advanced_bt_coexist) { 1055 priv->lib->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->nvm_data->valid_rx_ant; 1058 data->active_chains = priv->nvm_data->valid_rx_ant;
diff --git a/drivers/net/wireless/iwlwifi/dvm/dev.h b/drivers/net/wireless/iwlwifi/dvm/dev.h
index beb525cb907a..f1b8df16dbba 100644
--- a/drivers/net/wireless/iwlwifi/dvm/dev.h
+++ b/drivers/net/wireless/iwlwifi/dvm/dev.h
@@ -568,16 +568,61 @@ struct iwl_hw_params {
568 const struct iwl_sensitivity_ranges *sens; 568 const struct iwl_sensitivity_ranges *sens;
569}; 569};
570 570
571/**
572 * struct iwl_dvm_bt_params - DVM specific BT (coex) parameters
573 * @advanced_bt_coexist: support advanced bt coexist
574 * @bt_init_traffic_load: specify initial bt traffic load
575 * @bt_prio_boost: default bt priority boost value
576 * @agg_time_limit: maximum number of uSec in aggregation
577 * @bt_sco_disable: uCode should not response to BT in SCO/ESCO mode
578 */
579struct iwl_dvm_bt_params {
580 bool advanced_bt_coexist;
581 u8 bt_init_traffic_load;
582 u32 bt_prio_boost;
583 u16 agg_time_limit;
584 bool bt_sco_disable;
585 bool bt_session_2;
586};
587
588/**
589 * struct iwl_dvm_cfg - DVM firmware specific device configuration
590 * @set_hw_params: set hardware parameters
591 * @set_channel_switch: send channel switch command
592 * @nic_config: apply device specific configuration
593 * @temperature: read temperature
594 * @adv_thermal_throttle: support advance thermal throttle
595 * @support_ct_kill_exit: support ct kill exit condition
596 * @plcp_delta_threshold: plcp error rate threshold used to trigger
597 * radio tuning when there is a high receiving plcp error rate
598 * @chain_noise_scale: default chain noise scale used for gain computation
599 * @hd_v2: v2 of enhanced sensitivity value, used for 2000 series and up
600 * @no_idle_support: do not support idle mode
601 * @bt_params: pointer to BT parameters
602 * @need_temp_offset_calib: need to perform temperature offset calibration
603 * @no_xtal_calib: some devices do not need crystal calibration data,
604 * don't send it to those
605 * @temp_offset_v2: support v2 of temperature offset calibration
606 * @adv_pm: advanced power management
607 */
571struct iwl_dvm_cfg { 608struct iwl_dvm_cfg {
572 /* set hw dependent parameters */
573 void (*set_hw_params)(struct iwl_priv *priv); 609 void (*set_hw_params)(struct iwl_priv *priv);
574 int (*set_channel_switch)(struct iwl_priv *priv, 610 int (*set_channel_switch)(struct iwl_priv *priv,
575 struct ieee80211_channel_switch *ch_switch); 611 struct ieee80211_channel_switch *ch_switch);
576 /* device specific configuration */
577 void (*nic_config)(struct iwl_priv *priv); 612 void (*nic_config)(struct iwl_priv *priv);
578
579 /* temperature */
580 void (*temperature)(struct iwl_priv *priv); 613 void (*temperature)(struct iwl_priv *priv);
614
615 const struct iwl_dvm_bt_params *bt_params;
616 s32 chain_noise_scale;
617 u8 plcp_delta_threshold;
618 bool adv_thermal_throttle;
619 bool support_ct_kill_exit;
620 bool hd_v2;
621 bool no_idle_support;
622 bool need_temp_offset_calib;
623 bool no_xtal_calib;
624 bool temp_offset_v2;
625 bool adv_pm;
581}; 626};
582 627
583struct iwl_wipan_noa_data { 628struct iwl_wipan_noa_data {
diff --git a/drivers/net/wireless/iwlwifi/dvm/devices.c b/drivers/net/wireless/iwlwifi/dvm/devices.c
index 5878bbbfc3dd..5a1c2186ea34 100644
--- a/drivers/net/wireless/iwlwifi/dvm/devices.c
+++ b/drivers/net/wireless/iwlwifi/dvm/devices.c
@@ -178,6 +178,9 @@ struct iwl_dvm_cfg iwl_dvm_1000_cfg = {
178 .set_hw_params = iwl1000_hw_set_hw_params, 178 .set_hw_params = iwl1000_hw_set_hw_params,
179 .nic_config = iwl1000_nic_config, 179 .nic_config = iwl1000_nic_config,
180 .temperature = iwlagn_temperature, 180 .temperature = iwlagn_temperature,
181 .support_ct_kill_exit = true,
182 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
183 .chain_noise_scale = 1000,
181}; 184};
182 185
183 186
@@ -236,12 +239,52 @@ struct iwl_dvm_cfg iwl_dvm_2000_cfg = {
236 .set_hw_params = iwl2000_hw_set_hw_params, 239 .set_hw_params = iwl2000_hw_set_hw_params,
237 .nic_config = iwl2000_nic_config, 240 .nic_config = iwl2000_nic_config,
238 .temperature = iwlagn_temperature, 241 .temperature = iwlagn_temperature,
242 .adv_thermal_throttle = true,
243 .support_ct_kill_exit = true,
244 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
245 .chain_noise_scale = 1000,
246 .hd_v2 = true,
247 .need_temp_offset_calib = true,
248 .temp_offset_v2 = true,
249};
250
251struct iwl_dvm_cfg iwl_dvm_105_cfg = {
252 .set_hw_params = iwl2000_hw_set_hw_params,
253 .nic_config = iwl2000_nic_config,
254 .temperature = iwlagn_temperature,
255 .adv_thermal_throttle = true,
256 .support_ct_kill_exit = true,
257 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
258 .chain_noise_scale = 1000,
259 .hd_v2 = true,
260 .need_temp_offset_calib = true,
261 .temp_offset_v2 = true,
262 .adv_pm = true,
263};
264
265static const struct iwl_dvm_bt_params iwl2030_bt_params = {
266 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
267 .advanced_bt_coexist = true,
268 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
269 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
270 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT32,
271 .bt_sco_disable = true,
272 .bt_session_2 = true,
239}; 273};
240 274
241struct iwl_dvm_cfg iwl_dvm_2030_cfg = { 275struct iwl_dvm_cfg iwl_dvm_2030_cfg = {
242 .set_hw_params = iwl2000_hw_set_hw_params, 276 .set_hw_params = iwl2000_hw_set_hw_params,
243 .nic_config = iwl2000_nic_config, 277 .nic_config = iwl2000_nic_config,
244 .temperature = iwlagn_temperature, 278 .temperature = iwlagn_temperature,
279 .adv_thermal_throttle = true,
280 .support_ct_kill_exit = true,
281 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
282 .chain_noise_scale = 1000,
283 .hd_v2 = true,
284 .bt_params = &iwl2030_bt_params,
285 .need_temp_offset_calib = true,
286 .temp_offset_v2 = true,
287 .adv_pm = true,
245}; 288};
246 289
247/* 290/*
@@ -424,12 +467,19 @@ struct iwl_dvm_cfg iwl_dvm_5000_cfg = {
424 .set_hw_params = iwl5000_hw_set_hw_params, 467 .set_hw_params = iwl5000_hw_set_hw_params,
425 .set_channel_switch = iwl5000_hw_channel_switch, 468 .set_channel_switch = iwl5000_hw_channel_switch,
426 .temperature = iwlagn_temperature, 469 .temperature = iwlagn_temperature,
470 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
471 .chain_noise_scale = 1000,
472 .no_idle_support = true,
427}; 473};
428 474
429struct iwl_dvm_cfg iwl_dvm_5150_cfg = { 475struct iwl_dvm_cfg iwl_dvm_5150_cfg = {
430 .set_hw_params = iwl5150_hw_set_hw_params, 476 .set_hw_params = iwl5150_hw_set_hw_params,
431 .set_channel_switch = iwl5000_hw_channel_switch, 477 .set_channel_switch = iwl5000_hw_channel_switch,
432 .temperature = iwl5150_temperature, 478 .temperature = iwl5150_temperature,
479 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
480 .chain_noise_scale = 1000,
481 .no_idle_support = true,
482 .no_xtal_calib = true,
433}; 483};
434 484
435 485
@@ -589,6 +639,42 @@ struct iwl_dvm_cfg iwl_dvm_6000_cfg = {
589 .set_channel_switch = iwl6000_hw_channel_switch, 639 .set_channel_switch = iwl6000_hw_channel_switch,
590 .nic_config = iwl6000_nic_config, 640 .nic_config = iwl6000_nic_config,
591 .temperature = iwlagn_temperature, 641 .temperature = iwlagn_temperature,
642 .adv_thermal_throttle = true,
643 .support_ct_kill_exit = true,
644 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
645 .chain_noise_scale = 1000,
646};
647
648const struct iwl_dvm_cfg iwl_dvm_6005_cfg = {
649 .set_hw_params = iwl6000_hw_set_hw_params,
650 .set_channel_switch = iwl6000_hw_channel_switch,
651 .nic_config = iwl6000_nic_config,
652 .temperature = iwlagn_temperature,
653 .adv_thermal_throttle = true,
654 .support_ct_kill_exit = true,
655 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
656 .chain_noise_scale = 1000,
657 .need_temp_offset_calib = true,
658};
659
660struct iwl_dvm_cfg iwl_dvm_6050_cfg = {
661 .set_hw_params = iwl6000_hw_set_hw_params,
662 .set_channel_switch = iwl6000_hw_channel_switch,
663 .nic_config = iwl6000_nic_config,
664 .temperature = iwlagn_temperature,
665 .adv_thermal_throttle = true,
666 .support_ct_kill_exit = true,
667 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
668 .chain_noise_scale = 1500,
669};
670
671static const struct iwl_dvm_bt_params iwl6000_bt_params = {
672 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
673 .advanced_bt_coexist = true,
674 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
675 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
676 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
677 .bt_sco_disable = true,
592}; 678};
593 679
594struct iwl_dvm_cfg iwl_dvm_6030_cfg = { 680struct iwl_dvm_cfg iwl_dvm_6030_cfg = {
@@ -596,4 +682,11 @@ struct iwl_dvm_cfg iwl_dvm_6030_cfg = {
596 .set_channel_switch = iwl6000_hw_channel_switch, 682 .set_channel_switch = iwl6000_hw_channel_switch,
597 .nic_config = iwl6000_nic_config, 683 .nic_config = iwl6000_nic_config,
598 .temperature = iwlagn_temperature, 684 .temperature = iwlagn_temperature,
685 .adv_thermal_throttle = true,
686 .support_ct_kill_exit = true,
687 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
688 .chain_noise_scale = 1000,
689 .bt_params = &iwl6000_bt_params,
690 .need_temp_offset_calib = true,
691 .adv_pm = true,
599}; 692};
diff --git a/drivers/net/wireless/iwlwifi/dvm/lib.c b/drivers/net/wireless/iwlwifi/dvm/lib.c
index 54f553380aa8..9879550a0fea 100644
--- a/drivers/net/wireless/iwlwifi/dvm/lib.c
+++ b/drivers/net/wireless/iwlwifi/dvm/lib.c
@@ -254,23 +254,23 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
254 BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) != 254 BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) !=
255 sizeof(basic.bt3_lookup_table)); 255 sizeof(basic.bt3_lookup_table));
256 256
257 if (priv->cfg->bt_params) { 257 if (priv->lib->bt_params) {
258 /* 258 /*
259 * newer generation of devices (2000 series and newer) 259 * newer generation of devices (2000 series and newer)
260 * use the version 2 of the bt command 260 * use the version 2 of the bt command
261 * we need to make sure sending the host command 261 * we need to make sure sending the host command
262 * with correct data structure to avoid uCode assert 262 * with correct data structure to avoid uCode assert
263 */ 263 */
264 if (priv->cfg->bt_params->bt_session_2) { 264 if (priv->lib->bt_params->bt_session_2) {
265 bt_cmd_v2.prio_boost = cpu_to_le32( 265 bt_cmd_v2.prio_boost = cpu_to_le32(
266 priv->cfg->bt_params->bt_prio_boost); 266 priv->lib->bt_params->bt_prio_boost);
267 bt_cmd_v2.tx_prio_boost = 0; 267 bt_cmd_v2.tx_prio_boost = 0;
268 bt_cmd_v2.rx_prio_boost = 0; 268 bt_cmd_v2.rx_prio_boost = 0;
269 } else { 269 } else {
270 /* older version only has 8 bits */ 270 /* older version only has 8 bits */
271 WARN_ON(priv->cfg->bt_params->bt_prio_boost & ~0xFF); 271 WARN_ON(priv->lib->bt_params->bt_prio_boost & ~0xFF);
272 bt_cmd_v1.prio_boost = 272 bt_cmd_v1.prio_boost =
273 priv->cfg->bt_params->bt_prio_boost; 273 priv->lib->bt_params->bt_prio_boost;
274 bt_cmd_v1.tx_prio_boost = 0; 274 bt_cmd_v1.tx_prio_boost = 0;
275 bt_cmd_v1.rx_prio_boost = 0; 275 bt_cmd_v1.rx_prio_boost = 0;
276 } 276 }
@@ -330,7 +330,7 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
330 priv->bt_full_concurrent ? 330 priv->bt_full_concurrent ?
331 "full concurrency" : "3-wire"); 331 "full concurrency" : "3-wire");
332 332
333 if (priv->cfg->bt_params->bt_session_2) { 333 if (priv->lib->bt_params->bt_session_2) {
334 memcpy(&bt_cmd_v2.basic, &basic, 334 memcpy(&bt_cmd_v2.basic, &basic,
335 sizeof(basic)); 335 sizeof(basic));
336 ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, 336 ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG,
@@ -758,8 +758,8 @@ static bool is_single_rx_stream(struct iwl_priv *priv)
758 */ 758 */
759static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) 759static int iwl_get_active_rx_chain_count(struct iwl_priv *priv)
760{ 760{
761 if (priv->cfg->bt_params && 761 if (priv->lib->bt_params &&
762 priv->cfg->bt_params->advanced_bt_coexist && 762 priv->lib->bt_params->advanced_bt_coexist &&
763 (priv->bt_full_concurrent || 763 (priv->bt_full_concurrent ||
764 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { 764 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) {
765 /* 765 /*
@@ -830,8 +830,8 @@ void iwlagn_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
830 else 830 else
831 active_chains = priv->nvm_data->valid_rx_ant; 831 active_chains = priv->nvm_data->valid_rx_ant;
832 832
833 if (priv->cfg->bt_params && 833 if (priv->lib->bt_params &&
834 priv->cfg->bt_params->advanced_bt_coexist && 834 priv->lib->bt_params->advanced_bt_coexist &&
835 (priv->bt_full_concurrent || 835 (priv->bt_full_concurrent ||
836 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { 836 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) {
837 /* 837 /*
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index 700215324af8..ac7ed3f809a0 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -1284,8 +1284,8 @@ static void iwlagn_mac_rssi_callback(struct ieee80211_hw *hw,
1284 IWL_DEBUG_MAC80211(priv, "enter\n"); 1284 IWL_DEBUG_MAC80211(priv, "enter\n");
1285 mutex_lock(&priv->mutex); 1285 mutex_lock(&priv->mutex);
1286 1286
1287 if (priv->cfg->bt_params && 1287 if (priv->lib->bt_params &&
1288 priv->cfg->bt_params->advanced_bt_coexist) { 1288 priv->lib->bt_params->advanced_bt_coexist) {
1289 if (rssi_event == RSSI_EVENT_LOW) 1289 if (rssi_event == RSSI_EVENT_LOW)
1290 priv->bt_enable_pspoll = true; 1290 priv->bt_enable_pspoll = true;
1291 else if (rssi_event == RSSI_EVENT_HIGH) 1291 else if (rssi_event == RSSI_EVENT_HIGH)
@@ -1395,7 +1395,7 @@ static int iwl_setup_interface(struct iwl_priv *priv,
1395 return err; 1395 return err;
1396 } 1396 }
1397 1397
1398 if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist && 1398 if (priv->lib->bt_params && priv->lib->bt_params->advanced_bt_coexist &&
1399 vif->type == NL80211_IFTYPE_ADHOC) { 1399 vif->type == NL80211_IFTYPE_ADHOC) {
1400 /* 1400 /*
1401 * pretend to have high BT traffic as long as we 1401 * pretend to have high BT traffic as long as we
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
index 0c77222c2c64..68f754659570 100644
--- a/drivers/net/wireless/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/iwlwifi/dvm/main.c
@@ -615,7 +615,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv)
615 615
616 priv->thermal_throttle.ct_kill_toggle = false; 616 priv->thermal_throttle.ct_kill_toggle = false;
617 617
618 if (priv->cfg->base_params->support_ct_kill_exit) { 618 if (priv->lib->support_ct_kill_exit) {
619 adv_cmd.critical_temperature_enter = 619 adv_cmd.critical_temperature_enter =
620 cpu_to_le32(priv->hw_params.ct_kill_threshold); 620 cpu_to_le32(priv->hw_params.ct_kill_threshold);
621 adv_cmd.critical_temperature_exit = 621 adv_cmd.critical_temperature_exit =
@@ -732,10 +732,10 @@ int iwl_alive_start(struct iwl_priv *priv)
732 } 732 }
733 733
734 /* download priority table before any calibration request */ 734 /* download priority table before any calibration request */
735 if (priv->cfg->bt_params && 735 if (priv->lib->bt_params &&
736 priv->cfg->bt_params->advanced_bt_coexist) { 736 priv->lib->bt_params->advanced_bt_coexist) {
737 /* Configure Bluetooth device coexistence support */ 737 /* Configure Bluetooth device coexistence support */
738 if (priv->cfg->bt_params->bt_sco_disable) 738 if (priv->lib->bt_params->bt_sco_disable)
739 priv->bt_enable_pspoll = false; 739 priv->bt_enable_pspoll = false;
740 else 740 else
741 priv->bt_enable_pspoll = true; 741 priv->bt_enable_pspoll = true;
@@ -873,9 +873,9 @@ void iwl_down(struct iwl_priv *priv)
873 priv->bt_status = 0; 873 priv->bt_status = 0;
874 priv->cur_rssi_ctx = NULL; 874 priv->cur_rssi_ctx = NULL;
875 priv->bt_is_sco = 0; 875 priv->bt_is_sco = 0;
876 if (priv->cfg->bt_params) 876 if (priv->lib->bt_params)
877 priv->bt_traffic_load = 877 priv->bt_traffic_load =
878 priv->cfg->bt_params->bt_init_traffic_load; 878 priv->lib->bt_params->bt_init_traffic_load;
879 else 879 else
880 priv->bt_traffic_load = 0; 880 priv->bt_traffic_load = 0;
881 priv->bt_full_concurrent = false; 881 priv->bt_full_concurrent = false;
@@ -1058,7 +1058,7 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv)
1058 1058
1059 iwl_setup_scan_deferred_work(priv); 1059 iwl_setup_scan_deferred_work(priv);
1060 1060
1061 if (priv->cfg->bt_params) 1061 if (priv->lib->bt_params)
1062 iwlagn_bt_setup_deferred_work(priv); 1062 iwlagn_bt_setup_deferred_work(priv);
1063 1063
1064 init_timer(&priv->statistics_periodic); 1064 init_timer(&priv->statistics_periodic);
@@ -1072,7 +1072,7 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv)
1072 1072
1073void iwl_cancel_deferred_work(struct iwl_priv *priv) 1073void iwl_cancel_deferred_work(struct iwl_priv *priv)
1074{ 1074{
1075 if (priv->cfg->bt_params) 1075 if (priv->lib->bt_params)
1076 iwlagn_bt_cancel_deferred_work(priv); 1076 iwlagn_bt_cancel_deferred_work(priv);
1077 1077
1078 cancel_work_sync(&priv->run_time_calib_work); 1078 cancel_work_sync(&priv->run_time_calib_work);
@@ -1098,8 +1098,7 @@ static int iwl_init_drv(struct iwl_priv *priv)
1098 1098
1099 priv->band = IEEE80211_BAND_2GHZ; 1099 priv->band = IEEE80211_BAND_2GHZ;
1100 1100
1101 priv->plcp_delta_threshold = 1101 priv->plcp_delta_threshold = priv->lib->plcp_delta_threshold;
1102 priv->cfg->base_params->plcp_delta_threshold;
1103 1102
1104 priv->iw_mode = NL80211_IFTYPE_STATION; 1103 priv->iw_mode = NL80211_IFTYPE_STATION;
1105 priv->current_ht_config.smps = IEEE80211_SMPS_STATIC; 1104 priv->current_ht_config.smps = IEEE80211_SMPS_STATIC;
@@ -1116,8 +1115,8 @@ static int iwl_init_drv(struct iwl_priv *priv)
1116 iwl_init_scan_params(priv); 1115 iwl_init_scan_params(priv);
1117 1116
1118 /* init bt coex */ 1117 /* init bt coex */
1119 if (priv->cfg->bt_params && 1118 if (priv->lib->bt_params &&
1120 priv->cfg->bt_params->advanced_bt_coexist) { 1119 priv->lib->bt_params->advanced_bt_coexist) {
1121 priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; 1120 priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT;
1122 priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; 1121 priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT;
1123 priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; 1122 priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK;
@@ -1267,9 +1266,11 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1267 priv->lib = &iwl_dvm_1000_cfg; 1266 priv->lib = &iwl_dvm_1000_cfg;
1268 break; 1267 break;
1269 case IWL_DEVICE_FAMILY_2000: 1268 case IWL_DEVICE_FAMILY_2000:
1270 case IWL_DEVICE_FAMILY_105:
1271 priv->lib = &iwl_dvm_2000_cfg; 1269 priv->lib = &iwl_dvm_2000_cfg;
1272 break; 1270 break;
1271 case IWL_DEVICE_FAMILY_105:
1272 priv->lib = &iwl_dvm_105_cfg;
1273 break;
1273 case IWL_DEVICE_FAMILY_2030: 1274 case IWL_DEVICE_FAMILY_2030:
1274 case IWL_DEVICE_FAMILY_135: 1275 case IWL_DEVICE_FAMILY_135:
1275 priv->lib = &iwl_dvm_2030_cfg; 1276 priv->lib = &iwl_dvm_2030_cfg;
@@ -1281,11 +1282,15 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1281 priv->lib = &iwl_dvm_5150_cfg; 1282 priv->lib = &iwl_dvm_5150_cfg;
1282 break; 1283 break;
1283 case IWL_DEVICE_FAMILY_6000: 1284 case IWL_DEVICE_FAMILY_6000:
1284 case IWL_DEVICE_FAMILY_6005:
1285 case IWL_DEVICE_FAMILY_6000i: 1285 case IWL_DEVICE_FAMILY_6000i:
1286 priv->lib = &iwl_dvm_6000_cfg;
1287 break;
1288 case IWL_DEVICE_FAMILY_6005:
1289 priv->lib = &iwl_dvm_6005_cfg;
1290 break;
1286 case IWL_DEVICE_FAMILY_6050: 1291 case IWL_DEVICE_FAMILY_6050:
1287 case IWL_DEVICE_FAMILY_6150: 1292 case IWL_DEVICE_FAMILY_6150:
1288 priv->lib = &iwl_dvm_6000_cfg; 1293 priv->lib = &iwl_dvm_6050_cfg;
1289 break; 1294 break;
1290 case IWL_DEVICE_FAMILY_6030: 1295 case IWL_DEVICE_FAMILY_6030:
1291 priv->lib = &iwl_dvm_6030_cfg; 1296 priv->lib = &iwl_dvm_6030_cfg;
diff --git a/drivers/net/wireless/iwlwifi/dvm/power.c b/drivers/net/wireless/iwlwifi/dvm/power.c
index bd69018d07a9..77cb59712235 100644
--- a/drivers/net/wireless/iwlwifi/dvm/power.c
+++ b/drivers/net/wireless/iwlwifi/dvm/power.c
@@ -163,7 +163,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv,
163 u8 skip; 163 u8 skip;
164 u32 slp_itrvl; 164 u32 slp_itrvl;
165 165
166 if (priv->cfg->adv_pm) { 166 if (priv->lib->adv_pm) {
167 table = apm_range_2; 167 table = apm_range_2;
168 if (period <= IWL_DTIM_RANGE_1_MAX) 168 if (period <= IWL_DTIM_RANGE_1_MAX)
169 table = apm_range_1; 169 table = apm_range_1;
@@ -217,7 +217,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv,
217 cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; 217 cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA;
218 218
219 if (iwl_advanced_bt_coexist(priv)) { 219 if (iwl_advanced_bt_coexist(priv)) {
220 if (!priv->cfg->bt_params->bt_sco_disable) 220 if (!priv->lib->bt_params->bt_sco_disable)
221 cmd->flags |= IWL_POWER_BT_SCO_ENA; 221 cmd->flags |= IWL_POWER_BT_SCO_ENA;
222 else 222 else
223 cmd->flags &= ~IWL_POWER_BT_SCO_ENA; 223 cmd->flags &= ~IWL_POWER_BT_SCO_ENA;
@@ -293,7 +293,7 @@ static void iwl_power_build_cmd(struct iwl_priv *priv,
293 293
294 if (priv->wowlan) 294 if (priv->wowlan)
295 iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); 295 iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper);
296 else if (!priv->cfg->base_params->no_idle_support && 296 else if (!priv->lib->no_idle_support &&
297 priv->hw->conf.flags & IEEE80211_CONF_IDLE) 297 priv->hw->conf.flags & IEEE80211_CONF_IDLE)
298 iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); 298 iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20);
299 else if (iwl_tt_is_low_power_state(priv)) { 299 else if (iwl_tt_is_low_power_state(priv)) {
diff --git a/drivers/net/wireless/iwlwifi/dvm/rs.c b/drivers/net/wireless/iwlwifi/dvm/rs.c
index 907bd6e50aad..94314a8e1029 100644
--- a/drivers/net/wireless/iwlwifi/dvm/rs.c
+++ b/drivers/net/wireless/iwlwifi/dvm/rs.c
@@ -1088,7 +1088,7 @@ done:
1088 (priv->tm_fixed_rate != lq_sta->dbg_fixed_rate)) 1088 (priv->tm_fixed_rate != lq_sta->dbg_fixed_rate))
1089 rs_program_fix_rate(priv, lq_sta); 1089 rs_program_fix_rate(priv, lq_sta);
1090#endif 1090#endif
1091 if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist) 1091 if (priv->lib->bt_params && priv->lib->bt_params->advanced_bt_coexist)
1092 rs_bt_update_lq(priv, ctx, lq_sta); 1092 rs_bt_update_lq(priv, ctx, lq_sta);
1093} 1093}
1094 1094
@@ -3064,11 +3064,11 @@ static void rs_fill_link_cmd(struct iwl_priv *priv,
3064 * overwrite if needed, pass aggregation time limit 3064 * overwrite if needed, pass aggregation time limit
3065 * to uCode in uSec 3065 * to uCode in uSec
3066 */ 3066 */
3067 if (priv && priv->cfg->bt_params && 3067 if (priv && priv->lib->bt_params &&
3068 priv->cfg->bt_params->agg_time_limit && 3068 priv->lib->bt_params->agg_time_limit &&
3069 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH) 3069 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)
3070 lq_cmd->agg_params.agg_time_limit = 3070 lq_cmd->agg_params.agg_time_limit =
3071 cpu_to_le16(priv->cfg->bt_params->agg_time_limit); 3071 cpu_to_le16(priv->lib->bt_params->agg_time_limit);
3072} 3072}
3073 3073
3074static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) 3074static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
diff --git a/drivers/net/wireless/iwlwifi/dvm/rx.c b/drivers/net/wireless/iwlwifi/dvm/rx.c
index a4eed2055fdb..2f3fd160ab44 100644
--- a/drivers/net/wireless/iwlwifi/dvm/rx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/rx.c
@@ -1102,7 +1102,7 @@ void iwl_setup_rx_handlers(struct iwl_priv *priv)
1102 iwl_notification_wait_init(&priv->notif_wait); 1102 iwl_notification_wait_init(&priv->notif_wait);
1103 1103
1104 /* Set up BT Rx handlers */ 1104 /* Set up BT Rx handlers */
1105 if (priv->cfg->bt_params) 1105 if (priv->lib->bt_params)
1106 iwlagn_bt_rx_handler_setup(priv); 1106 iwlagn_bt_rx_handler_setup(priv);
1107} 1107}
1108 1108
diff --git a/drivers/net/wireless/iwlwifi/dvm/scan.c b/drivers/net/wireless/iwlwifi/dvm/scan.c
index d69b55866714..8c686a5b90ac 100644
--- a/drivers/net/wireless/iwlwifi/dvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/dvm/scan.c
@@ -801,8 +801,8 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
801 * Internal scans are passive, so we can indiscriminately set 801 * Internal scans are passive, so we can indiscriminately set
802 * the BT ignore flag on 2.4 GHz since it applies to TX only. 802 * the BT ignore flag on 2.4 GHz since it applies to TX only.
803 */ 803 */
804 if (priv->cfg->bt_params && 804 if (priv->lib->bt_params &&
805 priv->cfg->bt_params->advanced_bt_coexist) 805 priv->lib->bt_params->advanced_bt_coexist)
806 scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; 806 scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT;
807 break; 807 break;
808 case IEEE80211_BAND_5GHZ: 808 case IEEE80211_BAND_5GHZ:
@@ -844,8 +844,8 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
844 band = priv->scan_band; 844 band = priv->scan_band;
845 845
846 if (band == IEEE80211_BAND_2GHZ && 846 if (band == IEEE80211_BAND_2GHZ &&
847 priv->cfg->bt_params && 847 priv->lib->bt_params &&
848 priv->cfg->bt_params->advanced_bt_coexist) { 848 priv->lib->bt_params->advanced_bt_coexist) {
849 /* transmit 2.4 GHz probes only on first antenna */ 849 /* transmit 2.4 GHz probes only on first antenna */
850 scan_tx_antennas = first_antenna(scan_tx_antennas); 850 scan_tx_antennas = first_antenna(scan_tx_antennas);
851 } 851 }
@@ -873,8 +873,8 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
873 873
874 rx_ant = first_antenna(active_chains); 874 rx_ant = first_antenna(active_chains);
875 } 875 }
876 if (priv->cfg->bt_params && 876 if (priv->lib->bt_params &&
877 priv->cfg->bt_params->advanced_bt_coexist && 877 priv->lib->bt_params->advanced_bt_coexist &&
878 priv->bt_full_concurrent) { 878 priv->bt_full_concurrent) {
879 /* operated as 1x1 in full concurrency mode */ 879 /* operated as 1x1 in full concurrency mode */
880 rx_ant = first_antenna(rx_ant); 880 rx_ant = first_antenna(rx_ant);
diff --git a/drivers/net/wireless/iwlwifi/dvm/tt.c b/drivers/net/wireless/iwlwifi/dvm/tt.c
index 03f9bc01c0cc..fbeee081ee2f 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tt.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tt.c
@@ -627,7 +627,7 @@ void iwl_tt_initialize(struct iwl_priv *priv)
627 INIT_WORK(&priv->ct_enter, iwl_bg_ct_enter); 627 INIT_WORK(&priv->ct_enter, iwl_bg_ct_enter);
628 INIT_WORK(&priv->ct_exit, iwl_bg_ct_exit); 628 INIT_WORK(&priv->ct_exit, iwl_bg_ct_exit);
629 629
630 if (priv->cfg->base_params->adv_thermal_throttle) { 630 if (priv->lib->adv_thermal_throttle) {
631 IWL_DEBUG_TEMP(priv, "Advanced Thermal Throttling\n"); 631 IWL_DEBUG_TEMP(priv, "Advanced Thermal Throttling\n");
632 tt->restriction = kcalloc(IWL_TI_STATE_MAX, 632 tt->restriction = kcalloc(IWL_TI_STATE_MAX,
633 sizeof(struct iwl_tt_restriction), 633 sizeof(struct iwl_tt_restriction),
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
index a900aaf47790..353a053b4eb1 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
@@ -83,8 +83,8 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
83 else if (ieee80211_is_back_req(fc)) 83 else if (ieee80211_is_back_req(fc))
84 tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; 84 tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK;
85 else if (info->band == IEEE80211_BAND_2GHZ && 85 else if (info->band == IEEE80211_BAND_2GHZ &&
86 priv->cfg->bt_params && 86 priv->lib->bt_params &&
87 priv->cfg->bt_params->advanced_bt_coexist && 87 priv->lib->bt_params->advanced_bt_coexist &&
88 (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || 88 (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) ||
89 ieee80211_is_reassoc_req(fc) || 89 ieee80211_is_reassoc_req(fc) ||
90 skb->protocol == cpu_to_be16(ETH_P_PAE))) 90 skb->protocol == cpu_to_be16(ETH_P_PAE)))
@@ -202,8 +202,8 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
202 rate_flags |= RATE_MCS_CCK_MSK; 202 rate_flags |= RATE_MCS_CCK_MSK;
203 203
204 /* Set up antennas */ 204 /* Set up antennas */
205 if (priv->cfg->bt_params && 205 if (priv->lib->bt_params &&
206 priv->cfg->bt_params->advanced_bt_coexist && 206 priv->lib->bt_params->advanced_bt_coexist &&
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,
@@ -986,8 +986,8 @@ static void iwl_rx_reply_tx_agg(struct iwl_priv *priv,
986 * notification again. 986 * notification again.
987 */ 987 */
988 if (tx_resp->bt_kill_count && tx_resp->frame_count == 1 && 988 if (tx_resp->bt_kill_count && tx_resp->frame_count == 1 &&
989 priv->cfg->bt_params && 989 priv->lib->bt_params &&
990 priv->cfg->bt_params->advanced_bt_coexist) { 990 priv->lib->bt_params->advanced_bt_coexist) {
991 IWL_DEBUG_COEX(priv, "receive reply tx w/ bt_kill\n"); 991 IWL_DEBUG_COEX(priv, "receive reply tx w/ bt_kill\n");
992 } 992 }
993 993
diff --git a/drivers/net/wireless/iwlwifi/dvm/ucode.c b/drivers/net/wireless/iwlwifi/dvm/ucode.c
index 0a1cdc5e856b..86270b69cd02 100644
--- a/drivers/net/wireless/iwlwifi/dvm/ucode.c
+++ b/drivers/net/wireless/iwlwifi/dvm/ucode.c
@@ -132,8 +132,8 @@ int iwl_init_alive_start(struct iwl_priv *priv)
132{ 132{
133 int ret; 133 int ret;
134 134
135 if (priv->cfg->bt_params && 135 if (priv->lib->bt_params &&
136 priv->cfg->bt_params->advanced_bt_coexist) { 136 priv->lib->bt_params->advanced_bt_coexist) {
137 /* 137 /*
138 * Tell uCode we are ready to perform calibration 138 * Tell uCode we are ready to perform calibration
139 * need to perform this before any calibration 139 * need to perform this before any calibration
@@ -155,8 +155,8 @@ int iwl_init_alive_start(struct iwl_priv *priv)
155 * temperature offset calibration is only needed for runtime ucode, 155 * temperature offset calibration is only needed for runtime ucode,
156 * so prepare the value now. 156 * so prepare the value now.
157 */ 157 */
158 if (priv->cfg->need_temp_offset_calib) { 158 if (priv->lib->need_temp_offset_calib) {
159 if (priv->cfg->temp_offset_v2) 159 if (priv->lib->temp_offset_v2)
160 return iwl_set_temperature_offset_calib_v2(priv); 160 return iwl_set_temperature_offset_calib_v2(priv);
161 else 161 else
162 return iwl_set_temperature_offset_calib(priv); 162 return iwl_set_temperature_offset_calib(priv);
@@ -277,7 +277,7 @@ static int iwl_alive_notify(struct iwl_priv *priv)
277 if (ret) 277 if (ret)
278 return ret; 278 return ret;
279 279
280 if (!priv->cfg->no_xtal_calib) { 280 if (!priv->lib->no_xtal_calib) {
281 ret = iwl_set_Xtal_calib(priv); 281 ret = iwl_set_Xtal_calib(priv);
282 if (ret) 282 if (ret)
283 return ret; 283 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index c080ae3070b2..0d2afe098afc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -60,9 +60,6 @@ static const struct iwl_base_params iwl1000_base_params = {
60 .max_ll_items = OTP_MAX_LL_ITEMS_1000, 60 .max_ll_items = OTP_MAX_LL_ITEMS_1000,
61 .shadow_ram_support = false, 61 .shadow_ram_support = false,
62 .led_compensation = 51, 62 .led_compensation = 51,
63 .support_ct_kill_exit = true,
64 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
65 .chain_noise_scale = 1000,
66 .wd_timeout = IWL_WATCHDOG_DISABLED, 63 .wd_timeout = IWL_WATCHDOG_DISABLED,
67 .max_event_log_size = 128, 64 .max_event_log_size = 128,
68}; 65};
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index a6ddd2f9fba0..c727ec7c90a6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -72,14 +72,9 @@ static const struct iwl_base_params iwl2000_base_params = {
72 .max_ll_items = OTP_MAX_LL_ITEMS_2x00, 72 .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
73 .shadow_ram_support = true, 73 .shadow_ram_support = true,
74 .led_compensation = 51, 74 .led_compensation = 51,
75 .adv_thermal_throttle = true,
76 .support_ct_kill_exit = true,
77 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
78 .chain_noise_scale = 1000,
79 .wd_timeout = IWL_DEF_WD_TIMEOUT, 75 .wd_timeout = IWL_DEF_WD_TIMEOUT,
80 .max_event_log_size = 512, 76 .max_event_log_size = 512,
81 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 77 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
82 .hd_v2 = true,
83}; 78};
84 79
85 80
@@ -90,14 +85,9 @@ static const struct iwl_base_params iwl2030_base_params = {
90 .max_ll_items = OTP_MAX_LL_ITEMS_2x00, 85 .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
91 .shadow_ram_support = true, 86 .shadow_ram_support = true,
92 .led_compensation = 57, 87 .led_compensation = 57,
93 .adv_thermal_throttle = true,
94 .support_ct_kill_exit = true,
95 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
96 .chain_noise_scale = 1000,
97 .wd_timeout = IWL_LONG_WD_TIMEOUT, 88 .wd_timeout = IWL_LONG_WD_TIMEOUT,
98 .max_event_log_size = 512, 89 .max_event_log_size = 512,
99 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 90 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
100 .hd_v2 = true,
101}; 91};
102 92
103static const struct iwl_ht_params iwl2000_ht_params = { 93static const struct iwl_ht_params iwl2000_ht_params = {
@@ -106,16 +96,6 @@ static const struct iwl_ht_params iwl2000_ht_params = {
106 .ht40_bands = BIT(IEEE80211_BAND_2GHZ), 96 .ht40_bands = BIT(IEEE80211_BAND_2GHZ),
107}; 97};
108 98
109static const struct iwl_bt_params iwl2030_bt_params = {
110 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
111 .advanced_bt_coexist = true,
112 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
113 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
114 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT32,
115 .bt_sco_disable = true,
116 .bt_session_2 = true,
117};
118
119static const struct iwl_eeprom_params iwl20x0_eeprom_params = { 99static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
120 .regulatory_bands = { 100 .regulatory_bands = {
121 EEPROM_REG_BAND_1_CHANNELS, 101 EEPROM_REG_BAND_1_CHANNELS,
@@ -137,12 +117,10 @@ static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
137 .device_family = IWL_DEVICE_FAMILY_2000, \ 117 .device_family = IWL_DEVICE_FAMILY_2000, \
138 .max_inst_size = IWL60_RTC_INST_SIZE, \ 118 .max_inst_size = IWL60_RTC_INST_SIZE, \
139 .max_data_size = IWL60_RTC_DATA_SIZE, \ 119 .max_data_size = IWL60_RTC_DATA_SIZE, \
140 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ 120 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
141 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 121 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
142 .base_params = &iwl2000_base_params, \ 122 .base_params = &iwl2000_base_params, \
143 .eeprom_params = &iwl20x0_eeprom_params, \ 123 .eeprom_params = &iwl20x0_eeprom_params, \
144 .need_temp_offset_calib = true, \
145 .temp_offset_v2 = true, \
146 .led_mode = IWL_LED_RF_STATE 124 .led_mode = IWL_LED_RF_STATE
147 125
148const struct iwl_cfg iwl2000_2bgn_cfg = { 126const struct iwl_cfg iwl2000_2bgn_cfg = {
@@ -168,12 +146,8 @@ const struct iwl_cfg iwl2000_2bgn_d_cfg = {
168 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ 146 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
169 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 147 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
170 .base_params = &iwl2030_base_params, \ 148 .base_params = &iwl2030_base_params, \
171 .bt_params = &iwl2030_bt_params, \
172 .eeprom_params = &iwl20x0_eeprom_params, \ 149 .eeprom_params = &iwl20x0_eeprom_params, \
173 .need_temp_offset_calib = true, \ 150 .led_mode = IWL_LED_RF_STATE
174 .temp_offset_v2 = true, \
175 .led_mode = IWL_LED_RF_STATE, \
176 .adv_pm = true
177 151
178const struct iwl_cfg iwl2030_2bgn_cfg = { 152const struct iwl_cfg iwl2030_2bgn_cfg = {
179 .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN", 153 .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN",
@@ -193,10 +167,7 @@ const struct iwl_cfg iwl2030_2bgn_cfg = {
193 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 167 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
194 .base_params = &iwl2000_base_params, \ 168 .base_params = &iwl2000_base_params, \
195 .eeprom_params = &iwl20x0_eeprom_params, \ 169 .eeprom_params = &iwl20x0_eeprom_params, \
196 .need_temp_offset_calib = true, \
197 .temp_offset_v2 = true, \
198 .led_mode = IWL_LED_RF_STATE, \ 170 .led_mode = IWL_LED_RF_STATE, \
199 .adv_pm = true, \
200 .rx_with_siso_diversity = true 171 .rx_with_siso_diversity = true
201 172
202const struct iwl_cfg iwl105_bgn_cfg = { 173const struct iwl_cfg iwl105_bgn_cfg = {
@@ -222,12 +193,8 @@ const struct iwl_cfg iwl105_bgn_d_cfg = {
222 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \ 193 .nvm_ver = EEPROM_2000_EEPROM_VERSION, \
223 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 194 .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
224 .base_params = &iwl2030_base_params, \ 195 .base_params = &iwl2030_base_params, \
225 .bt_params = &iwl2030_bt_params, \
226 .eeprom_params = &iwl20x0_eeprom_params, \ 196 .eeprom_params = &iwl20x0_eeprom_params, \
227 .need_temp_offset_calib = true, \
228 .temp_offset_v2 = true, \
229 .led_mode = IWL_LED_RF_STATE, \ 197 .led_mode = IWL_LED_RF_STATE, \
230 .adv_pm = true, \
231 .rx_with_siso_diversity = true 198 .rx_with_siso_diversity = true
232 199
233const struct iwl_cfg iwl135_bgn_cfg = { 200const struct iwl_cfg iwl135_bgn_cfg = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 403f3f224bf6..ecc01e1a61a1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -59,11 +59,8 @@ static const struct iwl_base_params iwl5000_base_params = {
59 .num_of_queues = IWLAGN_NUM_QUEUES, 59 .num_of_queues = IWLAGN_NUM_QUEUES,
60 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, 60 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
61 .led_compensation = 51, 61 .led_compensation = 51,
62 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF,
63 .chain_noise_scale = 1000,
64 .wd_timeout = IWL_WATCHDOG_DISABLED, 62 .wd_timeout = IWL_WATCHDOG_DISABLED,
65 .max_event_log_size = 512, 63 .max_event_log_size = 512,
66 .no_idle_support = true,
67}; 64};
68 65
69static const struct iwl_ht_params iwl5000_ht_params = { 66static const struct iwl_ht_params iwl5000_ht_params = {
@@ -159,7 +156,6 @@ const struct iwl_cfg iwl5350_agn_cfg = {
159 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ 156 .nvm_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
160 .base_params = &iwl5000_base_params, \ 157 .base_params = &iwl5000_base_params, \
161 .eeprom_params = &iwl5000_eeprom_params, \ 158 .eeprom_params = &iwl5000_eeprom_params, \
162 .no_xtal_calib = true, \
163 .led_mode = IWL_LED_BLINK, \ 159 .led_mode = IWL_LED_BLINK, \
164 .internal_wimax_coex = true 160 .internal_wimax_coex = true
165 161
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index b5ab8d1bcac0..30d45e2fc193 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -82,10 +82,6 @@ static const struct iwl_base_params iwl6000_base_params = {
82 .max_ll_items = OTP_MAX_LL_ITEMS_6x00, 82 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
83 .shadow_ram_support = true, 83 .shadow_ram_support = true,
84 .led_compensation = 51, 84 .led_compensation = 51,
85 .adv_thermal_throttle = true,
86 .support_ct_kill_exit = true,
87 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
88 .chain_noise_scale = 1000,
89 .wd_timeout = IWL_DEF_WD_TIMEOUT, 85 .wd_timeout = IWL_DEF_WD_TIMEOUT,
90 .max_event_log_size = 512, 86 .max_event_log_size = 512,
91 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 87 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
@@ -98,10 +94,6 @@ static const struct iwl_base_params iwl6050_base_params = {
98 .max_ll_items = OTP_MAX_LL_ITEMS_6x50, 94 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
99 .shadow_ram_support = true, 95 .shadow_ram_support = true,
100 .led_compensation = 51, 96 .led_compensation = 51,
101 .adv_thermal_throttle = true,
102 .support_ct_kill_exit = true,
103 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
104 .chain_noise_scale = 1500,
105 .wd_timeout = IWL_DEF_WD_TIMEOUT, 97 .wd_timeout = IWL_DEF_WD_TIMEOUT,
106 .max_event_log_size = 1024, 98 .max_event_log_size = 1024,
107 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 99 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
@@ -114,10 +106,6 @@ static const struct iwl_base_params iwl6000_g2_base_params = {
114 .max_ll_items = OTP_MAX_LL_ITEMS_6x00, 106 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
115 .shadow_ram_support = true, 107 .shadow_ram_support = true,
116 .led_compensation = 57, 108 .led_compensation = 57,
117 .adv_thermal_throttle = true,
118 .support_ct_kill_exit = true,
119 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
120 .chain_noise_scale = 1000,
121 .wd_timeout = IWL_LONG_WD_TIMEOUT, 109 .wd_timeout = IWL_LONG_WD_TIMEOUT,
122 .max_event_log_size = 512, 110 .max_event_log_size = 512,
123 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */ 111 .shadow_reg_enable = false, /* TODO: fix bugs using this feature */
@@ -129,15 +117,6 @@ static const struct iwl_ht_params iwl6000_ht_params = {
129 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), 117 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
130}; 118};
131 119
132static const struct iwl_bt_params iwl6000_bt_params = {
133 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
134 .advanced_bt_coexist = true,
135 .agg_time_limit = BT_AGG_THRESHOLD_DEF,
136 .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
137 .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
138 .bt_sco_disable = true,
139};
140
141static const struct iwl_eeprom_params iwl6000_eeprom_params = { 120static const struct iwl_eeprom_params iwl6000_eeprom_params = {
142 .regulatory_bands = { 121 .regulatory_bands = {
143 EEPROM_REG_BAND_1_CHANNELS, 122 EEPROM_REG_BAND_1_CHANNELS,
@@ -163,7 +142,6 @@ static const struct iwl_eeprom_params iwl6000_eeprom_params = {
163 .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ 142 .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
164 .base_params = &iwl6000_g2_base_params, \ 143 .base_params = &iwl6000_g2_base_params, \
165 .eeprom_params = &iwl6000_eeprom_params, \ 144 .eeprom_params = &iwl6000_eeprom_params, \
166 .need_temp_offset_calib = true, \
167 .led_mode = IWL_LED_RF_STATE 145 .led_mode = IWL_LED_RF_STATE
168 146
169const struct iwl_cfg iwl6005_2agn_cfg = { 147const struct iwl_cfg iwl6005_2agn_cfg = {
@@ -217,11 +195,8 @@ const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
217 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \ 195 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
218 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ 196 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
219 .base_params = &iwl6000_g2_base_params, \ 197 .base_params = &iwl6000_g2_base_params, \
220 .bt_params = &iwl6000_bt_params, \
221 .eeprom_params = &iwl6000_eeprom_params, \ 198 .eeprom_params = &iwl6000_eeprom_params, \
222 .need_temp_offset_calib = true, \ 199 .led_mode = IWL_LED_RF_STATE
223 .led_mode = IWL_LED_RF_STATE, \
224 .adv_pm = true \
225 200
226const struct iwl_cfg iwl6030_2agn_cfg = { 201const struct iwl_cfg iwl6030_2agn_cfg = {
227 .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN", 202 .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
@@ -256,11 +231,8 @@ const struct iwl_cfg iwl6030_2bg_cfg = {
256 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \ 231 .nvm_ver = EEPROM_6030_EEPROM_VERSION, \
257 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ 232 .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
258 .base_params = &iwl6000_g2_base_params, \ 233 .base_params = &iwl6000_g2_base_params, \
259 .bt_params = &iwl6000_bt_params, \
260 .eeprom_params = &iwl6000_eeprom_params, \ 234 .eeprom_params = &iwl6000_eeprom_params, \
261 .need_temp_offset_calib = true, \ 235 .led_mode = IWL_LED_RF_STATE
262 .led_mode = IWL_LED_RF_STATE, \
263 .adv_pm = true
264 236
265const struct iwl_cfg iwl6035_2agn_cfg = { 237const struct iwl_cfg iwl6035_2agn_cfg = {
266 .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN", 238 .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c
index c9aae2a2bbbb..d4f3b4864ab1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-7000.c
@@ -96,10 +96,6 @@ static const struct iwl_base_params iwl7000_base_params = {
96 .pll_cfg_val = 0, 96 .pll_cfg_val = 0,
97 .shadow_ram_support = true, 97 .shadow_ram_support = true,
98 .led_compensation = 57, 98 .led_compensation = 57,
99 .adv_thermal_throttle = true,
100 .support_ct_kill_exit = true,
101 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
102 .chain_noise_scale = 1000,
103 .wd_timeout = IWL_LONG_WD_TIMEOUT, 99 .wd_timeout = IWL_LONG_WD_TIMEOUT,
104 .max_event_log_size = 512, 100 .max_event_log_size = 512,
105 .shadow_reg_enable = true, 101 .shadow_reg_enable = true,
@@ -118,10 +114,7 @@ static const struct iwl_ht_params iwl7000_ht_params = {
118 .max_inst_size = IWL60_RTC_INST_SIZE, \ 114 .max_inst_size = IWL60_RTC_INST_SIZE, \
119 .max_data_size = IWL60_RTC_DATA_SIZE, \ 115 .max_data_size = IWL60_RTC_DATA_SIZE, \
120 .base_params = &iwl7000_base_params, \ 116 .base_params = &iwl7000_base_params, \
121 /* TODO: .bt_params? */ \ 117 .led_mode = IWL_LED_RF_STATE
122 .need_temp_offset_calib = true, \
123 .led_mode = IWL_LED_RF_STATE, \
124 .adv_pm = true \
125 118
126 119
127const struct iwl_cfg iwl7260_2ac_cfg = { 120const struct iwl_cfg iwl7260_2ac_cfg = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h
index c3c9268affab..a193832fc790 100644
--- a/drivers/net/wireless/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/iwlwifi/iwl-config.h
@@ -136,17 +136,9 @@ enum iwl_led_mode {
136 * @led_compensation: compensate on the led on/off time per HW according 136 * @led_compensation: compensate on the led on/off time per HW according
137 * to the deviation to achieve the desired led frequency. 137 * to the deviation to achieve the desired led frequency.
138 * The detail algorithm is described in iwl-led.c 138 * The detail algorithm is described in iwl-led.c
139 * @chain_noise_num_beacons: number of beacons used to compute chain noise
140 * @adv_thermal_throttle: support advance thermal throttle
141 * @support_ct_kill_exit: support ct kill exit condition
142 * @plcp_delta_threshold: plcp error rate threshold used to trigger
143 * radio tuning when there is a high receiving plcp error rate
144 * @chain_noise_scale: default chain noise scale used for gain computation
145 * @wd_timeout: TX queues watchdog timeout 139 * @wd_timeout: TX queues watchdog timeout
146 * @max_event_log_size: size of event log buffer size for ucode event logging 140 * @max_event_log_size: size of event log buffer size for ucode event logging
147 * @shadow_reg_enable: HW shadow register support 141 * @shadow_reg_enable: HW shadow register support
148 * @hd_v2: v2 of enhanced sensitivity value, used for 2000 series and up
149 * @no_idle_support: do not support idle mode
150 */ 142 */
151struct iwl_base_params { 143struct iwl_base_params {
152 int eeprom_size; 144 int eeprom_size;
@@ -157,31 +149,9 @@ struct iwl_base_params {
157 const u16 max_ll_items; 149 const u16 max_ll_items;
158 const bool shadow_ram_support; 150 const bool shadow_ram_support;
159 u16 led_compensation; 151 u16 led_compensation;
160 bool adv_thermal_throttle;
161 bool support_ct_kill_exit;
162 u8 plcp_delta_threshold;
163 s32 chain_noise_scale;
164 unsigned int wd_timeout; 152 unsigned int wd_timeout;
165 u32 max_event_log_size; 153 u32 max_event_log_size;
166 const bool shadow_reg_enable; 154 const bool shadow_reg_enable;
167 const bool hd_v2;
168 const bool no_idle_support;
169};
170
171/*
172 * @advanced_bt_coexist: support advanced bt coexist
173 * @bt_init_traffic_load: specify initial bt traffic load
174 * @bt_prio_boost: default bt priority boost value
175 * @agg_time_limit: maximum number of uSec in aggregation
176 * @bt_sco_disable: uCode should not response to BT in SCO/ESCO mode
177 */
178struct iwl_bt_params {
179 bool advanced_bt_coexist;
180 u8 bt_init_traffic_load;
181 u32 bt_prio_boost;
182 u16 agg_time_limit;
183 bool bt_sco_disable;
184 bool bt_session_2;
185}; 155};
186 156
187/* 157/*
@@ -231,16 +201,10 @@ struct iwl_eeprom_params {
231 * @nvm_calib_ver: NVM calibration version 201 * @nvm_calib_ver: NVM calibration version
232 * @lib: pointer to the lib ops 202 * @lib: pointer to the lib ops
233 * @base_params: pointer to basic parameters 203 * @base_params: pointer to basic parameters
234 * @ht_params: point to ht patameters 204 * @ht_params: point to ht parameters
235 * @bt_params: pointer to bt parameters
236 * @need_temp_offset_calib: need to perform temperature offset calibration
237 * @no_xtal_calib: some devices do not need crystal calibration data,
238 * don't send it to those
239 * @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off) 205 * @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off)
240 * @adv_pm: advance power management
241 * @rx_with_siso_diversity: 1x1 device with rx antenna diversity 206 * @rx_with_siso_diversity: 1x1 device with rx antenna diversity
242 * @internal_wimax_coex: internal wifi/wimax combo device 207 * @internal_wimax_coex: internal wifi/wimax combo device
243 * @temp_offset_v2: support v2 of temperature offset calibration
244 * 208 *
245 * We enable the driver to be backward compatible wrt. hardware features. 209 * We enable the driver to be backward compatible wrt. hardware features.
246 * API differences in uCode shouldn't be handled here but through TLVs 210 * API differences in uCode shouldn't be handled here but through TLVs
@@ -264,15 +228,10 @@ struct iwl_cfg {
264 const struct iwl_base_params *base_params; 228 const struct iwl_base_params *base_params;
265 /* params likely to change within a device family */ 229 /* params likely to change within a device family */
266 const struct iwl_ht_params *ht_params; 230 const struct iwl_ht_params *ht_params;
267 const struct iwl_bt_params *bt_params;
268 const struct iwl_eeprom_params *eeprom_params; 231 const struct iwl_eeprom_params *eeprom_params;
269 const bool need_temp_offset_calib; /* if used set to true */
270 const bool no_xtal_calib;
271 enum iwl_led_mode led_mode; 232 enum iwl_led_mode led_mode;
272 const bool adv_pm;
273 const bool rx_with_siso_diversity; 233 const bool rx_with_siso_diversity;
274 const bool internal_wimax_coex; 234 const bool internal_wimax_coex;
275 const bool temp_offset_v2;
276}; 235};
277 236
278/* 237/*