diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-09 04:06:30 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-09 04:06:30 +0400 |
commit | 5ce2d488fe039ddd86a638496cf704df86c74eeb (patch) | |
tree | 71b4d982bfa8bd457bb41c0693c0e70d75b524b4 /net/sched/sch_teql.c | |
parent | bb949fbd1878973c3539d9aecff52f284482a937 (diff) | |
download | linux-5ce2d488fe039ddd86a638496cf704df86c74eeb.tar.xz |
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.c | 12 |
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 static int teql_enqueue(struct sk_buff *skb, struct Qdisc* sch) { - struct net_device *dev = sch->dev; + struct net_device *dev = qdisc_dev(sch); struct teql_sched_data *q = qdisc_priv(sch); if (q->q.qlen < dev->tx_queue_len) { @@ -111,7 +111,7 @@ teql_dequeue(struct Qdisc* sch) skb = __skb_dequeue(&dat->q); if (skb == NULL) { - struct net_device *m = dat->m->dev->qdisc->dev; + struct net_device *m = qdisc_dev(dat->m->dev->qdisc); if (m) { dat->m->slaves = sch; netif_wake_queue(m); @@ -170,7 +170,7 @@ teql_destroy(struct Qdisc* sch) static int teql_qdisc_init(struct Qdisc *sch, struct nlattr *opt) { - struct net_device *dev = sch->dev; + struct net_device *dev = qdisc_dev(sch); struct teql_master *m = (struct teql_master*)sch->ops; struct teql_sched_data *q = qdisc_priv(sch); @@ -282,7 +282,7 @@ restart: goto drop; do { - struct net_device *slave = q->dev; + struct net_device *slave = qdisc_dev(q); if (slave->qdisc_sleeping != q) continue; @@ -352,7 +352,7 @@ static int teql_master_open(struct net_device *dev) q = m->slaves; do { - struct net_device *slave = q->dev; + struct net_device *slave = qdisc_dev(q); if (slave == NULL) return -EUNATCH; @@ -403,7 +403,7 @@ static int teql_master_mtu(struct net_device *dev, int new_mtu) q = m->slaves; if (q) { do { - if (new_mtu > q->dev->mtu) + if (new_mtu > qdisc_dev(q)->mtu) return -EINVAL; } while ((q=NEXT_SLAVE(q)) != m->slaves); } |