From d4b7152bb3496f8708e274b636e331e85b1abfd8 Mon Sep 17 00:00:00 2001 From: Bob Copeland Date: Sat, 16 Jan 2010 14:36:53 -0500 Subject: [PATCH] --- yaml --- r: 183842 b: refs/heads/master c: 8e9310c1790566ea2de2e8b6e1c04bacbbee648c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/mac80211/rc80211_pid_algo.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 4c5da2193ec7..23cb3010d188 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f44780827c6bbbcd1f12d5c6b6ce84f49a96bc0 +refs/heads/master: 8e9310c1790566ea2de2e8b6e1c04bacbbee648c diff --git a/trunk/net/mac80211/rc80211_pid_algo.c b/trunk/net/mac80211/rc80211_pid_algo.c index 29bc4c516238..2652a374974e 100644 --- a/trunk/net/mac80211/rc80211_pid_algo.c +++ b/trunk/net/mac80211/rc80211_pid_algo.c @@ -157,9 +157,7 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo, /* In case nothing happened during the previous control interval, turn * the sharpening factor on. */ - period = (HZ * pinfo->sampling_period + 500) / 1000; - if (!period) - period = 1; + period = msecs_to_jiffies(pinfo->sampling_period); if (jiffies - spinfo->last_sample > 2 * period) spinfo->sharp_cnt = pinfo->sharpen_duration; @@ -252,9 +250,7 @@ static void rate_control_pid_tx_status(void *priv, struct ieee80211_supported_ba } /* Update PID controller state. */ - period = (HZ * pinfo->sampling_period + 500) / 1000; - if (!period) - period = 1; + period = msecs_to_jiffies(pinfo->sampling_period); if (time_after(jiffies, spinfo->last_sample + period)) rate_control_pid_sample(pinfo, sband, sta, spinfo); }