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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index a44928c6ba24..887e672f9d7d 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -131,8 +131,10 @@ static u64 psched_ns_t2l(const struct psched_ratecfg *r,
131 131
132 do_div(len, NSEC_PER_SEC); 132 do_div(len, NSEC_PER_SEC);
133 133
134 if (unlikely(r->linklayer == TC_LINKLAYER_ATM)) 134 if (unlikely(r->linklayer == TC_LINKLAYER_ATM)) {
135 len = (len / 53) * 48; 135 do_div(len, 53);
136 len = len * 48;
137 }
136 138
137 if (len > r->overhead) 139 if (len > r->overhead)
138 len -= r->overhead; 140 len -= r->overhead;