aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/key.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index b98711dcdc5..150d66dbda9 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -74,9 +74,12 @@ static void add_todo(struct ieee80211_key *key, u32 flag)
74 74
75 spin_lock(&todo_lock); 75 spin_lock(&todo_lock);
76 key->flags |= flag; 76 key->flags |= flag;
77 /* only add if not already added */ 77 /*
78 if (list_empty(&key->todo)) 78 * Remove again if already on the list so that we move it to the end.
79 list_add(&key->todo, &todo_list); 79 */
80 if (!list_empty(&key->todo))
81 list_del(&key->todo);
82 list_add_tail(&key->todo, &todo_list);
80 schedule_work(&todo_work); 83 schedule_work(&todo_work);
81 spin_unlock(&todo_lock); 84 spin_unlock(&todo_lock);
82} 85}