aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-10-06 11:10:00 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-10-06 11:10:00 -0400
commit7cb1b0887fcc61918e3d64827fbef968bb67a57a (patch)
treefa9103423af207c68be604523b3a362e1a6c3e14 /drivers/net/wireless/iwlwifi/iwl-agn-tx.c
parent72645eff4b2ad6cf2b016b54f9d6817cca0a621d (diff)
iwlagn: reduce redundant parameter definitions
move paramater definitions to a device paramater structure only leaving the device name, which antennas are used and what firmware file to use in the iwl_cfg structure. this will not completely remove the redundancies but greatly reduce them for devices that only vary by name or antennas. the parameters that are more likely to change within a given device family are left in iwl_cfg. also separate bt param structure added to help reduce more. Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 5950184d986..77753b72f23 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -224,13 +224,13 @@ int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id,
224 int ret; 224 int ret;
225 225
226 if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || 226 if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) ||
227 (IWLAGN_FIRST_AMPDU_QUEUE + priv->cfg->num_of_ampdu_queues 227 (IWLAGN_FIRST_AMPDU_QUEUE +
228 <= txq_id)) { 228 priv->cfg->base_params->num_of_ampdu_queues <= txq_id)) {
229 IWL_WARN(priv, 229 IWL_WARN(priv,
230 "queue number out of range: %d, must be %d to %d\n", 230 "queue number out of range: %d, must be %d to %d\n",
231 txq_id, IWLAGN_FIRST_AMPDU_QUEUE, 231 txq_id, IWLAGN_FIRST_AMPDU_QUEUE,
232 IWLAGN_FIRST_AMPDU_QUEUE + 232 IWLAGN_FIRST_AMPDU_QUEUE +
233 priv->cfg->num_of_ampdu_queues - 1); 233 priv->cfg->base_params->num_of_ampdu_queues - 1);
234 return -EINVAL; 234 return -EINVAL;
235 } 235 }
236 236
@@ -286,13 +286,13 @@ int iwlagn_txq_agg_disable(struct iwl_priv *priv, u16 txq_id,
286 u16 ssn_idx, u8 tx_fifo) 286 u16 ssn_idx, u8 tx_fifo)
287{ 287{
288 if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || 288 if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) ||
289 (IWLAGN_FIRST_AMPDU_QUEUE + priv->cfg->num_of_ampdu_queues 289 (IWLAGN_FIRST_AMPDU_QUEUE +
290 <= txq_id)) { 290 priv->cfg->base_params->num_of_ampdu_queues <= txq_id)) {
291 IWL_ERR(priv, 291 IWL_ERR(priv,
292 "queue number out of range: %d, must be %d to %d\n", 292 "queue number out of range: %d, must be %d to %d\n",
293 txq_id, IWLAGN_FIRST_AMPDU_QUEUE, 293 txq_id, IWLAGN_FIRST_AMPDU_QUEUE,
294 IWLAGN_FIRST_AMPDU_QUEUE + 294 IWLAGN_FIRST_AMPDU_QUEUE +
295 priv->cfg->num_of_ampdu_queues - 1); 295 priv->cfg->base_params->num_of_ampdu_queues - 1);
296 return -EINVAL; 296 return -EINVAL;
297 } 297 }
298 298
@@ -350,7 +350,8 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
350 if (ieee80211_is_back_req(fc)) 350 if (ieee80211_is_back_req(fc))
351 tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; 351 tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK;
352 else if (info->band == IEEE80211_BAND_2GHZ && 352 else if (info->band == IEEE80211_BAND_2GHZ &&
353 priv->cfg->advanced_bt_coexist && 353 priv->cfg->bt_params &&
354 priv->cfg->bt_params->advanced_bt_coexist &&
354 (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || 355 (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) ||
355 ieee80211_is_reassoc_req(fc) || 356 ieee80211_is_reassoc_req(fc) ||
356 skb->protocol == cpu_to_be16(ETH_P_PAE))) 357 skb->protocol == cpu_to_be16(ETH_P_PAE)))
@@ -444,7 +445,9 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
444 rate_flags |= RATE_MCS_CCK_MSK; 445 rate_flags |= RATE_MCS_CCK_MSK;
445 446
446 /* Set up antennas */ 447 /* Set up antennas */
447 if (priv->cfg->advanced_bt_coexist && priv->bt_full_concurrent) { 448 if (priv->cfg->bt_params &&
449 priv->cfg->bt_params->advanced_bt_coexist &&
450 priv->bt_full_concurrent) {
448 /* operated as 1x1 in full concurrency mode */ 451 /* operated as 1x1 in full concurrency mode */
449 priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant, 452 priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant,
450 first_antenna(priv->hw_params.valid_tx_ant)); 453 first_antenna(priv->hw_params.valid_tx_ant));