diff options
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r-- | net/sched/sch_generic.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index eac7e0ee23c1..20224086cc28 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -898,14 +898,16 @@ void dev_shutdown(struct net_device *dev) | |||
898 | WARN_ON(timer_pending(&dev->watchdog_timer)); | 898 | WARN_ON(timer_pending(&dev->watchdog_timer)); |
899 | } | 899 | } |
900 | 900 | ||
901 | void psched_ratecfg_precompute(struct psched_ratecfg *r, u32 rate) | 901 | void psched_ratecfg_precompute(struct psched_ratecfg *r, |
902 | const struct tc_ratespec *conf) | ||
902 | { | 903 | { |
903 | u64 factor; | 904 | u64 factor; |
904 | u64 mult; | 905 | u64 mult; |
905 | int shift; | 906 | int shift; |
906 | 907 | ||
907 | r->rate_bps = (u64)rate << 3; | 908 | memset(r, 0, sizeof(*r)); |
908 | r->shift = 0; | 909 | r->overhead = conf->overhead; |
910 | r->rate_bps = (u64)conf->rate << 3; | ||
909 | r->mult = 1; | 911 | r->mult = 1; |
910 | /* | 912 | /* |
911 | * Calibrate mult, shift so that token counting is accurate | 913 | * Calibrate mult, shift so that token counting is accurate |