diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-05-17 04:36:29 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-05-27 07:11:42 -0400 |
commit | 0d8877a10d65f3c9bb84ad150e524d95ebd377fb (patch) | |
tree | 628329246e509f0a574b0fa017f2f55489e1b4c9 /drivers/net/wireless/iwlwifi/dvm/main.c | |
parent | ee4d5471333c323693f79cdb7b145b40e12baa77 (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/iwlwifi/dvm/main.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/main.c | 35 |
1 files changed, 20 insertions, 15 deletions
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 | ||
1073 | void iwl_cancel_deferred_work(struct iwl_priv *priv) | 1073 | void 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; |