aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-04-12 21:32:11 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-04-16 16:53:20 -0400
commitf4388adc92464397bb08a62c62c98b3b654bccc2 (patch)
treeb85a81449bd95827a701bb7a2aa65be728f33191 /drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
parent82ca9341763107615a15da6e59b9535d49eb91c3 (diff)
iwlwifi: more code clean up for agn devices
Since multiple new devices having similar uCode architecture and use same registers address, remove more reference to 5000 series to eliminate the confusion. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-ucode.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-ucode.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
index 059b70e09cd1..ae476c234a7c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
@@ -329,19 +329,19 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
329 329
330 spin_lock_irqsave(&priv->lock, flags); 330 spin_lock_irqsave(&priv->lock, flags);
331 331
332 priv->scd_base_addr = iwl_read_prph(priv, IWL50_SCD_SRAM_BASE_ADDR); 332 priv->scd_base_addr = iwl_read_prph(priv, IWLAGN_SCD_SRAM_BASE_ADDR);
333 a = priv->scd_base_addr + IWL50_SCD_CONTEXT_DATA_OFFSET; 333 a = priv->scd_base_addr + IWLAGN_SCD_CONTEXT_DATA_OFFSET;
334 for (; a < priv->scd_base_addr + IWL50_SCD_TX_STTS_BITMAP_OFFSET; 334 for (; a < priv->scd_base_addr + IWLAGN_SCD_TX_STTS_BITMAP_OFFSET;
335 a += 4) 335 a += 4)
336 iwl_write_targ_mem(priv, a, 0); 336 iwl_write_targ_mem(priv, a, 0);
337 for (; a < priv->scd_base_addr + IWL50_SCD_TRANSLATE_TBL_OFFSET; 337 for (; a < priv->scd_base_addr + IWLAGN_SCD_TRANSLATE_TBL_OFFSET;
338 a += 4) 338 a += 4)
339 iwl_write_targ_mem(priv, a, 0); 339 iwl_write_targ_mem(priv, a, 0);
340 for (; a < priv->scd_base_addr + 340 for (; a < priv->scd_base_addr +
341 IWL50_SCD_TRANSLATE_TBL_OFFSET_QUEUE(priv->hw_params.max_txq_num); a += 4) 341 IWLAGN_SCD_TRANSLATE_TBL_OFFSET_QUEUE(priv->hw_params.max_txq_num); a += 4)
342 iwl_write_targ_mem(priv, a, 0); 342 iwl_write_targ_mem(priv, a, 0);
343 343
344 iwl_write_prph(priv, IWL50_SCD_DRAM_BASE_ADDR, 344 iwl_write_prph(priv, IWLAGN_SCD_DRAM_BASE_ADDR,
345 priv->scd_bc_tbls.dma >> 10); 345 priv->scd_bc_tbls.dma >> 10);
346 346
347 /* Enable DMA channel */ 347 /* Enable DMA channel */
@@ -355,28 +355,28 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
355 iwl_write_direct32(priv, FH_TX_CHICKEN_BITS_REG, 355 iwl_write_direct32(priv, FH_TX_CHICKEN_BITS_REG,
356 reg_val | FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN); 356 reg_val | FH_TX_CHICKEN_BITS_SCD_AUTO_RETRY_EN);
357 357
358 iwl_write_prph(priv, IWL50_SCD_QUEUECHAIN_SEL, 358 iwl_write_prph(priv, IWLAGN_SCD_QUEUECHAIN_SEL,
359 IWL50_SCD_QUEUECHAIN_SEL_ALL(priv->hw_params.max_txq_num)); 359 IWLAGN_SCD_QUEUECHAIN_SEL_ALL(priv->hw_params.max_txq_num));
360 iwl_write_prph(priv, IWL50_SCD_AGGR_SEL, 0); 360 iwl_write_prph(priv, IWLAGN_SCD_AGGR_SEL, 0);
361 361
362 /* initiate the queues */ 362 /* initiate the queues */
363 for (i = 0; i < priv->hw_params.max_txq_num; i++) { 363 for (i = 0; i < priv->hw_params.max_txq_num; i++) {
364 iwl_write_prph(priv, IWL50_SCD_QUEUE_RDPTR(i), 0); 364 iwl_write_prph(priv, IWLAGN_SCD_QUEUE_RDPTR(i), 0);
365 iwl_write_direct32(priv, HBUS_TARG_WRPTR, 0 | (i << 8)); 365 iwl_write_direct32(priv, HBUS_TARG_WRPTR, 0 | (i << 8));
366 iwl_write_targ_mem(priv, priv->scd_base_addr + 366 iwl_write_targ_mem(priv, priv->scd_base_addr +
367 IWL50_SCD_CONTEXT_QUEUE_OFFSET(i), 0); 367 IWLAGN_SCD_CONTEXT_QUEUE_OFFSET(i), 0);
368 iwl_write_targ_mem(priv, priv->scd_base_addr + 368 iwl_write_targ_mem(priv, priv->scd_base_addr +
369 IWL50_SCD_CONTEXT_QUEUE_OFFSET(i) + 369 IWLAGN_SCD_CONTEXT_QUEUE_OFFSET(i) +
370 sizeof(u32), 370 sizeof(u32),
371 ((SCD_WIN_SIZE << 371 ((SCD_WIN_SIZE <<
372 IWL50_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) & 372 IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_POS) &
373 IWL50_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) | 373 IWLAGN_SCD_QUEUE_CTX_REG2_WIN_SIZE_MSK) |
374 ((SCD_FRAME_LIMIT << 374 ((SCD_FRAME_LIMIT <<
375 IWL50_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) & 375 IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS) &
376 IWL50_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK)); 376 IWLAGN_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK));
377 } 377 }
378 378
379 iwl_write_prph(priv, IWL50_SCD_INTERRUPT_MASK, 379 iwl_write_prph(priv, IWLAGN_SCD_INTERRUPT_MASK,
380 IWL_MASK(0, priv->hw_params.max_txq_num)); 380 IWL_MASK(0, priv->hw_params.max_txq_num));
381 381
382 /* Activate all Tx DMA/FIFO channels */ 382 /* Activate all Tx DMA/FIFO channels */