aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00mac.c
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@kpnplanet.nl>2008-05-10 07:43:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-21 21:47:32 -0400
commit61448f88078e813bbaaa58eb775d650c85e7d407 (patch)
tree1a64fc0de784a3288369f9e554e7e2ec122ebc65 /drivers/net/wireless/rt2x00/rt2x00mac.c
parent61486e0f68d1f8966c09b734566a187d42d65c54 (diff)
rt2x00: Fix queue related oops in case of deselected mac80211 multi-queue feature.
With the integration of the mac80211 multiqueue patches it has become possible that the mac80211 layer modifies the number of TX queues that is stored inside the ieee80211_hw structure, especially when multi-queue is not selected. The rt2x00 drivers are not well suited to handle that situation, as they allocate the queue structures before mac80211 has modified the number of queues it is going to use, and also expect the number of allocated queues to match the hardware implementation. Hence, ensure that rt2x00 maintains by itself the number of queues that the hardware supports, and, at the same time, making is not dependent on the preservation of contents inside a mac80211 structure. Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 767e0ffce04e..c5cedb29b87d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -456,7 +456,7 @@ int rt2x00mac_get_tx_stats(struct ieee80211_hw *hw,
456 struct rt2x00_dev *rt2x00dev = hw->priv; 456 struct rt2x00_dev *rt2x00dev = hw->priv;
457 unsigned int i; 457 unsigned int i;
458 458
459 for (i = 0; i < hw->queues; i++) { 459 for (i = 0; i < rt2x00dev->ops->tx_queues; i++) {
460 stats[i].len = rt2x00dev->tx[i].length; 460 stats[i].len = rt2x00dev->tx[i].length;
461 stats[i].limit = rt2x00dev->tx[i].limit; 461 stats[i].limit = rt2x00dev->tx[i].limit;
462 stats[i].count = rt2x00dev->tx[i].count; 462 stats[i].count = rt2x00dev->tx[i].count;