diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-05-16 18:57:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:48:14 -0400 |
commit | e2530083609148a7835b54c431f6b8956407c1f6 (patch) | |
tree | 8ed43347541444c7a72d2c79f550f69a93cad591 /net/mac80211/wme.c | |
parent | eefce91a384a64c7bbf913eb08c4adfb911c3639 (diff) |
mac80211: use multi-queue master netdevice
This patch updates mac80211 and drivers to be multi-queue aware and
use that instead of the internal queue mapping. Also does a number
of cleanups in various pieces of the code that fall out and reduces
internal mac80211 state size.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wme.c')
-rw-r--r-- | net/mac80211/wme.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 477690f4dca7..14a9ff10a1e9 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
@@ -158,7 +158,7 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd) | |||
158 | u8 tid; | 158 | u8 tid; |
159 | 159 | ||
160 | if (info->flags & IEEE80211_TX_CTL_REQUEUE) { | 160 | if (info->flags & IEEE80211_TX_CTL_REQUEUE) { |
161 | queue = info->queue; | 161 | queue = skb_get_queue_mapping(skb); |
162 | rcu_read_lock(); | 162 | rcu_read_lock(); |
163 | sta = sta_info_get(local, hdr->addr1); | 163 | sta = sta_info_get(local, hdr->addr1); |
164 | tid = skb->priority & QOS_CONTROL_TAG1D_MASK; | 164 | tid = skb->priority & QOS_CONTROL_TAG1D_MASK; |
@@ -219,7 +219,7 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd) | |||
219 | err = NET_XMIT_DROP; | 219 | err = NET_XMIT_DROP; |
220 | } else { | 220 | } else { |
221 | tid = skb->priority & QOS_CONTROL_TAG1D_MASK; | 221 | tid = skb->priority & QOS_CONTROL_TAG1D_MASK; |
222 | info->queue = (unsigned int) queue; | 222 | skb_set_queue_mapping(skb, queue); |
223 | qdisc = q->queues[queue]; | 223 | qdisc = q->queues[queue]; |
224 | err = qdisc->enqueue(skb, qdisc); | 224 | err = qdisc->enqueue(skb, qdisc); |
225 | if (err == NET_XMIT_SUCCESS) { | 225 | if (err == NET_XMIT_SUCCESS) { |
@@ -240,12 +240,11 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd) | |||
240 | static int wme_qdiscop_requeue(struct sk_buff *skb, struct Qdisc* qd) | 240 | static int wme_qdiscop_requeue(struct sk_buff *skb, struct Qdisc* qd) |
241 | { | 241 | { |
242 | struct ieee80211_sched_data *q = qdisc_priv(qd); | 242 | struct ieee80211_sched_data *q = qdisc_priv(qd); |
243 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
244 | struct Qdisc *qdisc; | 243 | struct Qdisc *qdisc; |
245 | int err; | 244 | int err; |
246 | 245 | ||
247 | /* we recorded which queue to use earlier! */ | 246 | /* we recorded which queue to use earlier! */ |
248 | qdisc = q->queues[info->queue]; | 247 | qdisc = q->queues[skb_get_queue_mapping(skb)]; |
249 | 248 | ||
250 | if ((err = qdisc->ops->requeue(skb, qdisc)) == 0) { | 249 | if ((err = qdisc->ops->requeue(skb, qdisc)) == 0) { |
251 | qd->q.qlen++; | 250 | qd->q.qlen++; |
@@ -269,11 +268,8 @@ static struct sk_buff *wme_qdiscop_dequeue(struct Qdisc* qd) | |||
269 | /* check all the h/w queues in numeric/priority order */ | 268 | /* check all the h/w queues in numeric/priority order */ |
270 | for (queue = 0; queue < QD_NUM(hw); queue++) { | 269 | for (queue = 0; queue < QD_NUM(hw); queue++) { |
271 | /* see if there is room in this hardware queue */ | 270 | /* see if there is room in this hardware queue */ |
272 | if ((test_bit(IEEE80211_LINK_STATE_XOFF, | 271 | if (__netif_subqueue_stopped(local->mdev, queue) || |
273 | &local->state[queue])) || | 272 | !test_bit(queue, q->qdisc_pool)) |
274 | (test_bit(IEEE80211_LINK_STATE_PENDING, | ||
275 | &local->state[queue])) || | ||
276 | (!test_bit(queue, q->qdisc_pool))) | ||
277 | continue; | 273 | continue; |
278 | 274 | ||
279 | /* there is space - try and get a frame */ | 275 | /* there is space - try and get a frame */ |