aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 81c1cd7fdc9e..6771b6dd250b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -674,7 +674,7 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv)
674 674
675 priv->thermal_throttle.ct_kill_toggle = false; 675 priv->thermal_throttle.ct_kill_toggle = false;
676 676
677 if (cfg(priv)->base_params->support_ct_kill_exit) { 677 if (priv->cfg->base_params->support_ct_kill_exit) {
678 adv_cmd.critical_temperature_enter = 678 adv_cmd.critical_temperature_enter =
679 cpu_to_le32(priv->hw_params.ct_kill_threshold); 679 cpu_to_le32(priv->hw_params.ct_kill_threshold);
680 adv_cmd.critical_temperature_exit = 680 adv_cmd.critical_temperature_exit =
@@ -791,10 +791,10 @@ int iwl_alive_start(struct iwl_priv *priv)
791 } 791 }
792 792
793 /* download priority table before any calibration request */ 793 /* download priority table before any calibration request */
794 if (cfg(priv)->bt_params && 794 if (priv->cfg->bt_params &&
795 cfg(priv)->bt_params->advanced_bt_coexist) { 795 priv->cfg->bt_params->advanced_bt_coexist) {
796 /* Configure Bluetooth device coexistence support */ 796 /* Configure Bluetooth device coexistence support */
797 if (cfg(priv)->bt_params->bt_sco_disable) 797 if (priv->cfg->bt_params->bt_sco_disable)
798 priv->bt_enable_pspoll = false; 798 priv->bt_enable_pspoll = false;
799 else 799 else
800 priv->bt_enable_pspoll = true; 800 priv->bt_enable_pspoll = true;
@@ -931,9 +931,9 @@ void iwl_down(struct iwl_priv *priv)
931 priv->bt_status = 0; 931 priv->bt_status = 0;
932 priv->cur_rssi_ctx = NULL; 932 priv->cur_rssi_ctx = NULL;
933 priv->bt_is_sco = 0; 933 priv->bt_is_sco = 0;
934 if (cfg(priv)->bt_params) 934 if (priv->cfg->bt_params)
935 priv->bt_traffic_load = 935 priv->bt_traffic_load =
936 cfg(priv)->bt_params->bt_init_traffic_load; 936 priv->cfg->bt_params->bt_init_traffic_load;
937 else 937 else
938 priv->bt_traffic_load = 0; 938 priv->bt_traffic_load = 0;
939 priv->bt_full_concurrent = false; 939 priv->bt_full_concurrent = false;
@@ -1114,7 +1114,7 @@ void iwl_setup_deferred_work(struct iwl_priv *priv)
1114 1114
1115 iwl_setup_scan_deferred_work(priv); 1115 iwl_setup_scan_deferred_work(priv);
1116 1116
1117 if (cfg(priv)->bt_params) 1117 if (priv->cfg->bt_params)
1118 iwlagn_bt_setup_deferred_work(priv); 1118 iwlagn_bt_setup_deferred_work(priv);
1119 1119
1120 init_timer(&priv->statistics_periodic); 1120 init_timer(&priv->statistics_periodic);
@@ -1128,7 +1128,7 @@ void iwl_setup_deferred_work(struct iwl_priv *priv)
1128 1128
1129void iwl_cancel_deferred_work(struct iwl_priv *priv) 1129void iwl_cancel_deferred_work(struct iwl_priv *priv)
1130{ 1130{
1131 if (cfg(priv)->bt_params) 1131 if (priv->cfg->bt_params)
1132 iwlagn_bt_cancel_deferred_work(priv); 1132 iwlagn_bt_cancel_deferred_work(priv);
1133 1133
1134 cancel_work_sync(&priv->run_time_calib_work); 1134 cancel_work_sync(&priv->run_time_calib_work);
@@ -1179,8 +1179,8 @@ static void iwl_init_ht_hw_capab(const struct iwl_priv *priv,
1179 1179
1180 ht_info->ht_supported = true; 1180 ht_info->ht_supported = true;
1181 1181
1182 if (cfg(priv)->ht_params && 1182 if (priv->cfg->ht_params &&
1183 cfg(priv)->ht_params->ht_greenfield_support) 1183 priv->cfg->ht_params->ht_greenfield_support)
1184 ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; 1184 ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
1185 ht_info->cap |= IEEE80211_HT_CAP_SGI_20; 1185 ht_info->cap |= IEEE80211_HT_CAP_SGI_20;
1186 max_bit_rate = MAX_BIT_RATE_20_MHZ; 1186 max_bit_rate = MAX_BIT_RATE_20_MHZ;
@@ -1362,7 +1362,7 @@ int iwl_init_drv(struct iwl_priv *priv)
1362 priv->band = IEEE80211_BAND_2GHZ; 1362 priv->band = IEEE80211_BAND_2GHZ;
1363 1363
1364 priv->plcp_delta_threshold = 1364 priv->plcp_delta_threshold =
1365 cfg(priv)->base_params->plcp_delta_threshold; 1365 priv->cfg->base_params->plcp_delta_threshold;
1366 1366
1367 priv->iw_mode = NL80211_IFTYPE_STATION; 1367 priv->iw_mode = NL80211_IFTYPE_STATION;
1368 priv->current_ht_config.smps = IEEE80211_SMPS_STATIC; 1368 priv->current_ht_config.smps = IEEE80211_SMPS_STATIC;
@@ -1379,8 +1379,8 @@ int iwl_init_drv(struct iwl_priv *priv)
1379 iwl_init_scan_params(priv); 1379 iwl_init_scan_params(priv);
1380 1380
1381 /* init bt coex */ 1381 /* init bt coex */
1382 if (cfg(priv)->bt_params && 1382 if (priv->cfg->bt_params &&
1383 cfg(priv)->bt_params->advanced_bt_coexist) { 1383 priv->cfg->bt_params->advanced_bt_coexist) {
1384 priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; 1384 priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT;
1385 priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; 1385 priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT;
1386 priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; 1386 priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK;
@@ -1425,9 +1425,9 @@ void iwl_uninit_drv(struct iwl_priv *priv)
1425 1425
1426void iwl_set_hw_params(struct iwl_priv *priv) 1426void iwl_set_hw_params(struct iwl_priv *priv)
1427{ 1427{
1428 if (cfg(priv)->ht_params) 1428 if (priv->cfg->ht_params)
1429 priv->hw_params.use_rts_for_aggregation = 1429 priv->hw_params.use_rts_for_aggregation =
1430 cfg(priv)->ht_params->use_rts_for_aggregation; 1430 priv->cfg->ht_params->use_rts_for_aggregation;
1431 1431
1432 if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_ALL) 1432 if (iwlagn_mod_params.disable_11n & IWL_DISABLE_HT_ALL)
1433 priv->hw_params.sku &= ~EEPROM_SKU_CAP_11N_ENABLE; 1433 priv->hw_params.sku &= ~EEPROM_SKU_CAP_11N_ENABLE;
@@ -1474,6 +1474,7 @@ void iwl_debug_config(struct iwl_priv *priv)
1474} 1474}
1475 1475
1476static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, 1476static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1477 const struct iwl_cfg *cfg,
1477 const struct iwl_fw *fw) 1478 const struct iwl_fw *fw)
1478{ 1479{
1479 struct iwl_priv *priv; 1480 struct iwl_priv *priv;
@@ -1499,8 +1500,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1499 ************************/ 1500 ************************/
1500 hw = iwl_alloc_all(); 1501 hw = iwl_alloc_all();
1501 if (!hw) { 1502 if (!hw) {
1502 pr_err("%s: Cannot allocate network device\n", 1503 pr_err("%s: Cannot allocate network device\n", cfg->name);
1503 cfg(trans)->name);
1504 goto out; 1504 goto out;
1505 } 1505 }
1506 1506
@@ -1509,9 +1509,10 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1509 priv = IWL_OP_MODE_GET_DVM(op_mode); 1509 priv = IWL_OP_MODE_GET_DVM(op_mode);
1510 priv->shrd = trans->shrd; 1510 priv->shrd = trans->shrd;
1511 priv->trans = trans; 1511 priv->trans = trans;
1512 priv->cfg = cfg;
1512 priv->fw = fw; 1513 priv->fw = fw;
1513 1514
1514 switch (cfg(priv)->device_family) { 1515 switch (priv->cfg->device_family) {
1515 case IWL_DEVICE_FAMILY_1000: 1516 case IWL_DEVICE_FAMILY_1000:
1516 case IWL_DEVICE_FAMILY_100: 1517 case IWL_DEVICE_FAMILY_100:
1517 priv->lib = &iwl1000_lib; 1518 priv->lib = &iwl1000_lib;
@@ -1557,7 +1558,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1557 trans_cfg.rx_buf_size_8k = iwlagn_mod_params.amsdu_size_8K; 1558 trans_cfg.rx_buf_size_8k = iwlagn_mod_params.amsdu_size_8K;
1558 if (!iwlagn_mod_params.wd_disable) 1559 if (!iwlagn_mod_params.wd_disable)
1559 trans_cfg.queue_watchdog_timeout = 1560 trans_cfg.queue_watchdog_timeout =
1560 cfg(priv)->base_params->wd_timeout; 1561 priv->cfg->base_params->wd_timeout;
1561 else 1562 else
1562 trans_cfg.queue_watchdog_timeout = IWL_WATCHHDOG_DISABLED; 1563 trans_cfg.queue_watchdog_timeout = IWL_WATCHHDOG_DISABLED;
1563 trans_cfg.command_names = iwl_dvm_cmd_strings; 1564 trans_cfg.command_names = iwl_dvm_cmd_strings;
@@ -1622,7 +1623,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1622 * 2. Read REV register 1623 * 2. Read REV register
1623 ***********************/ 1624 ***********************/
1624 IWL_INFO(priv, "Detected %s, REV=0x%X\n", 1625 IWL_INFO(priv, "Detected %s, REV=0x%X\n",
1625 cfg(priv)->name, priv->trans->hw_rev); 1626 priv->cfg->name, priv->trans->hw_rev);
1626 1627
1627 if (iwl_trans_start_hw(priv->trans)) 1628 if (iwl_trans_start_hw(priv->trans))
1628 goto out_free_traffic_mem; 1629 goto out_free_traffic_mem;