From 641a5e9be3e5af5a6ae38db96deae5491f326fda Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Sun, 13 Apr 2008 10:43:50 +0200 Subject: [PATCH] --- yaml --- r: 90809 b: refs/heads/master c: 245cbe7a65f3e17999de276ea1c84538f3a7451e h: refs/heads/master i: 90807: 913061e1fdeaf915815faa3bf5445b2373afdfa3 v: v3 --- [refs] | 2 +- trunk/net/mac80211/key.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index fb5baf8296cf..86754b9d6a9a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b16bd15c379410f2aa47837aa4a0de5712856ad5 +refs/heads/master: 245cbe7a65f3e17999de276ea1c84538f3a7451e diff --git a/trunk/net/mac80211/key.c b/trunk/net/mac80211/key.c index b98711dcdc54..150d66dbda9d 100644 --- a/trunk/net/mac80211/key.c +++ b/trunk/net/mac80211/key.c @@ -74,9 +74,12 @@ static void add_todo(struct ieee80211_key *key, u32 flag) spin_lock(&todo_lock); key->flags |= flag; - /* only add if not already added */ - if (list_empty(&key->todo)) - list_add(&key->todo, &todo_list); + /* + * Remove again if already on the list so that we move it to the end. + */ + if (!list_empty(&key->todo)) + list_del(&key->todo); + list_add_tail(&key->todo, &todo_list); schedule_work(&todo_work); spin_unlock(&todo_lock); }