]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/sch_htb.c
[NET_SCHED]: Cleanup L2T macros and handle oversized packets
[linux-2.6-omap-h63xx.git] / net / sched / sch_htb.c
index 246a2f9765f1312c6f83092c31944db1bf9aaa1f..5e608a64935af6b644c6ecf3596f7dd84c32d35a 100644 (file)
@@ -132,10 +132,8 @@ struct htb_class {
 static inline long L2T(struct htb_class *cl, struct qdisc_rate_table *rate,
                           int size)
 {
-       int slot = size >> rate->rate.cell_log;
-       if (slot > 255)
-               return (rate->data[255]*(slot >> 8) + rate->data[slot & 0xFF]);
-       return rate->data[slot];
+       long result = qdisc_l2t(rate, size);
+       return result;
 }
 
 struct htb_sched {