htb: initialize cl->tokens and cl->ctokens correctly
authorJiri Pirko <jiri@resnulli.us>
Tue, 12 Feb 2013 00:12:02 +0000 (00:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2013 23:59:44 +0000 (18:59 -0500)
These are in ns so convert from ticks to ns.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_htb.c

index 547912e94038f0cb36c210b9b50153c6c24b07eb..2b225446b3dec0d00a52f02dc2862c452d54d4e4 100644 (file)
@@ -1459,8 +1459,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
                cl->parent = parent;
 
                /* set class to be in HTB_CAN_SEND state */
-               cl->tokens = hopt->buffer;
-               cl->ctokens = hopt->cbuffer;
+               cl->tokens = PSCHED_TICKS2NS(hopt->buffer);
+               cl->ctokens = PSCHED_TICKS2NS(hopt->cbuffer);
                cl->mbuffer = 60 * PSCHED_TICKS_PER_SEC;        /* 1min */
                cl->t_c = psched_get_time();
                cl->cmode = HTB_CAN_SEND;