.. | .. |
---|
1621 | 1621 | int i; |
---|
1622 | 1622 | |
---|
1623 | 1623 | hrtimer_cancel(&q->advance_timer); |
---|
| 1624 | + |
---|
1624 | 1625 | if (q->qdiscs) { |
---|
1625 | 1626 | for (i = 0; i < dev->num_tx_queues; i++) |
---|
1626 | 1627 | if (q->qdiscs[i]) |
---|
.. | .. |
---|
1642 | 1643 | * happens in qdisc_create(), after taprio_init() has been called. |
---|
1643 | 1644 | */ |
---|
1644 | 1645 | hrtimer_cancel(&q->advance_timer); |
---|
| 1646 | + qdisc_synchronize(sch); |
---|
1645 | 1647 | |
---|
1646 | 1648 | taprio_disable_offload(dev, q, NULL); |
---|
1647 | 1649 | |
---|
.. | .. |
---|
1904 | 1906 | |
---|
1905 | 1907 | static struct Qdisc *taprio_leaf(struct Qdisc *sch, unsigned long cl) |
---|
1906 | 1908 | { |
---|
1907 | | - struct taprio_sched *q = qdisc_priv(sch); |
---|
1908 | | - struct net_device *dev = qdisc_dev(sch); |
---|
1909 | | - unsigned int ntx = cl - 1; |
---|
| 1909 | + struct netdev_queue *dev_queue = taprio_queue_get(sch, cl); |
---|
1910 | 1910 | |
---|
1911 | | - if (ntx >= dev->num_tx_queues) |
---|
| 1911 | + if (!dev_queue) |
---|
1912 | 1912 | return NULL; |
---|
1913 | 1913 | |
---|
1914 | | - return q->qdiscs[ntx]; |
---|
| 1914 | + return dev_queue->qdisc_sleeping; |
---|
1915 | 1915 | } |
---|
1916 | 1916 | |
---|
1917 | 1917 | static unsigned long taprio_find(struct Qdisc *sch, u32 classid) |
---|