summaryrefslogtreecommitdiffstats
path: root/net/mac80211/key.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-04-09 16:45:37 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-04-16 14:53:22 -0400
commit3a245766901a9dfdc3f53457a7954b369b50f281 (patch)
tree33bc4ef4dfb1bdf0eec46d320fd4333f55dffaf8 /net/mac80211/key.h
parent51e8b885902fc8cc2ded48322ad9402bbcff23fe (diff)
downloadlinux-3a245766901a9dfdc3f53457a7954b369b50f281.tar.bz2
mac80211: fix key hwaccel race
The previous key locking patch left a small race: it would be possible to add a key and take the interface down before the key todo is run so that hwaccel for that key is enabled on an interface that is down. Avoid this by running the todo list when an interface is brought up or down. This patch also fixes a small bug: before this change, a few functions used the key list without the lock that protects it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/key.h')
-rw-r--r--net/mac80211/key.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/mac80211/key.h b/net/mac80211/key.h
index 5d48518985b3..f52c3df1fe9a 100644
--- a/net/mac80211/key.h
+++ b/net/mac80211/key.h
@@ -54,16 +54,19 @@ struct sta_info;
* @KEY_FLAG_TODO_DELETE: Key is marked for deletion and will, after an
* RCU grace period, no longer be reachable other than from the
* todo list.
- * @KEY_FLAG_TODO_HWACCEL: Key needs to be added to hardware acceleration.
+ * @KEY_FLAG_TODO_HWACCEL_ADD: Key needs to be added to hardware acceleration.
+ * @KEY_FLAG_TODO_HWACCEL_REMOVE: Key needs to be removed from hardware
+ * acceleration.
* @KEY_FLAG_TODO_DEFKEY: Key is default key and debugfs needs to be updated.
* @KEY_FLAG_TODO_ADD_DEBUGFS: Key needs to be added to debugfs.
*/
enum ieee80211_internal_key_flags {
KEY_FLAG_UPLOADED_TO_HARDWARE = BIT(0),
KEY_FLAG_TODO_DELETE = BIT(1),
- KEY_FLAG_TODO_HWACCEL = BIT(2),
- KEY_FLAG_TODO_DEFKEY = BIT(3),
- KEY_FLAG_TODO_ADD_DEBUGFS = BIT(4),
+ KEY_FLAG_TODO_HWACCEL_ADD = BIT(2),
+ KEY_FLAG_TODO_HWACCEL_REMOVE = BIT(3),
+ KEY_FLAG_TODO_DEFKEY = BIT(4),
+ KEY_FLAG_TODO_ADD_DEBUGFS = BIT(5),
};
struct ieee80211_key {