linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rc80211-pid: fix last_sample initialization
@ 2008-01-16 23:38 Stefano Brivio
  2008-01-16 23:49 ` Mattias Nissler
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Brivio @ 2008-01-16 23:38 UTC (permalink / raw)
  To: John W. Linville; +Cc: Michael Buesch, Mattias Nissler, linux-wireless

Fix last_sample initialization. kzalloc'ing the per-STA data wasn't enough,
as jiffies can assume negative values as well. This fixes a bug which
prevented correct PID operation for a while after booting.

Thanks to Michael Buesch for reporting this.

Reported-and-tested-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
---
Index: wireless-2.6/net/mac80211/rc80211_pid_algo.c
===================================================================
--- wireless-2.6.orig/net/mac80211/rc80211_pid_algo.c
+++ wireless-2.6/net/mac80211/rc80211_pid_algo.c
@@ -496,6 +496,8 @@ static void *rate_control_pid_alloc_sta(
 	if (spinfo == NULL)
 		return NULL;
 
+	spinfo->last_sample = jiffies;
+
 #ifdef CONFIG_MAC80211_DEBUGFS
 	spin_lock_init(&spinfo->events.lock);
 	init_waitqueue_head(&spinfo->events.waitqueue);


-- 
Ciao
Stefano

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-16 23:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-16 23:38 rc80211-pid: fix last_sample initialization Stefano Brivio
2008-01-16 23:49 ` Mattias Nissler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).