diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 04466d30fe4b..eacef54636a0 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3204,21 +3204,6 @@ static void iwl3945_tx_cmd_complete(struct iwl_priv *priv, | |||
3204 | */ | 3204 | */ |
3205 | 3205 | ||
3206 | /** | 3206 | /** |
3207 | * iwl3945_rx_queue_space - Return number of free slots available in queue. | ||
3208 | */ | ||
3209 | static int iwl3945_rx_queue_space(const struct iwl_rx_queue *q) | ||
3210 | { | ||
3211 | int s = q->read - q->write; | ||
3212 | if (s <= 0) | ||
3213 | s += RX_QUEUE_SIZE; | ||
3214 | /* keep some buffer to not confuse full and empty queue */ | ||
3215 | s -= 2; | ||
3216 | if (s < 0) | ||
3217 | s = 0; | ||
3218 | return s; | ||
3219 | } | ||
3220 | |||
3221 | /** | ||
3222 | * iwl3945_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr | 3207 | * iwl3945_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr |
3223 | */ | 3208 | */ |
3224 | static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl_priv *priv, | 3209 | static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl_priv *priv, |
@@ -3248,7 +3233,7 @@ static int iwl3945_rx_queue_restock(struct iwl_priv *priv) | |||
3248 | 3233 | ||
3249 | spin_lock_irqsave(&rxq->lock, flags); | 3234 | spin_lock_irqsave(&rxq->lock, flags); |
3250 | write = rxq->write & ~0x7; | 3235 | write = rxq->write & ~0x7; |
3251 | while ((iwl3945_rx_queue_space(rxq) > 0) && (rxq->free_count)) { | 3236 | while ((iwl_rx_queue_space(rxq) > 0) && (rxq->free_count)) { |
3252 | /* Get next free Rx buffer, remove from free list */ | 3237 | /* Get next free Rx buffer, remove from free list */ |
3253 | element = rxq->rx_free.next; | 3238 | element = rxq->rx_free.next; |
3254 | rxb = list_entry(element, struct iwl_rx_mem_buffer, list); | 3239 | rxb = list_entry(element, struct iwl_rx_mem_buffer, list); |
@@ -3459,7 +3444,7 @@ static void iwl3945_rx_handle(struct iwl_priv *priv) | |||
3459 | r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF; | 3444 | r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF; |
3460 | i = rxq->read; | 3445 | i = rxq->read; |
3461 | 3446 | ||
3462 | if (iwl3945_rx_queue_space(rxq) > (RX_QUEUE_SIZE / 2)) | 3447 | if (iwl_rx_queue_space(rxq) > (RX_QUEUE_SIZE / 2)) |
3463 | fill_rx = 1; | 3448 | fill_rx = 1; |
3464 | /* Rx interrupt, but nothing sent from uCode */ | 3449 | /* Rx interrupt, but nothing sent from uCode */ |
3465 | if (i == r) | 3450 | if (i == r) |