diff options
Diffstat (limited to 'net/sched/sch_prio.c')
-rw-r--r-- | net/sched/sch_prio.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index ca58a039208e..39157f7bc046 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -136,7 +136,8 @@ prio_dequeue(struct Qdisc* sch) | |||
136 | * pulling an skb. This way we avoid excessive requeues | 136 | * pulling an skb. This way we avoid excessive requeues |
137 | * for slower queues. | 137 | * for slower queues. |
138 | */ | 138 | */ |
139 | if (!__netif_subqueue_stopped(sch->dev, (q->mq ? prio : 0))) { | 139 | if (!__netif_subqueue_stopped(qdisc_dev(sch), |
140 | (q->mq ? prio : 0))) { | ||
140 | qdisc = q->queues[prio]; | 141 | qdisc = q->queues[prio]; |
141 | skb = qdisc->dequeue(qdisc); | 142 | skb = qdisc->dequeue(qdisc); |
142 | if (skb) { | 143 | if (skb) { |
@@ -165,8 +166,8 @@ static struct sk_buff *rr_dequeue(struct Qdisc* sch) | |||
165 | * for slower queues. If the queue is stopped, try the | 166 | * for slower queues. If the queue is stopped, try the |
166 | * next queue. | 167 | * next queue. |
167 | */ | 168 | */ |
168 | if (!__netif_subqueue_stopped(sch->dev, | 169 | if (!__netif_subqueue_stopped(qdisc_dev(sch), |
169 | (q->mq ? q->curband : 0))) { | 170 | (q->mq ? q->curband : 0))) { |
170 | qdisc = q->queues[q->curband]; | 171 | qdisc = q->queues[q->curband]; |
171 | skb = qdisc->dequeue(qdisc); | 172 | skb = qdisc->dequeue(qdisc); |
172 | if (skb) { | 173 | if (skb) { |
@@ -249,10 +250,10 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt) | |||
249 | if (q->mq) { | 250 | if (q->mq) { |
250 | if (sch->parent != TC_H_ROOT) | 251 | if (sch->parent != TC_H_ROOT) |
251 | return -EINVAL; | 252 | return -EINVAL; |
252 | if (netif_is_multiqueue(sch->dev)) { | 253 | if (netif_is_multiqueue(qdisc_dev(sch))) { |
253 | if (q->bands == 0) | 254 | if (q->bands == 0) |
254 | q->bands = sch->dev->egress_subqueue_count; | 255 | q->bands = qdisc_dev(sch)->egress_subqueue_count; |
255 | else if (q->bands != sch->dev->egress_subqueue_count) | 256 | else if (q->bands != qdisc_dev(sch)->egress_subqueue_count) |
256 | return -EINVAL; | 257 | return -EINVAL; |
257 | } else | 258 | } else |
258 | return -EOPNOTSUPP; | 259 | return -EOPNOTSUPP; |
@@ -281,7 +282,7 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt) | |||
281 | for (i=0; i<q->bands; i++) { | 282 | for (i=0; i<q->bands; i++) { |
282 | if (q->queues[i] == &noop_qdisc) { | 283 | if (q->queues[i] == &noop_qdisc) { |
283 | struct Qdisc *child; | 284 | struct Qdisc *child; |
284 | child = qdisc_create_dflt(sch->dev, sch->dev_queue, | 285 | child = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue, |
285 | &pfifo_qdisc_ops, | 286 | &pfifo_qdisc_ops, |
286 | TC_H_MAKE(sch->handle, i + 1)); | 287 | TC_H_MAKE(sch->handle, i + 1)); |
287 | if (child) { | 288 | if (child) { |