Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9a7afde authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

htb: initialize cl->tokens and cl->ctokens correctly



These are in ns so convert from ticks to ns.

Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bdd6998b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1459,8 +1459,8 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
		cl->parent = parent;
		cl->parent = parent;


		/* set class to be in HTB_CAN_SEND state */
		/* set class to be in HTB_CAN_SEND state */
		cl->tokens = hopt->buffer;
		cl->tokens = PSCHED_TICKS2NS(hopt->buffer);
		cl->ctokens = hopt->cbuffer;
		cl->ctokens = PSCHED_TICKS2NS(hopt->cbuffer);
		cl->mbuffer = 60 * PSCHED_TICKS_PER_SEC;	/* 1min */
		cl->mbuffer = 60 * PSCHED_TICKS_PER_SEC;	/* 1min */
		cl->t_c = psched_get_time();
		cl->t_c = psched_get_time();
		cl->cmode = HTB_CAN_SEND;
		cl->cmode = HTB_CAN_SEND;