|
@@ -1048,11 +1048,9 @@ static int htb_init(struct Qdisc *sch, struct nlattr *opt)
|
|
|
|
|
|
|
|
if (tb[TCA_HTB_DIRECT_QLEN])
|
|
if (tb[TCA_HTB_DIRECT_QLEN])
|
|
|
q->direct_qlen = nla_get_u32(tb[TCA_HTB_DIRECT_QLEN]);
|
|
q->direct_qlen = nla_get_u32(tb[TCA_HTB_DIRECT_QLEN]);
|
|
|
- else {
|
|
|
|
|
|
|
+ else
|
|
|
q->direct_qlen = qdisc_dev(sch)->tx_queue_len;
|
|
q->direct_qlen = qdisc_dev(sch)->tx_queue_len;
|
|
|
- if (q->direct_qlen < 2) /* some devices have zero tx_queue_len */
|
|
|
|
|
- q->direct_qlen = 2;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
if ((q->rate2quantum = gopt->rate2quantum) < 1)
|
|
if ((q->rate2quantum = gopt->rate2quantum) < 1)
|
|
|
q->rate2quantum = 1;
|
|
q->rate2quantum = 1;
|
|
|
q->defcls = gopt->defcls;
|
|
q->defcls = gopt->defcls;
|