From fc551d6cd8940ade468ef990843b28894432f93e Mon Sep 17 00:00:00 2001 From: "Winkler, Tomas" Date: Thu, 8 Jan 2009 10:19:54 -0800 Subject: [PATCH] --- yaml --- r: 134115 b: refs/heads/master c: 37d68317add2b769ad232a5d199bece41c59e13f h: refs/heads/master i: 134113: a8d253a8bbc8f6a639040543fc2767ca4fe57ac9 134111: 7556deb23e8a48a6ac12a3e38b445e3e8afdde29 v: v3 --- [refs] | 2 +- .../net/wireless/iwlwifi/iwl3945-base.c | 19 ++----------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index b6572b6a2471..6a8ee9f1ad21 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 141c43a3e4c7e8543fea982284765fda5e73837e +refs/heads/master: 37d68317add2b769ad232a5d199bece41c59e13f diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c b/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c index 04466d30fe4b..eacef54636a0 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -3203,21 +3203,6 @@ static void iwl3945_tx_cmd_complete(struct iwl_priv *priv, * */ -/** - * iwl3945_rx_queue_space - Return number of free slots available in queue. - */ -static int iwl3945_rx_queue_space(const struct iwl_rx_queue *q) -{ - int s = q->read - q->write; - if (s <= 0) - s += RX_QUEUE_SIZE; - /* keep some buffer to not confuse full and empty queue */ - s -= 2; - if (s < 0) - s = 0; - return s; -} - /** * iwl3945_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr */ @@ -3248,7 +3233,7 @@ static int iwl3945_rx_queue_restock(struct iwl_priv *priv) spin_lock_irqsave(&rxq->lock, flags); write = rxq->write & ~0x7; - while ((iwl3945_rx_queue_space(rxq) > 0) && (rxq->free_count)) { + while ((iwl_rx_queue_space(rxq) > 0) && (rxq->free_count)) { /* Get next free Rx buffer, remove from free list */ element = rxq->rx_free.next; rxb = list_entry(element, struct iwl_rx_mem_buffer, list); @@ -3459,7 +3444,7 @@ static void iwl3945_rx_handle(struct iwl_priv *priv) r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF; i = rxq->read; - if (iwl3945_rx_queue_space(rxq) > (RX_QUEUE_SIZE / 2)) + if (iwl_rx_queue_space(rxq) > (RX_QUEUE_SIZE / 2)) fill_rx = 1; /* Rx interrupt, but nothing sent from uCode */ if (i == r)