]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sched/sch_gred.c
net: sched: drop all special handling of tx_queue_len == 0
[karo-tx-linux.git] / net / sched / sch_gred.c
index abb9f2fec28fbd435ff89a17eb7e1937cb4c19b3..80105109f756315d7a31d6734887941c9f16ea9c 100644 (file)
@@ -512,11 +512,9 @@ static int gred_init(struct Qdisc *sch, struct nlattr *opt)
 
        if (tb[TCA_GRED_LIMIT])
                sch->limit = nla_get_u32(tb[TCA_GRED_LIMIT]);
-       else {
-               u32 qlen = qdisc_dev(sch)->tx_queue_len ? : 1;
-
-               sch->limit = qlen * psched_mtu(qdisc_dev(sch));
-       }
+       else
+               sch->limit = qdisc_dev(sch)->tx_queue_len
+                            * psched_mtu(qdisc_dev(sch));
 
        return gred_change_table_def(sch, tb[TCA_GRED_DPS]);
 }