mmc: s3c6410: enable ADMA feature in 6410 sdhci controller
[safe/jmp/linux-2.6] / net / sched / sch_atm.c
index 6eb9a65..fcbb86a 100644 (file)
@@ -3,6 +3,7 @@
 /* Written 1998-2000 by Werner Almesberger, EPFL ICA */
 
 #include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/string.h>
 #include <linux/errno.h>
@@ -49,7 +50,7 @@ struct atm_flow_data {
        struct socket           *sock;          /* for closing */
        u32                     classid;        /* x:y type ID */
        int                     ref;            /* reference count */
-       struct gnet_stats_basic bstats;
+       struct gnet_stats_basic_packed  bstats;
        struct gnet_stats_queue qstats;
        struct atm_flow_data    *next;
        struct atm_flow_data    *excess;        /* flow for excess traffic;
@@ -62,7 +63,7 @@ struct atm_qdisc_data {
        struct atm_flow_data    link;           /* unclassified skbs go here */
        struct atm_flow_data    *flows;         /* NB: "link" is also on this
                                                   list */
-       struct tasklet_struct   task;           /* requeue tasklet */
+       struct tasklet_struct   task;           /* dequeue tasklet */
 };
 
 /* ------------------------- Class/flow operations ------------------------- */
@@ -102,7 +103,8 @@ static int atm_tc_graft(struct Qdisc *sch, unsigned long arg,
                return -EINVAL;
        if (!new)
                new = &noop_qdisc;
-       *old = xchg(&flow->q, new);
+       *old = flow->q;
+       flow->q = new;
        if (*old)
                qdisc_reset(*old);
        return 0;
@@ -534,23 +536,6 @@ static struct sk_buff *atm_tc_peek(struct Qdisc *sch)
        return p->link.q->ops->peek(p->link.q);
 }
 
-static int atm_tc_requeue(struct sk_buff *skb, struct Qdisc *sch)
-{
-       struct atm_qdisc_data *p = qdisc_priv(sch);
-       int ret;
-
-       pr_debug("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
-       ret = p->link.q->ops->requeue(skb, p->link.q);
-       if (!ret) {
-               sch->q.qlen++;
-               sch->qstats.requeues++;
-       } else if (net_xmit_drop_count(ret)) {
-               sch->qstats.drops++;
-               p->link.qstats.drops++;
-       }
-       return ret;
-}
-
 static unsigned int atm_tc_drop(struct Qdisc *sch)
 {
        struct atm_qdisc_data *p = qdisc_priv(sch);
@@ -707,7 +692,6 @@ static struct Qdisc_ops atm_qdisc_ops __read_mostly = {
        .enqueue        = atm_tc_enqueue,
        .dequeue        = atm_tc_dequeue,
        .peek           = atm_tc_peek,
-       .requeue        = atm_tc_requeue,
        .drop           = atm_tc_drop,
        .init           = atm_tc_init,
        .reset          = atm_tc_reset,