aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-01-21 09:09:28 -0500
committerReinette Chatre <reinette.chatre@intel.com>2010-03-09 19:03:26 -0500
commitee525d13f501baeaa33209620398adaf0a820629 (patch)
tree78b992a190ac325d64fa929b3fcbe6913f572044 /drivers/net/wireless/iwlwifi/iwl-3945.c
parenta1175124f34a4b859b5064efb84a197e4f6794a6 (diff)
iwlwifi: move 3945 specific data into union
To be obviously correct, this patch only modifies 3945 files and the struct definition. A follow-up patch will create the AGN part of the union. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 303cc8193adc..867bd69270f8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -242,7 +242,7 @@ int iwl3945_rs_next_rate(struct iwl_priv *priv, int rate)
242 next_rate = IWL_RATE_6M_INDEX; 242 next_rate = IWL_RATE_6M_INDEX;
243 break; 243 break;
244 case IEEE80211_BAND_2GHZ: 244 case IEEE80211_BAND_2GHZ:
245 if (!(priv->sta_supp_rates & IWL_OFDM_RATES_MASK) && 245 if (!(priv->_3945.sta_supp_rates & IWL_OFDM_RATES_MASK) &&
246 iwl_is_associated(priv)) { 246 iwl_is_associated(priv)) {
247 if (rate == IWL_RATE_11M_INDEX) 247 if (rate == IWL_RATE_11M_INDEX)
248 next_rate = IWL_RATE_5M_INDEX; 248 next_rate = IWL_RATE_5M_INDEX;
@@ -359,7 +359,7 @@ void iwl3945_hw_rx_statistics(struct iwl_priv *priv,
359 (int)sizeof(struct iwl3945_notif_statistics), 359 (int)sizeof(struct iwl3945_notif_statistics),
360 le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); 360 le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
361 361
362 memcpy(&priv->statistics_39, pkt->u.raw, sizeof(priv->statistics_39)); 362 memcpy(&priv->_3945.statistics, pkt->u.raw, sizeof(priv->_3945.statistics));
363} 363}
364 364
365/****************************************************************************** 365/******************************************************************************
@@ -956,7 +956,7 @@ static int iwl3945_tx_reset(struct iwl_priv *priv)
956 iwl_write_prph(priv, ALM_SCD_TXF5MF_REG, 0x000005); 956 iwl_write_prph(priv, ALM_SCD_TXF5MF_REG, 0x000005);
957 957
958 iwl_write_direct32(priv, FH39_TSSR_CBB_BASE, 958 iwl_write_direct32(priv, FH39_TSSR_CBB_BASE,
959 priv->shared_phys); 959 priv->_3945.shared_phys);
960 960
961 iwl_write_direct32(priv, FH39_TSSR_MSG_CONFIG, 961 iwl_write_direct32(priv, FH39_TSSR_MSG_CONFIG,
962 FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TXPD_ON | 962 FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TXPD_ON |
@@ -1997,13 +1997,13 @@ void iwl3945_reg_txpower_periodic(struct iwl_priv *priv)
1997 1997
1998 reschedule: 1998 reschedule:
1999 queue_delayed_work(priv->workqueue, 1999 queue_delayed_work(priv->workqueue,
2000 &priv->thermal_periodic, REG_RECALIB_PERIOD * HZ); 2000 &priv->_3945.thermal_periodic, REG_RECALIB_PERIOD * HZ);
2001} 2001}
2002 2002
2003static void iwl3945_bg_reg_txpower_periodic(struct work_struct *work) 2003static void iwl3945_bg_reg_txpower_periodic(struct work_struct *work)
2004{ 2004{
2005 struct iwl_priv *priv = container_of(work, struct iwl_priv, 2005 struct iwl_priv *priv = container_of(work, struct iwl_priv,
2006 thermal_periodic.work); 2006 _3945.thermal_periodic.work);
2007 2007
2008 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 2008 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
2009 return; 2009 return;
@@ -2331,7 +2331,7 @@ int iwl3945_hw_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq)
2331{ 2331{
2332 int txq_id = txq->q.id; 2332 int txq_id = txq->q.id;
2333 2333
2334 struct iwl3945_shared *shared_data = priv->shared_virt; 2334 struct iwl3945_shared *shared_data = priv->_3945.shared_virt;
2335 2335
2336 shared_data->tx_base_ptr[txq_id] = cpu_to_le32((u32)txq->q.dma_addr); 2336 shared_data->tx_base_ptr[txq_id] = cpu_to_le32((u32)txq->q.dma_addr);
2337 2337
@@ -2431,7 +2431,7 @@ int iwl3945_init_hw_rate_table(struct iwl_priv *priv)
2431 /* If an OFDM rate is used, have it fall back to the 2431 /* If an OFDM rate is used, have it fall back to the
2432 * 1M CCK rates */ 2432 * 1M CCK rates */
2433 2433
2434 if (!(priv->sta_supp_rates & IWL_OFDM_RATES_MASK) && 2434 if (!(priv->_3945.sta_supp_rates & IWL_OFDM_RATES_MASK) &&
2435 iwl_is_associated(priv)) { 2435 iwl_is_associated(priv)) {
2436 2436
2437 index = IWL_FIRST_CCK_RATE; 2437 index = IWL_FIRST_CCK_RATE;
@@ -2470,10 +2470,11 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv)
2470 memset((void *)&priv->hw_params, 0, 2470 memset((void *)&priv->hw_params, 0,
2471 sizeof(struct iwl_hw_params)); 2471 sizeof(struct iwl_hw_params));
2472 2472
2473 priv->shared_virt = dma_alloc_coherent(&priv->pci_dev->dev, 2473 priv->_3945.shared_virt =
2474 sizeof(struct iwl3945_shared), 2474 dma_alloc_coherent(&priv->pci_dev->dev,
2475 &priv->shared_phys, GFP_KERNEL); 2475 sizeof(struct iwl3945_shared),
2476 if (!priv->shared_virt) { 2476 &priv->_3945.shared_phys, GFP_KERNEL);
2477 if (!priv->_3945.shared_virt) {
2477 IWL_ERR(priv, "failed to allocate pci memory\n"); 2478 IWL_ERR(priv, "failed to allocate pci memory\n");
2478 mutex_unlock(&priv->mutex); 2479 mutex_unlock(&priv->mutex);
2479 return -ENOMEM; 2480 return -ENOMEM;
@@ -2536,13 +2537,13 @@ void iwl3945_hw_rx_handler_setup(struct iwl_priv *priv)
2536 2537
2537void iwl3945_hw_setup_deferred_work(struct iwl_priv *priv) 2538void iwl3945_hw_setup_deferred_work(struct iwl_priv *priv)
2538{ 2539{
2539 INIT_DELAYED_WORK(&priv->thermal_periodic, 2540 INIT_DELAYED_WORK(&priv->_3945.thermal_periodic,
2540 iwl3945_bg_reg_txpower_periodic); 2541 iwl3945_bg_reg_txpower_periodic);
2541} 2542}
2542 2543
2543void iwl3945_hw_cancel_deferred_work(struct iwl_priv *priv) 2544void iwl3945_hw_cancel_deferred_work(struct iwl_priv *priv)
2544{ 2545{
2545 cancel_delayed_work(&priv->thermal_periodic); 2546 cancel_delayed_work(&priv->_3945.thermal_periodic);
2546} 2547}
2547 2548
2548/* check contents of special bootstrap uCode SRAM */ 2549/* check contents of special bootstrap uCode SRAM */