diff options
author | Winkler, Tomas <tomas.winkler@intel.com> | 2009-01-08 13:19:53 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:00:11 -0500 |
commit | 141c43a3e4c7e8543fea982284765fda5e73837e (patch) | |
tree | 77445c5d25d33a3bbcba137ac32a718ec591217c /drivers/net/wireless/iwlwifi/iwl3945-base.c | |
parent | f5965955e0107b116b379cccb94de612281bdf55 (diff) |
iwl3945: kill iwl3945_rx_queue_restock
This patch kills iwl3945_rx_queue_restock function on prise of new
hw_params.rx_wrt_ptr_reg which holds per NIC RX write pointer register.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 43cfc6ec5163..04466d30fe4b 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3219,52 +3219,6 @@ static int iwl3945_rx_queue_space(const struct iwl_rx_queue *q) | |||
3219 | } | 3219 | } |
3220 | 3220 | ||
3221 | /** | 3221 | /** |
3222 | * iwl3945_rx_queue_update_write_ptr - Update the write pointer for the RX queue | ||
3223 | */ | ||
3224 | int iwl3945_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl_rx_queue *q) | ||
3225 | { | ||
3226 | u32 reg = 0; | ||
3227 | int rc = 0; | ||
3228 | unsigned long flags; | ||
3229 | |||
3230 | spin_lock_irqsave(&q->lock, flags); | ||
3231 | |||
3232 | if (q->need_update == 0) | ||
3233 | goto exit_unlock; | ||
3234 | |||
3235 | /* If power-saving is in use, make sure device is awake */ | ||
3236 | if (test_bit(STATUS_POWER_PMI, &priv->status)) { | ||
3237 | reg = iwl_read32(priv, CSR_UCODE_DRV_GP1); | ||
3238 | |||
3239 | if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { | ||
3240 | iwl_set_bit(priv, CSR_GP_CNTRL, | ||
3241 | CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); | ||
3242 | goto exit_unlock; | ||
3243 | } | ||
3244 | |||
3245 | rc = iwl_grab_nic_access(priv); | ||
3246 | if (rc) | ||
3247 | goto exit_unlock; | ||
3248 | |||
3249 | /* Device expects a multiple of 8 */ | ||
3250 | iwl_write_direct32(priv, FH39_RSCSR_CHNL0_WPTR, | ||
3251 | q->write & ~0x7); | ||
3252 | iwl_release_nic_access(priv); | ||
3253 | |||
3254 | /* Else device is assumed to be awake */ | ||
3255 | } else | ||
3256 | /* Device expects a multiple of 8 */ | ||
3257 | iwl_write32(priv, FH39_RSCSR_CHNL0_WPTR, q->write & ~0x7); | ||
3258 | |||
3259 | |||
3260 | q->need_update = 0; | ||
3261 | |||
3262 | exit_unlock: | ||
3263 | spin_unlock_irqrestore(&q->lock, flags); | ||
3264 | return rc; | ||
3265 | } | ||
3266 | |||
3267 | /** | ||
3268 | * iwl3945_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr | 3222 | * iwl3945_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr |
3269 | */ | 3223 | */ |
3270 | static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl_priv *priv, | 3224 | static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl_priv *priv, |
@@ -3320,7 +3274,7 @@ static int iwl3945_rx_queue_restock(struct iwl_priv *priv) | |||
3320 | spin_lock_irqsave(&rxq->lock, flags); | 3274 | spin_lock_irqsave(&rxq->lock, flags); |
3321 | rxq->need_update = 1; | 3275 | rxq->need_update = 1; |
3322 | spin_unlock_irqrestore(&rxq->lock, flags); | 3276 | spin_unlock_irqrestore(&rxq->lock, flags); |
3323 | rc = iwl3945_rx_queue_update_write_ptr(priv, rxq); | 3277 | rc = iwl_rx_queue_update_write_ptr(priv, rxq); |
3324 | if (rc) | 3278 | if (rc) |
3325 | return rc; | 3279 | return rc; |
3326 | } | 3280 | } |
@@ -4007,7 +3961,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
4007 | /* uCode wakes up after power-down sleep */ | 3961 | /* uCode wakes up after power-down sleep */ |
4008 | if (inta & CSR_INT_BIT_WAKEUP) { | 3962 | if (inta & CSR_INT_BIT_WAKEUP) { |
4009 | IWL_DEBUG_ISR("Wakeup interrupt\n"); | 3963 | IWL_DEBUG_ISR("Wakeup interrupt\n"); |
4010 | iwl3945_rx_queue_update_write_ptr(priv, &priv->rxq); | 3964 | iwl_rx_queue_update_write_ptr(priv, &priv->rxq); |
4011 | iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[0]); | 3965 | iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[0]); |
4012 | iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[1]); | 3966 | iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[1]); |
4013 | iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[2]); | 3967 | iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[2]); |