mac80211: simplify key locking
Since I recently made station management able to sleep, I can now rework key management as well; since it will no longer need a spinlock and can also use a mutex instead, a bunch of code to allow drivers' set_key to sleep while key management is protected by a spinlock can now be removed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
efe4c457a1
commit
ad0e2b5a00
@@ -38,25 +38,9 @@ struct sta_info;
|
||||
*
|
||||
* @KEY_FLAG_UPLOADED_TO_HARDWARE: Indicates that this key is present
|
||||
* in the hardware for TX crypto hardware acceleration.
|
||||
* @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_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.
|
||||
* @KEY_FLAG_TODO_DEFMGMTKEY: Key is default management key and debugfs needs
|
||||
* to be updated.
|
||||
*/
|
||||
enum ieee80211_internal_key_flags {
|
||||
KEY_FLAG_UPLOADED_TO_HARDWARE = BIT(0),
|
||||
KEY_FLAG_TODO_DELETE = BIT(1),
|
||||
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),
|
||||
KEY_FLAG_TODO_DEFMGMTKEY = BIT(6),
|
||||
};
|
||||
|
||||
enum ieee80211_internal_tkip_state {
|
||||
@@ -79,10 +63,8 @@ struct ieee80211_key {
|
||||
|
||||
/* for sdata list */
|
||||
struct list_head list;
|
||||
/* for todo list */
|
||||
struct list_head todo;
|
||||
|
||||
/* protected by todo lock! */
|
||||
/* protected by key mutex */
|
||||
unsigned int flags;
|
||||
|
||||
union {
|
||||
@@ -155,6 +137,4 @@ void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata);
|
||||
void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata);
|
||||
void ieee80211_disable_keys(struct ieee80211_sub_if_data *sdata);
|
||||
|
||||
void ieee80211_key_todo(void);
|
||||
|
||||
#endif /* IEEE80211_KEY_H */
|
||||
|
Reference in New Issue
Block a user