]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/sch_atm.c
sched: prevent wakeup over-scheduling
[linux-2.6-omap-h63xx.git] / net / sched / sch_atm.c
index 37ae6d1deb140b8838c302b3f4f24f0ba538f2d1..ddc4f2c54379791de9d60bd9829c68dad52c5e54 100644 (file)
@@ -292,13 +292,12 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
                }
        }
        DPRINTK("atm_tc_change: new id %x\n", classid);
-       flow = kmalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL);
+       flow = kzalloc(sizeof(struct atm_flow_data) + hdr_len, GFP_KERNEL);
        DPRINTK("atm_tc_change: flow %p\n", flow);
        if (!flow) {
                error = -ENOBUFS;
                goto err_out;
        }
-       memset(flow, 0, sizeof(*flow));
        flow->filter_list = NULL;
        if (!(flow->q = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, classid)))
                flow->q = &noop_qdisc;
@@ -428,26 +427,9 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
                                ATM_SKB(skb)->atm_options |= ATM_ATMOPT_CLP;
                        break;
                }
-#elif defined(CONFIG_NET_CLS_POLICE)
-               switch (result) {
-               case TC_POLICE_SHOT:
-                       kfree_skb(skb);
-                       goto drop;
-               case TC_POLICE_RECLASSIFY:
-                       if (flow->excess)
-                               flow = flow->excess;
-                       else {
-                               ATM_SKB(skb)->atm_options |= ATM_ATMOPT_CLP;
-                               break;
-                       }
-                       /* fall through */
-               case TC_POLICE_OK:
-                       /* fall through */
-               default:
-                       break;
-               }
 #endif
        }
+
        if ((ret = flow->q->enqueue(skb, flow->q)) != 0) {
 drop: __maybe_unused
                sch->qstats.drops++;