diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-05-15 01:53:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:47:53 -0400 |
commit | 443cfd457f780e40ceab7e00fbb6a56882848834 (patch) | |
tree | 6085149d4636bf3f7048223579b71512932122c1 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | 39130df32adf8272373c03c8c2499cd2a1b4c5cf (diff) |
iwlwifi: rename iwl4965_queue to iwl_queue
This patch renames iwl4965_queue to iwl_queue.
Signed-off-by: Tomas Winkler <tomas.winkler@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.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index c713b27ec653..2e7e616a089d 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -173,7 +173,7 @@ static const char *iwl4965_escape_essid(const char *essid, u8 essid_len) | |||
173 | * See more detailed info in iwl-4965-hw.h. | 173 | * See more detailed info in iwl-4965-hw.h. |
174 | ***************************************************/ | 174 | ***************************************************/ |
175 | 175 | ||
176 | int iwl4965_queue_space(const struct iwl4965_queue *q) | 176 | int iwl_queue_space(const struct iwl_queue *q) |
177 | { | 177 | { |
178 | int s = q->read_ptr - q->write_ptr; | 178 | int s = q->read_ptr - q->write_ptr; |
179 | 179 | ||
@@ -190,14 +190,14 @@ int iwl4965_queue_space(const struct iwl4965_queue *q) | |||
190 | } | 190 | } |
191 | 191 | ||
192 | 192 | ||
193 | static inline int x2_queue_used(const struct iwl4965_queue *q, int i) | 193 | static inline int iwl_queue_used(const struct iwl_queue *q, int i) |
194 | { | 194 | { |
195 | return q->write_ptr > q->read_ptr ? | 195 | return q->write_ptr > q->read_ptr ? |
196 | (i >= q->read_ptr && i < q->write_ptr) : | 196 | (i >= q->read_ptr && i < q->write_ptr) : |
197 | !(i < q->read_ptr && i >= q->write_ptr); | 197 | !(i < q->read_ptr && i >= q->write_ptr); |
198 | } | 198 | } |
199 | 199 | ||
200 | static inline u8 get_cmd_index(struct iwl4965_queue *q, u32 index, int is_huge) | 200 | static inline u8 get_cmd_index(struct iwl_queue *q, u32 index, int is_huge) |
201 | { | 201 | { |
202 | /* This is for scan command, the big buffer at end of command array */ | 202 | /* This is for scan command, the big buffer at end of command array */ |
203 | if (is_huge) | 203 | if (is_huge) |
@@ -348,7 +348,7 @@ u8 iwl4965_add_station_flags(struct iwl_priv *priv, const u8 *addr, | |||
348 | int iwl4965_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | 348 | int iwl4965_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) |
349 | { | 349 | { |
350 | struct iwl_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM]; | 350 | struct iwl_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM]; |
351 | struct iwl4965_queue *q = &txq->q; | 351 | struct iwl_queue *q = &txq->q; |
352 | struct iwl_tfd_frame *tfd; | 352 | struct iwl_tfd_frame *tfd; |
353 | u32 *control_flags; | 353 | u32 *control_flags; |
354 | struct iwl_cmd *out_cmd; | 354 | struct iwl_cmd *out_cmd; |
@@ -369,7 +369,7 @@ int iwl4965_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
369 | return -EIO; | 369 | return -EIO; |
370 | } | 370 | } |
371 | 371 | ||
372 | if (iwl4965_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { | 372 | if (iwl_queue_space(q) < ((cmd->meta.flags & CMD_ASYNC) ? 2 : 1)) { |
373 | IWL_ERROR("No space for Tx\n"); | 373 | IWL_ERROR("No space for Tx\n"); |
374 | return -ENOSPC; | 374 | return -ENOSPC; |
375 | } | 375 | } |
@@ -1768,7 +1768,7 @@ static int iwl4965_tx_skb(struct iwl_priv *priv, | |||
1768 | u32 *control_flags; | 1768 | u32 *control_flags; |
1769 | int txq_id = ctl->queue; | 1769 | int txq_id = ctl->queue; |
1770 | struct iwl_tx_queue *txq = NULL; | 1770 | struct iwl_tx_queue *txq = NULL; |
1771 | struct iwl4965_queue *q = NULL; | 1771 | struct iwl_queue *q = NULL; |
1772 | dma_addr_t phys_addr; | 1772 | dma_addr_t phys_addr; |
1773 | dma_addr_t txcmd_phys; | 1773 | dma_addr_t txcmd_phys; |
1774 | dma_addr_t scratch_phys; | 1774 | dma_addr_t scratch_phys; |
@@ -1981,7 +1981,7 @@ static int iwl4965_tx_skb(struct iwl_priv *priv, | |||
1981 | if (rc) | 1981 | if (rc) |
1982 | return rc; | 1982 | return rc; |
1983 | 1983 | ||
1984 | if ((iwl4965_queue_space(q) < q->high_mark) | 1984 | if ((iwl_queue_space(q) < q->high_mark) |
1985 | && priv->mac80211_registered) { | 1985 | && priv->mac80211_registered) { |
1986 | if (wait_write_ptr) { | 1986 | if (wait_write_ptr) { |
1987 | spin_lock_irqsave(&priv->lock, flags); | 1987 | spin_lock_irqsave(&priv->lock, flags); |
@@ -2332,10 +2332,10 @@ static void iwl4965_txstatus_to_ieee(struct iwl_priv *priv, | |||
2332 | int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) | 2332 | int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) |
2333 | { | 2333 | { |
2334 | struct iwl_tx_queue *txq = &priv->txq[txq_id]; | 2334 | struct iwl_tx_queue *txq = &priv->txq[txq_id]; |
2335 | struct iwl4965_queue *q = &txq->q; | 2335 | struct iwl_queue *q = &txq->q; |
2336 | int nfreed = 0; | 2336 | int nfreed = 0; |
2337 | 2337 | ||
2338 | if ((index >= q->n_bd) || (x2_queue_used(q, index) == 0)) { | 2338 | if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) { |
2339 | IWL_ERROR("Read index for DMA queue txq id (%d), index %d, " | 2339 | IWL_ERROR("Read index for DMA queue txq id (%d), index %d, " |
2340 | "is out of range [0-%d] %d %d.\n", txq_id, | 2340 | "is out of range [0-%d] %d %d.\n", txq_id, |
2341 | index, q->n_bd, q->write_ptr, q->read_ptr); | 2341 | index, q->n_bd, q->write_ptr, q->read_ptr); |
@@ -2541,7 +2541,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2541 | __le16 *qc; | 2541 | __le16 *qc; |
2542 | #endif | 2542 | #endif |
2543 | 2543 | ||
2544 | if ((index >= txq->q.n_bd) || (x2_queue_used(&txq->q, index) == 0)) { | 2544 | if ((index >= txq->q.n_bd) || (iwl_queue_used(&txq->q, index) == 0)) { |
2545 | IWL_ERROR("Read index for DMA queue txq_id (%d) index %d " | 2545 | IWL_ERROR("Read index for DMA queue txq_id (%d) index %d " |
2546 | "is out of range [0-%d] %d %d\n", txq_id, | 2546 | "is out of range [0-%d] %d %d\n", txq_id, |
2547 | index, txq->q.n_bd, txq->q.write_ptr, | 2547 | index, txq->q.n_bd, txq->q.write_ptr, |
@@ -2587,7 +2587,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2587 | freed = iwl4965_tx_queue_reclaim(priv, txq_id, index); | 2587 | freed = iwl4965_tx_queue_reclaim(priv, txq_id, index); |
2588 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 2588 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; |
2589 | 2589 | ||
2590 | if (iwl4965_queue_space(&txq->q) > txq->q.low_mark && | 2590 | if (iwl_queue_space(&txq->q) > txq->q.low_mark && |
2591 | txq_id >= 0 && priv->mac80211_registered && | 2591 | txq_id >= 0 && priv->mac80211_registered && |
2592 | agg->state != IWL_EMPTYING_HW_QUEUE_DELBA) { | 2592 | agg->state != IWL_EMPTYING_HW_QUEUE_DELBA) { |
2593 | /* calculate mac80211 ampdu sw queue to wake */ | 2593 | /* calculate mac80211 ampdu sw queue to wake */ |
@@ -2621,7 +2621,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2621 | int freed = iwl4965_tx_queue_reclaim(priv, txq_id, index); | 2621 | int freed = iwl4965_tx_queue_reclaim(priv, txq_id, index); |
2622 | if (tid != MAX_TID_COUNT) | 2622 | if (tid != MAX_TID_COUNT) |
2623 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 2623 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; |
2624 | if (iwl4965_queue_space(&txq->q) > txq->q.low_mark && | 2624 | if (iwl_queue_space(&txq->q) > txq->q.low_mark && |
2625 | (txq_id >= 0) && priv->mac80211_registered) | 2625 | (txq_id >= 0) && priv->mac80211_registered) |
2626 | ieee80211_wake_queue(priv->hw, txq_id); | 2626 | ieee80211_wake_queue(priv->hw, txq_id); |
2627 | if (tid != MAX_TID_COUNT) | 2627 | if (tid != MAX_TID_COUNT) |
@@ -5783,7 +5783,7 @@ static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw, | |||
5783 | struct iwl_priv *priv = hw->priv; | 5783 | struct iwl_priv *priv = hw->priv; |
5784 | int i, avail; | 5784 | int i, avail; |
5785 | struct iwl_tx_queue *txq; | 5785 | struct iwl_tx_queue *txq; |
5786 | struct iwl4965_queue *q; | 5786 | struct iwl_queue *q; |
5787 | unsigned long flags; | 5787 | unsigned long flags; |
5788 | 5788 | ||
5789 | IWL_DEBUG_MAC80211("enter\n"); | 5789 | IWL_DEBUG_MAC80211("enter\n"); |
@@ -5798,7 +5798,7 @@ static int iwl4965_mac_get_tx_stats(struct ieee80211_hw *hw, | |||
5798 | for (i = 0; i < AC_NUM; i++) { | 5798 | for (i = 0; i < AC_NUM; i++) { |
5799 | txq = &priv->txq[i]; | 5799 | txq = &priv->txq[i]; |
5800 | q = &txq->q; | 5800 | q = &txq->q; |
5801 | avail = iwl4965_queue_space(q); | 5801 | avail = iwl_queue_space(q); |
5802 | 5802 | ||
5803 | stats[i].len = q->n_window - avail; | 5803 | stats[i].len = q->n_window - avail; |
5804 | stats[i].limit = q->n_window - q->high_mark; | 5804 | stats[i].limit = q->n_window - q->high_mark; |