aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_tbf.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_tbf.c')
-rw-r--r--net/sched/sch_tbf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index da9f40e54447..53862953baaf 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -199,8 +199,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch)
199 long ptoks = 0; 199 long ptoks = 0;
200 unsigned int len = skb->len; 200 unsigned int len = skb->len;
201 201
202 PSCHED_GET_TIME(now); 202 now = psched_get_time();
203
204 toks = psched_tdiff_bounded(now, q->t_c, q->buffer); 203 toks = psched_tdiff_bounded(now, q->t_c, q->buffer);
205 204
206 if (q->P_tab) { 205 if (q->P_tab) {
@@ -254,7 +253,7 @@ static void tbf_reset(struct Qdisc* sch)
254 253
255 qdisc_reset(q->qdisc); 254 qdisc_reset(q->qdisc);
256 sch->q.qlen = 0; 255 sch->q.qlen = 0;
257 PSCHED_GET_TIME(q->t_c); 256 q->t_c = psched_get_time();
258 q->tokens = q->buffer; 257 q->tokens = q->buffer;
259 q->ptokens = q->mtu; 258 q->ptokens = q->mtu;
260 qdisc_watchdog_cancel(&q->watchdog); 259 qdisc_watchdog_cancel(&q->watchdog);
@@ -364,7 +363,7 @@ static int tbf_init(struct Qdisc* sch, struct rtattr *opt)
364 if (opt == NULL) 363 if (opt == NULL)
365 return -EINVAL; 364 return -EINVAL;
366 365
367 PSCHED_GET_TIME(q->t_c); 366 q->t_c = psched_get_time();
368 qdisc_watchdog_init(&q->watchdog, sch); 367 qdisc_watchdog_init(&q->watchdog, sch);
369 q->qdisc = &noop_qdisc; 368 q->qdisc = &noop_qdisc;
370 369