diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 3b6f48bfe0e3..d037f69afdc1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -60,8 +60,8 @@ static void iwl_init_ht_hw_capab(const struct iwl_priv *priv, | |||
60 | 60 | ||
61 | ht_info->ht_supported = true; | 61 | ht_info->ht_supported = true; |
62 | 62 | ||
63 | if (priv->cfg->ht_params && | 63 | if (cfg(priv)->ht_params && |
64 | priv->cfg->ht_params->ht_greenfield_support) | 64 | cfg(priv)->ht_params->ht_greenfield_support) |
65 | ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; | 65 | ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; |
66 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; | 66 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; |
67 | max_bit_rate = MAX_BIT_RATE_20_MHZ; | 67 | max_bit_rate = MAX_BIT_RATE_20_MHZ; |
@@ -76,11 +76,11 @@ static void iwl_init_ht_hw_capab(const struct iwl_priv *priv, | |||
76 | ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; | 76 | ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; |
77 | 77 | ||
78 | ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF; | 78 | ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF; |
79 | if (priv->cfg->bt_params && priv->cfg->bt_params->ampdu_factor) | 79 | if (cfg(priv)->bt_params && cfg(priv)->bt_params->ampdu_factor) |
80 | ht_info->ampdu_factor = priv->cfg->bt_params->ampdu_factor; | 80 | ht_info->ampdu_factor = cfg(priv)->bt_params->ampdu_factor; |
81 | ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF; | 81 | ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF; |
82 | if (priv->cfg->bt_params && priv->cfg->bt_params->ampdu_density) | 82 | if (cfg(priv)->bt_params && cfg(priv)->bt_params->ampdu_density) |
83 | ht_info->ampdu_density = priv->cfg->bt_params->ampdu_density; | 83 | ht_info->ampdu_density = cfg(priv)->bt_params->ampdu_density; |
84 | 84 | ||
85 | ht_info->mcs.rx_mask[0] = 0xFF; | 85 | ht_info->mcs.rx_mask[0] = 0xFF; |
86 | if (rx_chains_num >= 2) | 86 | if (rx_chains_num >= 2) |
@@ -141,7 +141,7 @@ int iwl_init_geos(struct iwl_priv *priv) | |||
141 | sband->bitrates = &rates[IWL_FIRST_OFDM_RATE]; | 141 | sband->bitrates = &rates[IWL_FIRST_OFDM_RATE]; |
142 | sband->n_bitrates = IWL_RATE_COUNT_LEGACY - IWL_FIRST_OFDM_RATE; | 142 | sband->n_bitrates = IWL_RATE_COUNT_LEGACY - IWL_FIRST_OFDM_RATE; |
143 | 143 | ||
144 | if (priv->cfg->sku & EEPROM_SKU_CAP_11N_ENABLE) | 144 | if (cfg(priv)->sku & EEPROM_SKU_CAP_11N_ENABLE) |
145 | iwl_init_ht_hw_capab(priv, &sband->ht_cap, | 145 | iwl_init_ht_hw_capab(priv, &sband->ht_cap, |
146 | IEEE80211_BAND_5GHZ); | 146 | IEEE80211_BAND_5GHZ); |
147 | 147 | ||
@@ -151,7 +151,7 @@ int iwl_init_geos(struct iwl_priv *priv) | |||
151 | sband->bitrates = rates; | 151 | sband->bitrates = rates; |
152 | sband->n_bitrates = IWL_RATE_COUNT_LEGACY; | 152 | sband->n_bitrates = IWL_RATE_COUNT_LEGACY; |
153 | 153 | ||
154 | if (priv->cfg->sku & EEPROM_SKU_CAP_11N_ENABLE) | 154 | if (cfg(priv)->sku & EEPROM_SKU_CAP_11N_ENABLE) |
155 | iwl_init_ht_hw_capab(priv, &sband->ht_cap, | 155 | iwl_init_ht_hw_capab(priv, &sband->ht_cap, |
156 | IEEE80211_BAND_2GHZ); | 156 | IEEE80211_BAND_2GHZ); |
157 | 157 | ||
@@ -206,12 +206,12 @@ int iwl_init_geos(struct iwl_priv *priv) | |||
206 | priv->tx_power_next = max_tx_power; | 206 | priv->tx_power_next = max_tx_power; |
207 | 207 | ||
208 | if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && | 208 | if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) && |
209 | priv->cfg->sku & EEPROM_SKU_CAP_BAND_52GHZ) { | 209 | cfg(priv)->sku & EEPROM_SKU_CAP_BAND_52GHZ) { |
210 | char buf[32]; | 210 | char buf[32]; |
211 | bus_get_hw_id(bus(priv), buf, sizeof(buf)); | 211 | bus_get_hw_id(bus(priv), buf, sizeof(buf)); |
212 | IWL_INFO(priv, "Incorrectly detected BG card as ABG. " | 212 | IWL_INFO(priv, "Incorrectly detected BG card as ABG. " |
213 | "Please send your %s to maintainer.\n", buf); | 213 | "Please send your %s to maintainer.\n", buf); |
214 | priv->cfg->sku &= ~EEPROM_SKU_CAP_BAND_52GHZ; | 214 | cfg(priv)->sku &= ~EEPROM_SKU_CAP_BAND_52GHZ; |
215 | } | 215 | } |
216 | 216 | ||
217 | IWL_INFO(priv, "Tunable channels: %d 802.11bg, %d 802.11a channels\n", | 217 | IWL_INFO(priv, "Tunable channels: %d 802.11bg, %d 802.11a channels\n", |
@@ -966,9 +966,9 @@ int iwl_apm_init(struct iwl_priv *priv) | |||
966 | bus_apm_config(bus(priv)); | 966 | bus_apm_config(bus(priv)); |
967 | 967 | ||
968 | /* Configure analog phase-lock-loop before activating to D0A */ | 968 | /* Configure analog phase-lock-loop before activating to D0A */ |
969 | if (priv->cfg->base_params->pll_cfg_val) | 969 | if (cfg(priv)->base_params->pll_cfg_val) |
970 | iwl_set_bit(bus(priv), CSR_ANA_PLL_CFG, | 970 | iwl_set_bit(bus(priv), CSR_ANA_PLL_CFG, |
971 | priv->cfg->base_params->pll_cfg_val); | 971 | cfg(priv)->base_params->pll_cfg_val); |
972 | 972 | ||
973 | /* | 973 | /* |
974 | * Set "initialization complete" bit to move adapter from | 974 | * Set "initialization complete" bit to move adapter from |
@@ -1465,7 +1465,7 @@ void iwl_bg_watchdog(unsigned long data) | |||
1465 | if (iwl_is_rfkill(priv->shrd)) | 1465 | if (iwl_is_rfkill(priv->shrd)) |
1466 | return; | 1466 | return; |
1467 | 1467 | ||
1468 | timeout = priv->cfg->base_params->wd_timeout; | 1468 | timeout = cfg(priv)->base_params->wd_timeout; |
1469 | if (timeout == 0) | 1469 | if (timeout == 0) |
1470 | return; | 1470 | return; |
1471 | 1471 | ||
@@ -1490,11 +1490,11 @@ void iwl_bg_watchdog(unsigned long data) | |||
1490 | 1490 | ||
1491 | void iwl_setup_watchdog(struct iwl_priv *priv) | 1491 | void iwl_setup_watchdog(struct iwl_priv *priv) |
1492 | { | 1492 | { |
1493 | unsigned int timeout = priv->cfg->base_params->wd_timeout; | 1493 | unsigned int timeout = cfg(priv)->base_params->wd_timeout; |
1494 | 1494 | ||
1495 | if (!iwlagn_mod_params.wd_disable) { | 1495 | if (!iwlagn_mod_params.wd_disable) { |
1496 | /* use system default */ | 1496 | /* use system default */ |
1497 | if (timeout && !priv->cfg->base_params->wd_disable) | 1497 | if (timeout && !cfg(priv)->base_params->wd_disable) |
1498 | mod_timer(&priv->watchdog, | 1498 | mod_timer(&priv->watchdog, |
1499 | jiffies + | 1499 | jiffies + |
1500 | msecs_to_jiffies(IWL_WD_TICK(timeout))); | 1500 | msecs_to_jiffies(IWL_WD_TICK(timeout))); |
@@ -1619,8 +1619,7 @@ void iwl_set_hw_rfkill_state(struct iwl_priv *priv, bool state) | |||
1619 | 1619 | ||
1620 | void iwl_nic_config(struct iwl_priv *priv) | 1620 | void iwl_nic_config(struct iwl_priv *priv) |
1621 | { | 1621 | { |
1622 | priv->cfg->lib->nic_config(priv); | 1622 | cfg(priv)->lib->nic_config(priv); |
1623 | |||
1624 | } | 1623 | } |
1625 | 1624 | ||
1626 | void iwl_free_skb(struct iwl_priv *priv, struct sk_buff *skb) | 1625 | void iwl_free_skb(struct iwl_priv *priv, struct sk_buff *skb) |