aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_teql.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-08 20:06:30 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-08 20:06:30 -0400
commit5ce2d488fe039ddd86a638496cf704df86c74eeb (patch)
tree71b4d982bfa8bd457bb41c0693c0e70d75b524b4 /net/sched/sch_teql.c
parentbb949fbd1878973c3539d9aecff52f284482a937 (diff)
pkt_sched: Remove 'dev' member of struct Qdisc.
It can be obtained via the netdev_queue. So create a helper routine, qdisc_dev(), to make the transformations nicer looking. Now, qdisc_alloc() now no longer needs a net_device pointer argument. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_teql.c')
-rw-r--r--net/sched/sch_teql.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index 0444fd0f0d22..b3fc82623fc6 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -78,7 +78,7 @@ struct teql_sched_data
78static int 78static int
79teql_enqueue(struct sk_buff *skb, struct Qdisc* sch) 79teql_enqueue(struct sk_buff *skb, struct Qdisc* sch)
80{ 80{
81 struct net_device *dev = sch->dev; 81 struct net_device *dev = qdisc_dev(sch);
82 struct teql_sched_data *q = qdisc_priv(sch); 82 struct teql_sched_data *q = qdisc_priv(sch);
83 83
84 if (q->q.qlen < dev->tx_queue_len) { 84 if (q->q.qlen < dev->tx_queue_len) {
@@ -111,7 +111,7 @@ teql_dequeue(struct Qdisc* sch)
111 111
112 skb = __skb_dequeue(&dat->q); 112 skb = __skb_dequeue(&dat->q);
113 if (skb == NULL) { 113 if (skb == NULL) {
114 struct net_device *m = dat->m->dev->qdisc->dev; 114 struct net_device *m = qdisc_dev(dat->m->dev->qdisc);
115 if (m) { 115 if (m) {
116 dat->m->slaves = sch; 116 dat->m->slaves = sch;
117 netif_wake_queue(m); 117 netif_wake_queue(m);
@@ -170,7 +170,7 @@ teql_destroy(struct Qdisc* sch)
170 170
171static int teql_qdisc_init(struct Qdisc *sch, struct nlattr *opt) 171static int teql_qdisc_init(struct Qdisc *sch, struct nlattr *opt)
172{ 172{
173 struct net_device *dev = sch->dev; 173 struct net_device *dev = qdisc_dev(sch);
174 struct teql_master *m = (struct teql_master*)sch->ops; 174 struct teql_master *m = (struct teql_master*)sch->ops;
175 struct teql_sched_data *q = qdisc_priv(sch); 175 struct teql_sched_data *q = qdisc_priv(sch);
176 176
@@ -282,7 +282,7 @@ restart:
282 goto drop; 282 goto drop;
283 283
284 do { 284 do {
285 struct net_device *slave = q->dev; 285 struct net_device *slave = qdisc_dev(q);
286 286
287 if (slave->qdisc_sleeping != q) 287 if (slave->qdisc_sleeping != q)
288 continue; 288 continue;
@@ -352,7 +352,7 @@ static int teql_master_open(struct net_device *dev)
352 352
353 q = m->slaves; 353 q = m->slaves;
354 do { 354 do {
355 struct net_device *slave = q->dev; 355 struct net_device *slave = qdisc_dev(q);
356 356
357 if (slave == NULL) 357 if (slave == NULL)
358 return -EUNATCH; 358 return -EUNATCH;
@@ -403,7 +403,7 @@ static int teql_master_mtu(struct net_device *dev, int new_mtu)
403 q = m->slaves; 403 q = m->slaves;
404 if (q) { 404 if (q) {
405 do { 405 do {
406 if (new_mtu > q->dev->mtu) 406 if (new_mtu > qdisc_dev(q)->mtu)
407 return -EINVAL; 407 return -EINVAL;
408 } while ((q=NEXT_SLAVE(q)) != m->slaves); 408 } while ((q=NEXT_SLAVE(q)) != m->slaves);
409 } 409 }