diff options
-rw-r--r-- | net/mac80211/wme.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index b1e20ca03ffe..8ffff27fe000 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
@@ -155,8 +155,7 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd) | |||
155 | unsigned short fc = le16_to_cpu(hdr->frame_control); | 155 | unsigned short fc = le16_to_cpu(hdr->frame_control); |
156 | struct Qdisc *qdisc; | 156 | struct Qdisc *qdisc; |
157 | struct sta_info *sta; | 157 | struct sta_info *sta; |
158 | int err; | 158 | int err, queue; |
159 | u16 queue; | ||
160 | u8 tid; | 159 | u8 tid; |
161 | 160 | ||
162 | if (pkt_data->flags & IEEE80211_TXPD_REQUEUE) { | 161 | if (pkt_data->flags & IEEE80211_TXPD_REQUEUE) { |
@@ -216,15 +215,20 @@ static int wme_qdiscop_enqueue(struct sk_buff *skb, struct Qdisc* qd) | |||
216 | rcu_read_unlock(); | 215 | rcu_read_unlock(); |
217 | } | 216 | } |
218 | 217 | ||
219 | tid = skb->priority & QOS_CONTROL_TAG1D_MASK; | 218 | if (unlikely(queue < 0)) { |
220 | pkt_data->queue = (unsigned int) queue; | 219 | kfree_skb(skb); |
221 | qdisc = q->queues[queue]; | 220 | err = NET_XMIT_DROP; |
222 | err = qdisc->enqueue(skb, qdisc); | 221 | } else { |
223 | if (err == NET_XMIT_SUCCESS) { | 222 | tid = skb->priority & QOS_CONTROL_TAG1D_MASK; |
224 | qd->q.qlen++; | 223 | pkt_data->queue = (unsigned int) queue; |
225 | qd->bstats.bytes += skb->len; | 224 | qdisc = q->queues[queue]; |
226 | qd->bstats.packets++; | 225 | err = qdisc->enqueue(skb, qdisc); |
227 | return NET_XMIT_SUCCESS; | 226 | if (err == NET_XMIT_SUCCESS) { |
227 | qd->q.qlen++; | ||
228 | qd->bstats.bytes += skb->len; | ||
229 | qd->bstats.packets++; | ||
230 | return NET_XMIT_SUCCESS; | ||
231 | } | ||
228 | } | 232 | } |
229 | qd->qstats.drops++; | 233 | qd->qstats.drops++; |
230 | return err; | 234 | return err; |