aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-03-25 19:33:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-27 16:03:17 -0400
commit3395f6e9cf48469d7ee05703cad1502002741c16 (patch)
treeca07b726dde7d42e113e9105e3c10f7ae9b1cb3a /drivers/net/wireless/iwlwifi/iwl4965-base.c
parentab53d8af6772b22d4d68b1bcd74f7a5dba693983 (diff)
iwlwifi: rename iwl-4965-io.h to iwl-io.h
This patch renames iwl-4965-io.h back to iw-io.h it also remove 4965 from all functions it supplies Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c233
1 files changed, 117 insertions, 116 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index a04127a8acf7..9e49e8ce3348 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -48,6 +48,7 @@
48#include "iwl-eeprom.h" 48#include "iwl-eeprom.h"
49#include "iwl-core.h" 49#include "iwl-core.h"
50#include "iwl-4965.h" 50#include "iwl-4965.h"
51#include "iwl-io.h"
51#include "iwl-helpers.h" 52#include "iwl-helpers.h"
52 53
53static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv, 54static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv,
@@ -2616,7 +2617,7 @@ static void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
2616 /* FIXME: This is a workaround for AP */ 2617 /* FIXME: This is a workaround for AP */
2617 if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { 2618 if (priv->iw_mode != IEEE80211_IF_TYPE_AP) {
2618 spin_lock_irqsave(&priv->lock, flags); 2619 spin_lock_irqsave(&priv->lock, flags);
2619 iwl4965_write32(priv, CSR_UCODE_DRV_GP1_SET, 2620 iwl_write32(priv, CSR_UCODE_DRV_GP1_SET,
2620 CSR_UCODE_SW_BIT_RFKILL); 2621 CSR_UCODE_SW_BIT_RFKILL);
2621 spin_unlock_irqrestore(&priv->lock, flags); 2622 spin_unlock_irqrestore(&priv->lock, flags);
2622 iwl4965_send_card_state(priv, CARD_STATE_CMD_DISABLE, 0); 2623 iwl4965_send_card_state(priv, CARD_STATE_CMD_DISABLE, 0);
@@ -2626,7 +2627,7 @@ static void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
2626 } 2627 }
2627 2628
2628 spin_lock_irqsave(&priv->lock, flags); 2629 spin_lock_irqsave(&priv->lock, flags);
2629 iwl4965_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); 2630 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL);
2630 2631
2631 clear_bit(STATUS_RF_KILL_SW, &priv->status); 2632 clear_bit(STATUS_RF_KILL_SW, &priv->status);
2632 spin_unlock_irqrestore(&priv->lock, flags); 2633 spin_unlock_irqrestore(&priv->lock, flags);
@@ -2635,9 +2636,9 @@ static void iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio)
2635 msleep(10); 2636 msleep(10);
2636 2637
2637 spin_lock_irqsave(&priv->lock, flags); 2638 spin_lock_irqsave(&priv->lock, flags);
2638 iwl4965_read32(priv, CSR_UCODE_DRV_GP1); 2639 iwl_read32(priv, CSR_UCODE_DRV_GP1);
2639 if (!iwl4965_grab_nic_access(priv)) 2640 if (!iwl_grab_nic_access(priv))
2640 iwl4965_release_nic_access(priv); 2641 iwl_release_nic_access(priv);
2641 spin_unlock_irqrestore(&priv->lock, flags); 2642 spin_unlock_irqrestore(&priv->lock, flags);
2642 2643
2643 if (test_bit(STATUS_RF_KILL_HW, &priv->status)) { 2644 if (test_bit(STATUS_RF_KILL_HW, &priv->status)) {
@@ -3514,35 +3515,35 @@ static void iwl4965_rx_card_state_notif(struct iwl_priv *priv,
3514 if (flags & (SW_CARD_DISABLED | HW_CARD_DISABLED | 3515 if (flags & (SW_CARD_DISABLED | HW_CARD_DISABLED |
3515 RF_CARD_DISABLED)) { 3516 RF_CARD_DISABLED)) {
3516 3517
3517 iwl4965_write32(priv, CSR_UCODE_DRV_GP1_SET, 3518 iwl_write32(priv, CSR_UCODE_DRV_GP1_SET,
3518 CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); 3519 CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED);
3519 3520
3520 if (!iwl4965_grab_nic_access(priv)) { 3521 if (!iwl_grab_nic_access(priv)) {
3521 iwl4965_write_direct32( 3522 iwl_write_direct32(
3522 priv, HBUS_TARG_MBX_C, 3523 priv, HBUS_TARG_MBX_C,
3523 HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED); 3524 HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED);
3524 3525
3525 iwl4965_release_nic_access(priv); 3526 iwl_release_nic_access(priv);
3526 } 3527 }
3527 3528
3528 if (!(flags & RXON_CARD_DISABLED)) { 3529 if (!(flags & RXON_CARD_DISABLED)) {
3529 iwl4965_write32(priv, CSR_UCODE_DRV_GP1_CLR, 3530 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR,
3530 CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); 3531 CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED);
3531 if (!iwl4965_grab_nic_access(priv)) { 3532 if (!iwl_grab_nic_access(priv)) {
3532 iwl4965_write_direct32( 3533 iwl_write_direct32(
3533 priv, HBUS_TARG_MBX_C, 3534 priv, HBUS_TARG_MBX_C,
3534 HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED); 3535 HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED);
3535 3536
3536 iwl4965_release_nic_access(priv); 3537 iwl_release_nic_access(priv);
3537 } 3538 }
3538 } 3539 }
3539 3540
3540 if (flags & RF_CARD_DISABLED) { 3541 if (flags & RF_CARD_DISABLED) {
3541 iwl4965_write32(priv, CSR_UCODE_DRV_GP1_SET, 3542 iwl_write32(priv, CSR_UCODE_DRV_GP1_SET,
3542 CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT); 3543 CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT);
3543 iwl4965_read32(priv, CSR_UCODE_DRV_GP1); 3544 iwl_read32(priv, CSR_UCODE_DRV_GP1);
3544 if (!iwl4965_grab_nic_access(priv)) 3545 if (!iwl_grab_nic_access(priv))
3545 iwl4965_release_nic_access(priv); 3546 iwl_release_nic_access(priv);
3546 } 3547 }
3547 } 3548 }
3548 3549
@@ -3756,27 +3757,27 @@ int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl4965_rx_q
3756 3757
3757 /* If power-saving is in use, make sure device is awake */ 3758 /* If power-saving is in use, make sure device is awake */
3758 if (test_bit(STATUS_POWER_PMI, &priv->status)) { 3759 if (test_bit(STATUS_POWER_PMI, &priv->status)) {
3759 reg = iwl4965_read32(priv, CSR_UCODE_DRV_GP1); 3760 reg = iwl_read32(priv, CSR_UCODE_DRV_GP1);
3760 3761
3761 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { 3762 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
3762 iwl4965_set_bit(priv, CSR_GP_CNTRL, 3763 iwl_set_bit(priv, CSR_GP_CNTRL,
3763 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 3764 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
3764 goto exit_unlock; 3765 goto exit_unlock;
3765 } 3766 }
3766 3767
3767 rc = iwl4965_grab_nic_access(priv); 3768 rc = iwl_grab_nic_access(priv);
3768 if (rc) 3769 if (rc)
3769 goto exit_unlock; 3770 goto exit_unlock;
3770 3771
3771 /* Device expects a multiple of 8 */ 3772 /* Device expects a multiple of 8 */
3772 iwl4965_write_direct32(priv, FH_RSCSR_CHNL0_WPTR, 3773 iwl_write_direct32(priv, FH_RSCSR_CHNL0_WPTR,
3773 q->write & ~0x7); 3774 q->write & ~0x7);
3774 iwl4965_release_nic_access(priv); 3775 iwl_release_nic_access(priv);
3775 3776
3776 /* Else device is assumed to be awake */ 3777 /* Else device is assumed to be awake */
3777 } else 3778 } else
3778 /* Device expects a multiple of 8 */ 3779 /* Device expects a multiple of 8 */
3779 iwl4965_write32(priv, FH_RSCSR_CHNL0_WPTR, q->write & ~0x7); 3780 iwl_write32(priv, FH_RSCSR_CHNL0_WPTR, q->write & ~0x7);
3780 3781
3781 3782
3782 q->need_update = 0; 3783 q->need_update = 0;
@@ -4213,27 +4214,27 @@ static int iwl4965_tx_queue_update_write_ptr(struct iwl_priv *priv,
4213 /* wake up nic if it's powered down ... 4214 /* wake up nic if it's powered down ...
4214 * uCode will wake up, and interrupt us again, so next 4215 * uCode will wake up, and interrupt us again, so next
4215 * time we'll skip this part. */ 4216 * time we'll skip this part. */
4216 reg = iwl4965_read32(priv, CSR_UCODE_DRV_GP1); 4217 reg = iwl_read32(priv, CSR_UCODE_DRV_GP1);
4217 4218
4218 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { 4219 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
4219 IWL_DEBUG_INFO("Requesting wakeup, GP1 = 0x%x\n", reg); 4220 IWL_DEBUG_INFO("Requesting wakeup, GP1 = 0x%x\n", reg);
4220 iwl4965_set_bit(priv, CSR_GP_CNTRL, 4221 iwl_set_bit(priv, CSR_GP_CNTRL,
4221 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 4222 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
4222 return rc; 4223 return rc;
4223 } 4224 }
4224 4225
4225 /* restore this queue's parameters in nic hardware. */ 4226 /* restore this queue's parameters in nic hardware. */
4226 rc = iwl4965_grab_nic_access(priv); 4227 rc = iwl_grab_nic_access(priv);
4227 if (rc) 4228 if (rc)
4228 return rc; 4229 return rc;
4229 iwl4965_write_direct32(priv, HBUS_TARG_WRPTR, 4230 iwl_write_direct32(priv, HBUS_TARG_WRPTR,
4230 txq->q.write_ptr | (txq_id << 8)); 4231 txq->q.write_ptr | (txq_id << 8));
4231 iwl4965_release_nic_access(priv); 4232 iwl_release_nic_access(priv);
4232 4233
4233 /* else not in power-save mode, uCode will never sleep when we're 4234 /* else not in power-save mode, uCode will never sleep when we're
4234 * trying to tx (during RFKILL, we're not trying to tx). */ 4235 * trying to tx (during RFKILL, we're not trying to tx). */
4235 } else 4236 } else
4236 iwl4965_write32(priv, HBUS_TARG_WRPTR, 4237 iwl_write32(priv, HBUS_TARG_WRPTR,
4237 txq->q.write_ptr | (txq_id << 8)); 4238 txq->q.write_ptr | (txq_id << 8));
4238 4239
4239 txq->need_update = 0; 4240 txq->need_update = 0;
@@ -4268,7 +4269,7 @@ static void iwl4965_enable_interrupts(struct iwl_priv *priv)
4268{ 4269{
4269 IWL_DEBUG_ISR("Enabling interrupts\n"); 4270 IWL_DEBUG_ISR("Enabling interrupts\n");
4270 set_bit(STATUS_INT_ENABLED, &priv->status); 4271 set_bit(STATUS_INT_ENABLED, &priv->status);
4271 iwl4965_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); 4272 iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK);
4272} 4273}
4273 4274
4274static inline void iwl4965_disable_interrupts(struct iwl_priv *priv) 4275static inline void iwl4965_disable_interrupts(struct iwl_priv *priv)
@@ -4276,12 +4277,12 @@ static inline void iwl4965_disable_interrupts(struct iwl_priv *priv)
4276 clear_bit(STATUS_INT_ENABLED, &priv->status); 4277 clear_bit(STATUS_INT_ENABLED, &priv->status);
4277 4278
4278 /* disable interrupts from uCode/NIC to host */ 4279 /* disable interrupts from uCode/NIC to host */
4279 iwl4965_write32(priv, CSR_INT_MASK, 0x00000000); 4280 iwl_write32(priv, CSR_INT_MASK, 0x00000000);
4280 4281
4281 /* acknowledge/clear/reset any interrupts still pending 4282 /* acknowledge/clear/reset any interrupts still pending
4282 * from uCode or flow handler (Rx/Tx DMA) */ 4283 * from uCode or flow handler (Rx/Tx DMA) */
4283 iwl4965_write32(priv, CSR_INT, 0xffffffff); 4284 iwl_write32(priv, CSR_INT, 0xffffffff);
4284 iwl4965_write32(priv, CSR_FH_INT_STATUS, 0xffffffff); 4285 iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff);
4285 IWL_DEBUG_ISR("Disabled interrupts\n"); 4286 IWL_DEBUG_ISR("Disabled interrupts\n");
4286} 4287}
4287 4288
@@ -4322,28 +4323,28 @@ static void iwl4965_dump_nic_error_log(struct iwl_priv *priv)
4322 return; 4323 return;
4323 } 4324 }
4324 4325
4325 rc = iwl4965_grab_nic_access(priv); 4326 rc = iwl_grab_nic_access(priv);
4326 if (rc) { 4327 if (rc) {
4327 IWL_WARNING("Can not read from adapter at this time.\n"); 4328 IWL_WARNING("Can not read from adapter at this time.\n");
4328 return; 4329 return;
4329 } 4330 }
4330 4331
4331 count = iwl4965_read_targ_mem(priv, base); 4332 count = iwl_read_targ_mem(priv, base);
4332 4333
4333 if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) { 4334 if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) {
4334 IWL_ERROR("Start IWL Error Log Dump:\n"); 4335 IWL_ERROR("Start IWL Error Log Dump:\n");
4335 IWL_ERROR("Status: 0x%08lX, count: %d\n", priv->status, count); 4336 IWL_ERROR("Status: 0x%08lX, count: %d\n", priv->status, count);
4336 } 4337 }
4337 4338
4338 desc = iwl4965_read_targ_mem(priv, base + 1 * sizeof(u32)); 4339 desc = iwl_read_targ_mem(priv, base + 1 * sizeof(u32));
4339 blink1 = iwl4965_read_targ_mem(priv, base + 3 * sizeof(u32)); 4340 blink1 = iwl_read_targ_mem(priv, base + 3 * sizeof(u32));
4340 blink2 = iwl4965_read_targ_mem(priv, base + 4 * sizeof(u32)); 4341 blink2 = iwl_read_targ_mem(priv, base + 4 * sizeof(u32));
4341 ilink1 = iwl4965_read_targ_mem(priv, base + 5 * sizeof(u32)); 4342 ilink1 = iwl_read_targ_mem(priv, base + 5 * sizeof(u32));
4342 ilink2 = iwl4965_read_targ_mem(priv, base + 6 * sizeof(u32)); 4343 ilink2 = iwl_read_targ_mem(priv, base + 6 * sizeof(u32));
4343 data1 = iwl4965_read_targ_mem(priv, base + 7 * sizeof(u32)); 4344 data1 = iwl_read_targ_mem(priv, base + 7 * sizeof(u32));
4344 data2 = iwl4965_read_targ_mem(priv, base + 8 * sizeof(u32)); 4345 data2 = iwl_read_targ_mem(priv, base + 8 * sizeof(u32));
4345 line = iwl4965_read_targ_mem(priv, base + 9 * sizeof(u32)); 4346 line = iwl_read_targ_mem(priv, base + 9 * sizeof(u32));
4346 time = iwl4965_read_targ_mem(priv, base + 11 * sizeof(u32)); 4347 time = iwl_read_targ_mem(priv, base + 11 * sizeof(u32));
4347 4348
4348 IWL_ERROR("Desc Time " 4349 IWL_ERROR("Desc Time "
4349 "data1 data2 line\n"); 4350 "data1 data2 line\n");
@@ -4353,7 +4354,7 @@ static void iwl4965_dump_nic_error_log(struct iwl_priv *priv)
4353 IWL_ERROR("0x%05X 0x%05X 0x%05X 0x%05X\n", blink1, blink2, 4354 IWL_ERROR("0x%05X 0x%05X 0x%05X 0x%05X\n", blink1, blink2,
4354 ilink1, ilink2); 4355 ilink1, ilink2);
4355 4356
4356 iwl4965_release_nic_access(priv); 4357 iwl_release_nic_access(priv);
4357} 4358}
4358 4359
4359#define EVENT_START_OFFSET (4 * sizeof(u32)) 4360#define EVENT_START_OFFSET (4 * sizeof(u32))
@@ -4361,7 +4362,7 @@ static void iwl4965_dump_nic_error_log(struct iwl_priv *priv)
4361/** 4362/**
4362 * iwl4965_print_event_log - Dump error event log to syslog 4363 * iwl4965_print_event_log - Dump error event log to syslog
4363 * 4364 *
4364 * NOTE: Must be called with iwl4965_grab_nic_access() already obtained! 4365 * NOTE: Must be called with iwl_grab_nic_access() already obtained!
4365 */ 4366 */
4366static void iwl4965_print_event_log(struct iwl_priv *priv, u32 start_idx, 4367static void iwl4965_print_event_log(struct iwl_priv *priv, u32 start_idx,
4367 u32 num_events, u32 mode) 4368 u32 num_events, u32 mode)
@@ -4387,14 +4388,14 @@ static void iwl4965_print_event_log(struct iwl_priv *priv, u32 start_idx,
4387 /* "time" is actually "data" for mode 0 (no timestamp). 4388 /* "time" is actually "data" for mode 0 (no timestamp).
4388 * place event id # at far right for easier visual parsing. */ 4389 * place event id # at far right for easier visual parsing. */
4389 for (i = 0; i < num_events; i++) { 4390 for (i = 0; i < num_events; i++) {
4390 ev = iwl4965_read_targ_mem(priv, ptr); 4391 ev = iwl_read_targ_mem(priv, ptr);
4391 ptr += sizeof(u32); 4392 ptr += sizeof(u32);
4392 time = iwl4965_read_targ_mem(priv, ptr); 4393 time = iwl_read_targ_mem(priv, ptr);
4393 ptr += sizeof(u32); 4394 ptr += sizeof(u32);
4394 if (mode == 0) 4395 if (mode == 0)
4395 IWL_ERROR("0x%08x\t%04u\n", time, ev); /* data, ev */ 4396 IWL_ERROR("0x%08x\t%04u\n", time, ev); /* data, ev */
4396 else { 4397 else {
4397 data = iwl4965_read_targ_mem(priv, ptr); 4398 data = iwl_read_targ_mem(priv, ptr);
4398 ptr += sizeof(u32); 4399 ptr += sizeof(u32);
4399 IWL_ERROR("%010u\t0x%08x\t%04u\n", time, data, ev); 4400 IWL_ERROR("%010u\t0x%08x\t%04u\n", time, data, ev);
4400 } 4401 }
@@ -4417,24 +4418,24 @@ static void iwl4965_dump_nic_event_log(struct iwl_priv *priv)
4417 return; 4418 return;
4418 } 4419 }
4419 4420
4420 rc = iwl4965_grab_nic_access(priv); 4421 rc = iwl_grab_nic_access(priv);
4421 if (rc) { 4422 if (rc) {
4422 IWL_WARNING("Can not read from adapter at this time.\n"); 4423 IWL_WARNING("Can not read from adapter at this time.\n");
4423 return; 4424 return;
4424 } 4425 }
4425 4426
4426 /* event log header */ 4427 /* event log header */
4427 capacity = iwl4965_read_targ_mem(priv, base); 4428 capacity = iwl_read_targ_mem(priv, base);
4428 mode = iwl4965_read_targ_mem(priv, base + (1 * sizeof(u32))); 4429 mode = iwl_read_targ_mem(priv, base + (1 * sizeof(u32)));
4429 num_wraps = iwl4965_read_targ_mem(priv, base + (2 * sizeof(u32))); 4430 num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32)));
4430 next_entry = iwl4965_read_targ_mem(priv, base + (3 * sizeof(u32))); 4431 next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32)));
4431 4432
4432 size = num_wraps ? capacity : next_entry; 4433 size = num_wraps ? capacity : next_entry;
4433 4434
4434 /* bail out if nothing in log */ 4435 /* bail out if nothing in log */
4435 if (size == 0) { 4436 if (size == 0) {
4436 IWL_ERROR("Start IWL Event Log Dump: nothing in log\n"); 4437 IWL_ERROR("Start IWL Event Log Dump: nothing in log\n");
4437 iwl4965_release_nic_access(priv); 4438 iwl_release_nic_access(priv);
4438 return; 4439 return;
4439 } 4440 }
4440 4441
@@ -4450,7 +4451,7 @@ static void iwl4965_dump_nic_event_log(struct iwl_priv *priv)
4450 /* (then/else) start at top of log */ 4451 /* (then/else) start at top of log */
4451 iwl4965_print_event_log(priv, 0, next_entry, mode); 4452 iwl4965_print_event_log(priv, 0, next_entry, mode);
4452 4453
4453 iwl4965_release_nic_access(priv); 4454 iwl_release_nic_access(priv);
4454} 4455}
4455 4456
4456/** 4457/**
@@ -4522,19 +4523,19 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
4522 /* Ack/clear/reset pending uCode interrupts. 4523 /* Ack/clear/reset pending uCode interrupts.
4523 * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS, 4524 * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS,
4524 * and will clear only when CSR_FH_INT_STATUS gets cleared. */ 4525 * and will clear only when CSR_FH_INT_STATUS gets cleared. */
4525 inta = iwl4965_read32(priv, CSR_INT); 4526 inta = iwl_read32(priv, CSR_INT);
4526 iwl4965_write32(priv, CSR_INT, inta); 4527 iwl_write32(priv, CSR_INT, inta);
4527 4528
4528 /* Ack/clear/reset pending flow-handler (DMA) interrupts. 4529 /* Ack/clear/reset pending flow-handler (DMA) interrupts.
4529 * Any new interrupts that happen after this, either while we're 4530 * Any new interrupts that happen after this, either while we're
4530 * in this tasklet, or later, will show up in next ISR/tasklet. */ 4531 * in this tasklet, or later, will show up in next ISR/tasklet. */
4531 inta_fh = iwl4965_read32(priv, CSR_FH_INT_STATUS); 4532 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS);
4532 iwl4965_write32(priv, CSR_FH_INT_STATUS, inta_fh); 4533 iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh);
4533 4534
4534#ifdef CONFIG_IWLWIFI_DEBUG 4535#ifdef CONFIG_IWLWIFI_DEBUG
4535 if (iwl_debug_level & IWL_DL_ISR) { 4536 if (iwl_debug_level & IWL_DL_ISR) {
4536 /* just for debug */ 4537 /* just for debug */
4537 inta_mask = iwl4965_read32(priv, CSR_INT_MASK); 4538 inta_mask = iwl_read32(priv, CSR_INT_MASK);
4538 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", 4539 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n",
4539 inta, inta_mask, inta_fh); 4540 inta, inta_mask, inta_fh);
4540 } 4541 }
@@ -4583,7 +4584,7 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
4583 /* HW RF KILL switch toggled */ 4584 /* HW RF KILL switch toggled */
4584 if (inta & CSR_INT_BIT_RF_KILL) { 4585 if (inta & CSR_INT_BIT_RF_KILL) {
4585 int hw_rf_kill = 0; 4586 int hw_rf_kill = 0;
4586 if (!(iwl4965_read32(priv, CSR_GP_CNTRL) & 4587 if (!(iwl_read32(priv, CSR_GP_CNTRL) &
4587 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)) 4588 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW))
4588 hw_rf_kill = 1; 4589 hw_rf_kill = 1;
4589 4590
@@ -4658,9 +4659,9 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
4658 4659
4659#ifdef CONFIG_IWLWIFI_DEBUG 4660#ifdef CONFIG_IWLWIFI_DEBUG
4660 if (iwl_debug_level & (IWL_DL_ISR)) { 4661 if (iwl_debug_level & (IWL_DL_ISR)) {
4661 inta = iwl4965_read32(priv, CSR_INT); 4662 inta = iwl_read32(priv, CSR_INT);
4662 inta_mask = iwl4965_read32(priv, CSR_INT_MASK); 4663 inta_mask = iwl_read32(priv, CSR_INT_MASK);
4663 inta_fh = iwl4965_read32(priv, CSR_FH_INT_STATUS); 4664 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS);
4664 IWL_DEBUG_ISR("End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " 4665 IWL_DEBUG_ISR("End inta 0x%08x, enabled 0x%08x, fh 0x%08x, "
4665 "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); 4666 "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags);
4666 } 4667 }
@@ -4682,12 +4683,12 @@ static irqreturn_t iwl4965_isr(int irq, void *data)
4682 * back-to-back ISRs and sporadic interrupts from our NIC. 4683 * back-to-back ISRs and sporadic interrupts from our NIC.
4683 * If we have something to service, the tasklet will re-enable ints. 4684 * If we have something to service, the tasklet will re-enable ints.
4684 * If we *don't* have something, we'll re-enable before leaving here. */ 4685 * If we *don't* have something, we'll re-enable before leaving here. */
4685 inta_mask = iwl4965_read32(priv, CSR_INT_MASK); /* just for debug */ 4686 inta_mask = iwl_read32(priv, CSR_INT_MASK); /* just for debug */
4686 iwl4965_write32(priv, CSR_INT_MASK, 0x00000000); 4687 iwl_write32(priv, CSR_INT_MASK, 0x00000000);
4687 4688
4688 /* Discover which interrupts are active/pending */ 4689 /* Discover which interrupts are active/pending */
4689 inta = iwl4965_read32(priv, CSR_INT); 4690 inta = iwl_read32(priv, CSR_INT);
4690 inta_fh = iwl4965_read32(priv, CSR_FH_INT_STATUS); 4691 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS);
4691 4692
4692 /* Ignore interrupt if there's nothing in NIC to service. 4693 /* Ignore interrupt if there's nothing in NIC to service.
4693 * This may be due to IRQ shared with another device, 4694 * This may be due to IRQ shared with another device,
@@ -5054,18 +5055,18 @@ static int iwl4965_verify_inst_full(struct iwl_priv *priv, __le32 *image,
5054 5055
5055 IWL_DEBUG_INFO("ucode inst image size is %u\n", len); 5056 IWL_DEBUG_INFO("ucode inst image size is %u\n", len);
5056 5057
5057 rc = iwl4965_grab_nic_access(priv); 5058 rc = iwl_grab_nic_access(priv);
5058 if (rc) 5059 if (rc)
5059 return rc; 5060 return rc;
5060 5061
5061 iwl4965_write_direct32(priv, HBUS_TARG_MEM_RADDR, RTC_INST_LOWER_BOUND); 5062 iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR, RTC_INST_LOWER_BOUND);
5062 5063
5063 errcnt = 0; 5064 errcnt = 0;
5064 for (; len > 0; len -= sizeof(u32), image++) { 5065 for (; len > 0; len -= sizeof(u32), image++) {
5065 /* read data comes through single port, auto-incr addr */ 5066 /* read data comes through single port, auto-incr addr */
5066 /* NOTE: Use the debugless read so we don't flood kernel log 5067 /* NOTE: Use the debugless read so we don't flood kernel log
5067 * if IWL_DL_IO is set */ 5068 * if IWL_DL_IO is set */
5068 val = _iwl4965_read_direct32(priv, HBUS_TARG_MEM_RDAT); 5069 val = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT);
5069 if (val != le32_to_cpu(*image)) { 5070 if (val != le32_to_cpu(*image)) {
5070 IWL_ERROR("uCode INST section is invalid at " 5071 IWL_ERROR("uCode INST section is invalid at "
5071 "offset 0x%x, is 0x%x, s/b 0x%x\n", 5072 "offset 0x%x, is 0x%x, s/b 0x%x\n",
@@ -5077,7 +5078,7 @@ static int iwl4965_verify_inst_full(struct iwl_priv *priv, __le32 *image,
5077 } 5078 }
5078 } 5079 }
5079 5080
5080 iwl4965_release_nic_access(priv); 5081 iwl_release_nic_access(priv);
5081 5082
5082 if (!errcnt) 5083 if (!errcnt)
5083 IWL_DEBUG_INFO 5084 IWL_DEBUG_INFO
@@ -5101,7 +5102,7 @@ static int iwl4965_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32
5101 5102
5102 IWL_DEBUG_INFO("ucode inst image size is %u\n", len); 5103 IWL_DEBUG_INFO("ucode inst image size is %u\n", len);
5103 5104
5104 rc = iwl4965_grab_nic_access(priv); 5105 rc = iwl_grab_nic_access(priv);
5105 if (rc) 5106 if (rc)
5106 return rc; 5107 return rc;
5107 5108
@@ -5109,9 +5110,9 @@ static int iwl4965_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32
5109 /* read data comes through single port, auto-incr addr */ 5110 /* read data comes through single port, auto-incr addr */
5110 /* NOTE: Use the debugless read so we don't flood kernel log 5111 /* NOTE: Use the debugless read so we don't flood kernel log
5111 * if IWL_DL_IO is set */ 5112 * if IWL_DL_IO is set */
5112 iwl4965_write_direct32(priv, HBUS_TARG_MEM_RADDR, 5113 iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR,
5113 i + RTC_INST_LOWER_BOUND); 5114 i + RTC_INST_LOWER_BOUND);
5114 val = _iwl4965_read_direct32(priv, HBUS_TARG_MEM_RDAT); 5115 val = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT);
5115 if (val != le32_to_cpu(*image)) { 5116 if (val != le32_to_cpu(*image)) {
5116#if 0 /* Enable this if you want to see details */ 5117#if 0 /* Enable this if you want to see details */
5117 IWL_ERROR("uCode INST section is invalid at " 5118 IWL_ERROR("uCode INST section is invalid at "
@@ -5125,7 +5126,7 @@ static int iwl4965_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32
5125 } 5126 }
5126 } 5127 }
5127 5128
5128 iwl4965_release_nic_access(priv); 5129 iwl_release_nic_access(priv);
5129 5130
5130 return rc; 5131 return rc;
5131} 5132}
@@ -5192,11 +5193,11 @@ static int iwl4965_verify_bsm(struct iwl_priv *priv)
5192 IWL_DEBUG_INFO("Begin verify bsm\n"); 5193 IWL_DEBUG_INFO("Begin verify bsm\n");
5193 5194
5194 /* verify BSM SRAM contents */ 5195 /* verify BSM SRAM contents */
5195 val = iwl4965_read_prph(priv, BSM_WR_DWCOUNT_REG); 5196 val = iwl_read_prph(priv, BSM_WR_DWCOUNT_REG);
5196 for (reg = BSM_SRAM_LOWER_BOUND; 5197 for (reg = BSM_SRAM_LOWER_BOUND;
5197 reg < BSM_SRAM_LOWER_BOUND + len; 5198 reg < BSM_SRAM_LOWER_BOUND + len;
5198 reg += sizeof(u32), image ++) { 5199 reg += sizeof(u32), image ++) {
5199 val = iwl4965_read_prph(priv, reg); 5200 val = iwl_read_prph(priv, reg);
5200 if (val != le32_to_cpu(*image)) { 5201 if (val != le32_to_cpu(*image)) {
5201 IWL_ERROR("BSM uCode verification failed at " 5202 IWL_ERROR("BSM uCode verification failed at "
5202 "addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n", 5203 "addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n",
@@ -5273,42 +5274,42 @@ static int iwl4965_load_bsm(struct iwl_priv *priv)
5273 inst_len = priv->ucode_init.len; 5274 inst_len = priv->ucode_init.len;
5274 data_len = priv->ucode_init_data.len; 5275 data_len = priv->ucode_init_data.len;
5275 5276
5276 rc = iwl4965_grab_nic_access(priv); 5277 rc = iwl_grab_nic_access(priv);
5277 if (rc) 5278 if (rc)
5278 return rc; 5279 return rc;
5279 5280
5280 iwl4965_write_prph(priv, BSM_DRAM_INST_PTR_REG, pinst); 5281 iwl_write_prph(priv, BSM_DRAM_INST_PTR_REG, pinst);
5281 iwl4965_write_prph(priv, BSM_DRAM_DATA_PTR_REG, pdata); 5282 iwl_write_prph(priv, BSM_DRAM_DATA_PTR_REG, pdata);
5282 iwl4965_write_prph(priv, BSM_DRAM_INST_BYTECOUNT_REG, inst_len); 5283 iwl_write_prph(priv, BSM_DRAM_INST_BYTECOUNT_REG, inst_len);
5283 iwl4965_write_prph(priv, BSM_DRAM_DATA_BYTECOUNT_REG, data_len); 5284 iwl_write_prph(priv, BSM_DRAM_DATA_BYTECOUNT_REG, data_len);
5284 5285
5285 /* Fill BSM memory with bootstrap instructions */ 5286 /* Fill BSM memory with bootstrap instructions */
5286 for (reg_offset = BSM_SRAM_LOWER_BOUND; 5287 for (reg_offset = BSM_SRAM_LOWER_BOUND;
5287 reg_offset < BSM_SRAM_LOWER_BOUND + len; 5288 reg_offset < BSM_SRAM_LOWER_BOUND + len;
5288 reg_offset += sizeof(u32), image++) 5289 reg_offset += sizeof(u32), image++)
5289 _iwl4965_write_prph(priv, reg_offset, 5290 _iwl_write_prph(priv, reg_offset,
5290 le32_to_cpu(*image)); 5291 le32_to_cpu(*image));
5291 5292
5292 rc = iwl4965_verify_bsm(priv); 5293 rc = iwl4965_verify_bsm(priv);
5293 if (rc) { 5294 if (rc) {
5294 iwl4965_release_nic_access(priv); 5295 iwl_release_nic_access(priv);
5295 return rc; 5296 return rc;
5296 } 5297 }
5297 5298
5298 /* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */ 5299 /* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */
5299 iwl4965_write_prph(priv, BSM_WR_MEM_SRC_REG, 0x0); 5300 iwl_write_prph(priv, BSM_WR_MEM_SRC_REG, 0x0);
5300 iwl4965_write_prph(priv, BSM_WR_MEM_DST_REG, 5301 iwl_write_prph(priv, BSM_WR_MEM_DST_REG,
5301 RTC_INST_LOWER_BOUND); 5302 RTC_INST_LOWER_BOUND);
5302 iwl4965_write_prph(priv, BSM_WR_DWCOUNT_REG, len / sizeof(u32)); 5303 iwl_write_prph(priv, BSM_WR_DWCOUNT_REG, len / sizeof(u32));
5303 5304
5304 /* Load bootstrap code into instruction SRAM now, 5305 /* Load bootstrap code into instruction SRAM now,
5305 * to prepare to load "initialize" uCode */ 5306 * to prepare to load "initialize" uCode */
5306 iwl4965_write_prph(priv, BSM_WR_CTRL_REG, 5307 iwl_write_prph(priv, BSM_WR_CTRL_REG,
5307 BSM_WR_CTRL_REG_BIT_START); 5308 BSM_WR_CTRL_REG_BIT_START);
5308 5309
5309 /* Wait for load of bootstrap uCode to finish */ 5310 /* Wait for load of bootstrap uCode to finish */
5310 for (i = 0; i < 100; i++) { 5311 for (i = 0; i < 100; i++) {
5311 done = iwl4965_read_prph(priv, BSM_WR_CTRL_REG); 5312 done = iwl_read_prph(priv, BSM_WR_CTRL_REG);
5312 if (!(done & BSM_WR_CTRL_REG_BIT_START)) 5313 if (!(done & BSM_WR_CTRL_REG_BIT_START))
5313 break; 5314 break;
5314 udelay(10); 5315 udelay(10);
@@ -5322,10 +5323,10 @@ static int iwl4965_load_bsm(struct iwl_priv *priv)
5322 5323
5323 /* Enable future boot loads whenever power management unit triggers it 5324 /* Enable future boot loads whenever power management unit triggers it
5324 * (e.g. when powering back up after power-save shutdown) */ 5325 * (e.g. when powering back up after power-save shutdown) */
5325 iwl4965_write_prph(priv, BSM_WR_CTRL_REG, 5326 iwl_write_prph(priv, BSM_WR_CTRL_REG,
5326 BSM_WR_CTRL_REG_BIT_START_EN); 5327 BSM_WR_CTRL_REG_BIT_START_EN);
5327 5328
5328 iwl4965_release_nic_access(priv); 5329 iwl_release_nic_access(priv);
5329 5330
5330 return 0; 5331 return 0;
5331} 5332}
@@ -5333,7 +5334,7 @@ static int iwl4965_load_bsm(struct iwl_priv *priv)
5333static void iwl4965_nic_start(struct iwl_priv *priv) 5334static void iwl4965_nic_start(struct iwl_priv *priv)
5334{ 5335{
5335 /* Remove all resets to allow NIC to operate */ 5336 /* Remove all resets to allow NIC to operate */
5336 iwl4965_write32(priv, CSR_RESET, 0); 5337 iwl_write32(priv, CSR_RESET, 0);
5337} 5338}
5338 5339
5339 5340
@@ -5555,24 +5556,24 @@ static int iwl4965_set_ucode_ptrs(struct iwl_priv *priv)
5555 pdata = priv->ucode_data_backup.p_addr >> 4; 5556 pdata = priv->ucode_data_backup.p_addr >> 4;
5556 5557
5557 spin_lock_irqsave(&priv->lock, flags); 5558 spin_lock_irqsave(&priv->lock, flags);
5558 rc = iwl4965_grab_nic_access(priv); 5559 rc = iwl_grab_nic_access(priv);
5559 if (rc) { 5560 if (rc) {
5560 spin_unlock_irqrestore(&priv->lock, flags); 5561 spin_unlock_irqrestore(&priv->lock, flags);
5561 return rc; 5562 return rc;
5562 } 5563 }
5563 5564
5564 /* Tell bootstrap uCode where to find image to load */ 5565 /* Tell bootstrap uCode where to find image to load */
5565 iwl4965_write_prph(priv, BSM_DRAM_INST_PTR_REG, pinst); 5566 iwl_write_prph(priv, BSM_DRAM_INST_PTR_REG, pinst);
5566 iwl4965_write_prph(priv, BSM_DRAM_DATA_PTR_REG, pdata); 5567 iwl_write_prph(priv, BSM_DRAM_DATA_PTR_REG, pdata);
5567 iwl4965_write_prph(priv, BSM_DRAM_DATA_BYTECOUNT_REG, 5568 iwl_write_prph(priv, BSM_DRAM_DATA_BYTECOUNT_REG,
5568 priv->ucode_data.len); 5569 priv->ucode_data.len);
5569 5570
5570 /* Inst bytecount must be last to set up, bit 31 signals uCode 5571 /* Inst bytecount must be last to set up, bit 31 signals uCode
5571 * that all new ptr/size info is in place */ 5572 * that all new ptr/size info is in place */
5572 iwl4965_write_prph(priv, BSM_DRAM_INST_BYTECOUNT_REG, 5573 iwl_write_prph(priv, BSM_DRAM_INST_BYTECOUNT_REG,
5573 priv->ucode_code.len | BSM_DRAM_INST_LOAD); 5574 priv->ucode_code.len | BSM_DRAM_INST_LOAD);
5574 5575
5575 iwl4965_release_nic_access(priv); 5576 iwl_release_nic_access(priv);
5576 5577
5577 spin_unlock_irqrestore(&priv->lock, flags); 5578 spin_unlock_irqrestore(&priv->lock, flags);
5578 5579
@@ -5752,7 +5753,7 @@ static void __iwl4965_down(struct iwl_priv *priv)
5752 clear_bit(STATUS_EXIT_PENDING, &priv->status); 5753 clear_bit(STATUS_EXIT_PENDING, &priv->status);
5753 5754
5754 /* stop and reset the on-board processor */ 5755 /* stop and reset the on-board processor */
5755 iwl4965_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); 5756 iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET);
5756 5757
5757 /* tell the device to stop sending interrupts */ 5758 /* tell the device to stop sending interrupts */
5758 iwl4965_disable_interrupts(priv); 5759 iwl4965_disable_interrupts(priv);
@@ -5788,7 +5789,7 @@ static void __iwl4965_down(struct iwl_priv *priv)
5788 STATUS_FW_ERROR; 5789 STATUS_FW_ERROR;
5789 5790
5790 spin_lock_irqsave(&priv->lock, flags); 5791 spin_lock_irqsave(&priv->lock, flags);
5791 iwl4965_clear_bit(priv, CSR_GP_CNTRL, 5792 iwl_clear_bit(priv, CSR_GP_CNTRL,
5792 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 5793 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
5793 spin_unlock_irqrestore(&priv->lock, flags); 5794 spin_unlock_irqrestore(&priv->lock, flags);
5794 5795
@@ -5796,17 +5797,17 @@ static void __iwl4965_down(struct iwl_priv *priv)
5796 iwl4965_hw_rxq_stop(priv); 5797 iwl4965_hw_rxq_stop(priv);
5797 5798
5798 spin_lock_irqsave(&priv->lock, flags); 5799 spin_lock_irqsave(&priv->lock, flags);
5799 if (!iwl4965_grab_nic_access(priv)) { 5800 if (!iwl_grab_nic_access(priv)) {
5800 iwl4965_write_prph(priv, APMG_CLK_DIS_REG, 5801 iwl_write_prph(priv, APMG_CLK_DIS_REG,
5801 APMG_CLK_VAL_DMA_CLK_RQT); 5802 APMG_CLK_VAL_DMA_CLK_RQT);
5802 iwl4965_release_nic_access(priv); 5803 iwl_release_nic_access(priv);
5803 } 5804 }
5804 spin_unlock_irqrestore(&priv->lock, flags); 5805 spin_unlock_irqrestore(&priv->lock, flags);
5805 5806
5806 udelay(5); 5807 udelay(5);
5807 5808
5808 iwl4965_hw_nic_stop_master(priv); 5809 iwl4965_hw_nic_stop_master(priv);
5809 iwl4965_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); 5810 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
5810 iwl4965_hw_nic_reset(priv); 5811 iwl4965_hw_nic_reset(priv);
5811 5812
5812 exit: 5813 exit:
@@ -5852,7 +5853,7 @@ static int __iwl4965_up(struct iwl_priv *priv)
5852 } 5853 }
5853 5854
5854 /* If platform's RF_KILL switch is NOT set to KILL */ 5855 /* If platform's RF_KILL switch is NOT set to KILL */
5855 if (iwl4965_read32(priv, CSR_GP_CNTRL) & 5856 if (iwl_read32(priv, CSR_GP_CNTRL) &
5856 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) 5857 CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW)
5857 clear_bit(STATUS_RF_KILL_HW, &priv->status); 5858 clear_bit(STATUS_RF_KILL_HW, &priv->status);
5858 else { 5859 else {
@@ -5863,7 +5864,7 @@ static int __iwl4965_up(struct iwl_priv *priv)
5863 } 5864 }
5864 } 5865 }
5865 5866
5866 iwl4965_write32(priv, CSR_INT, 0xFFFFFFFF); 5867 iwl_write32(priv, CSR_INT, 0xFFFFFFFF);
5867 5868
5868 rc = iwl4965_hw_nic_init(priv); 5869 rc = iwl4965_hw_nic_init(priv);
5869 if (rc) { 5870 if (rc) {
@@ -5872,17 +5873,17 @@ static int __iwl4965_up(struct iwl_priv *priv)
5872 } 5873 }
5873 5874
5874 /* make sure rfkill handshake bits are cleared */ 5875 /* make sure rfkill handshake bits are cleared */
5875 iwl4965_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); 5876 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL);
5876 iwl4965_write32(priv, CSR_UCODE_DRV_GP1_CLR, 5877 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR,
5877 CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); 5878 CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED);
5878 5879
5879 /* clear (again), then enable host interrupts */ 5880 /* clear (again), then enable host interrupts */
5880 iwl4965_write32(priv, CSR_INT, 0xFFFFFFFF); 5881 iwl_write32(priv, CSR_INT, 0xFFFFFFFF);
5881 iwl4965_enable_interrupts(priv); 5882 iwl4965_enable_interrupts(priv);
5882 5883
5883 /* really make sure rfkill handshake bits are cleared */ 5884 /* really make sure rfkill handshake bits are cleared */
5884 iwl4965_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); 5885 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL);
5885 iwl4965_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); 5886 iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL);
5886 5887
5887 /* Copy original ucode data image from disk into backup cache. 5888 /* Copy original ucode data image from disk into backup cache.
5888 * This will be used to initialize the on-board processor's 5889 * This will be used to initialize the on-board processor's
@@ -8082,11 +8083,11 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
8082 * 4. Read EEPROM 8083 * 4. Read EEPROM
8083 *****************/ 8084 *****************/
8084 /* nic init */ 8085 /* nic init */
8085 iwl4965_set_bit(priv, CSR_GIO_CHICKEN_BITS, 8086 iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS,
8086 CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); 8087 CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER);
8087 8088
8088 iwl4965_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); 8089 iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
8089 err = iwl4965_poll_bit(priv, CSR_GP_CNTRL, 8090 err = iwl_poll_bit(priv, CSR_GP_CNTRL,
8090 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 8091 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
8091 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); 8092 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
8092 if (err < 0) { 8093 if (err < 0) {