Commit c09c7237 authored by Stefano Brivio's avatar Stefano Brivio Committed by David S. Miller
Browse files

rc80211-pid: fix last_sample initialization

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: default avatarMichael Buesch <>
Signed-off-by: default avatarStefano Brivio <>
Signed-off-by: default avatarJohn W. Linville <>
parent f99b751f
...@@ -496,6 +496,8 @@ static void *rate_control_pid_alloc_sta(void *priv, gfp_t gfp) ...@@ -496,6 +496,8 @@ static void *rate_control_pid_alloc_sta(void *priv, gfp_t gfp)
if (spinfo == NULL) if (spinfo == NULL)
return NULL; return NULL;
spinfo->last_sample = jiffies;
spin_lock_init(&spinfo->events.lock); spin_lock_init(&spinfo->events.lock);
init_waitqueue_head(&spinfo->events.waitqueue); init_waitqueue_head(&spinfo->events.waitqueue);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment