diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-08-17 22:15:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:38:06 -0400 |
commit | c3f967d301a76b7053d16817c34191964c457566 (patch) | |
tree | b04acd0cf4d33274d83245bca6a35576994ac801 /drivers/net/wireless/mwl8k.c | |
parent | d4b7057052236e81ab0788cc8df306dc02b0e7be (diff) |
mwl8k: don't hardcode the number of transmit queues
Use MWL8K_TX_QUEUES instead of a hardcoded "4" in a couple of places.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index cc0aa80ca877..0281e70cec84 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -1080,17 +1080,17 @@ struct mwl8k_txq_info { | |||
1080 | }; | 1080 | }; |
1081 | 1081 | ||
1082 | static int mwl8k_scan_tx_ring(struct mwl8k_priv *priv, | 1082 | static int mwl8k_scan_tx_ring(struct mwl8k_priv *priv, |
1083 | struct mwl8k_txq_info txinfo[], | 1083 | struct mwl8k_txq_info *txinfo) |
1084 | u32 num_queues) | ||
1085 | { | 1084 | { |
1086 | int count, desc, status; | 1085 | int count, desc, status; |
1087 | struct mwl8k_tx_queue *txq; | 1086 | struct mwl8k_tx_queue *txq; |
1088 | struct mwl8k_tx_desc *tx_desc; | 1087 | struct mwl8k_tx_desc *tx_desc; |
1089 | int ndescs = 0; | 1088 | int ndescs = 0; |
1090 | 1089 | ||
1091 | memset(txinfo, 0, num_queues * sizeof(struct mwl8k_txq_info)); | 1090 | memset(txinfo, 0, MWL8K_TX_QUEUES * sizeof(struct mwl8k_txq_info)); |
1091 | |||
1092 | spin_lock_bh(&priv->tx_lock); | 1092 | spin_lock_bh(&priv->tx_lock); |
1093 | for (count = 0; count < num_queues; count++) { | 1093 | for (count = 0; count < MWL8K_TX_QUEUES; count++) { |
1094 | txq = priv->txq + count; | 1094 | txq = priv->txq + count; |
1095 | txinfo[count].len = txq->tx_stats.len; | 1095 | txinfo[count].len = txq->tx_stats.len; |
1096 | txinfo[count].head = txq->tx_head; | 1096 | txinfo[count].head = txq->tx_head; |
@@ -1135,7 +1135,7 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw, u32 delay_ms) | |||
1135 | spin_unlock_bh(&priv->tx_lock); | 1135 | spin_unlock_bh(&priv->tx_lock); |
1136 | 1136 | ||
1137 | if (count) { | 1137 | if (count) { |
1138 | struct mwl8k_txq_info txinfo[4]; | 1138 | struct mwl8k_txq_info txinfo[MWL8K_TX_QUEUES]; |
1139 | int index; | 1139 | int index; |
1140 | int newcount; | 1140 | int newcount; |
1141 | 1141 | ||
@@ -1152,8 +1152,8 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw, u32 delay_ms) | |||
1152 | printk(KERN_ERR "%s(%u) TIMEDOUT:%ums Pend:%u-->%u\n", | 1152 | printk(KERN_ERR "%s(%u) TIMEDOUT:%ums Pend:%u-->%u\n", |
1153 | __func__, __LINE__, delay_ms, count, newcount); | 1153 | __func__, __LINE__, delay_ms, count, newcount); |
1154 | 1154 | ||
1155 | mwl8k_scan_tx_ring(priv, txinfo, 4); | 1155 | mwl8k_scan_tx_ring(priv, txinfo); |
1156 | for (index = 0; index < 4; index++) | 1156 | for (index = 0; index < MWL8K_TX_QUEUES; index++) |
1157 | printk(KERN_ERR | 1157 | printk(KERN_ERR |
1158 | "TXQ:%u L:%u H:%u T:%u FW:%u DRV:%u U:%u\n", | 1158 | "TXQ:%u L:%u H:%u T:%u FW:%u DRV:%u U:%u\n", |
1159 | index, | 1159 | index, |