aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r--net/sched/sch_generic.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 13afa7214392..d97086480893 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -440,7 +440,9 @@ static struct Qdisc_ops pfifo_fast_ops __read_mostly = {
440 .owner = THIS_MODULE, 440 .owner = THIS_MODULE,
441}; 441};
442 442
443struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops) 443struct Qdisc *qdisc_alloc(struct net_device *dev,
444 struct netdev_queue *dev_queue,
445 struct Qdisc_ops *ops)
444{ 446{
445 void *p; 447 void *p;
446 struct Qdisc *sch; 448 struct Qdisc *sch;
@@ -462,6 +464,7 @@ struct Qdisc *qdisc_alloc(struct net_device *dev, struct Qdisc_ops *ops)
462 sch->ops = ops; 464 sch->ops = ops;
463 sch->enqueue = ops->enqueue; 465 sch->enqueue = ops->enqueue;
464 sch->dequeue = ops->dequeue; 466 sch->dequeue = ops->dequeue;
467 sch->dev_queue = dev_queue;
465 sch->dev = dev; 468 sch->dev = dev;
466 dev_hold(dev); 469 dev_hold(dev);
467 atomic_set(&sch->refcnt, 1); 470 atomic_set(&sch->refcnt, 1);
@@ -471,12 +474,14 @@ errout:
471 return ERR_PTR(err); 474 return ERR_PTR(err);
472} 475}
473 476
474struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops, 477struct Qdisc * qdisc_create_dflt(struct net_device *dev,
478 struct netdev_queue *dev_queue,
479 struct Qdisc_ops *ops,
475 unsigned int parentid) 480 unsigned int parentid)
476{ 481{
477 struct Qdisc *sch; 482 struct Qdisc *sch;
478 483
479 sch = qdisc_alloc(dev, ops); 484 sch = qdisc_alloc(dev, dev_queue, ops);
480 if (IS_ERR(sch)) 485 if (IS_ERR(sch))
481 goto errout; 486 goto errout;
482 sch->stats_lock = &dev->queue_lock; 487 sch->stats_lock = &dev->queue_lock;
@@ -545,7 +550,8 @@ void dev_activate(struct net_device *dev)
545 if (dev->qdisc_sleeping == &noop_qdisc) { 550 if (dev->qdisc_sleeping == &noop_qdisc) {
546 struct Qdisc *qdisc; 551 struct Qdisc *qdisc;
547 if (dev->tx_queue_len) { 552 if (dev->tx_queue_len) {
548 qdisc = qdisc_create_dflt(dev, &pfifo_fast_ops, 553 qdisc = qdisc_create_dflt(dev, &dev->tx_queue,
554 &pfifo_fast_ops,
549 TC_H_ROOT); 555 TC_H_ROOT);
550 if (qdisc == NULL) { 556 if (qdisc == NULL) {
551 printk(KERN_INFO "%s: activation failed\n", dev->name); 557 printk(KERN_INFO "%s: activation failed\n", dev->name);