diff options
Diffstat (limited to 'net/ieee80211/ieee80211_crypt.c')
-rw-r--r-- | net/ieee80211/ieee80211_crypt.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ieee80211/ieee80211_crypt.c b/net/ieee80211/ieee80211_crypt.c index dc835f68edd3..0c366299db0f 100644 --- a/net/ieee80211/ieee80211_crypt.c +++ b/net/ieee80211/ieee80211_crypt.c | |||
@@ -41,7 +41,9 @@ void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force) | |||
41 | { | 41 | { |
42 | struct list_head *ptr, *n; | 42 | struct list_head *ptr, *n; |
43 | struct ieee80211_crypt_data *entry; | 43 | struct ieee80211_crypt_data *entry; |
44 | unsigned long flags; | ||
44 | 45 | ||
46 | spin_lock_irqsave(&ieee->lock, flags); | ||
45 | for (ptr = ieee->crypt_deinit_list.next, n = ptr->next; | 47 | for (ptr = ieee->crypt_deinit_list.next, n = ptr->next; |
46 | ptr != &ieee->crypt_deinit_list; ptr = n, n = ptr->next) { | 48 | ptr != &ieee->crypt_deinit_list; ptr = n, n = ptr->next) { |
47 | entry = list_entry(ptr, struct ieee80211_crypt_data, list); | 49 | entry = list_entry(ptr, struct ieee80211_crypt_data, list); |
@@ -57,14 +59,13 @@ void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force) | |||
57 | } | 59 | } |
58 | kfree(entry); | 60 | kfree(entry); |
59 | } | 61 | } |
62 | spin_unlock_irqrestore(&ieee->lock, flags); | ||
60 | } | 63 | } |
61 | 64 | ||
62 | void ieee80211_crypt_deinit_handler(unsigned long data) | 65 | void ieee80211_crypt_deinit_handler(unsigned long data) |
63 | { | 66 | { |
64 | struct ieee80211_device *ieee = (struct ieee80211_device *)data; | 67 | struct ieee80211_device *ieee = (struct ieee80211_device *)data; |
65 | unsigned long flags; | ||
66 | 68 | ||
67 | spin_lock_irqsave(&ieee->lock, flags); | ||
68 | ieee80211_crypt_deinit_entries(ieee, 0); | 69 | ieee80211_crypt_deinit_entries(ieee, 0); |
69 | if (!list_empty(&ieee->crypt_deinit_list)) { | 70 | if (!list_empty(&ieee->crypt_deinit_list)) { |
70 | printk(KERN_DEBUG "%s: entries remaining in delayed crypt " | 71 | printk(KERN_DEBUG "%s: entries remaining in delayed crypt " |
@@ -72,7 +73,6 @@ void ieee80211_crypt_deinit_handler(unsigned long data) | |||
72 | ieee->crypt_deinit_timer.expires = jiffies + HZ; | 73 | ieee->crypt_deinit_timer.expires = jiffies + HZ; |
73 | add_timer(&ieee->crypt_deinit_timer); | 74 | add_timer(&ieee->crypt_deinit_timer); |
74 | } | 75 | } |
75 | spin_unlock_irqrestore(&ieee->lock, flags); | ||
76 | 76 | ||
77 | } | 77 | } |
78 | 78 | ||
@@ -182,7 +182,8 @@ struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name) | |||
182 | return NULL; | 182 | return NULL; |
183 | } | 183 | } |
184 | 184 | ||
185 | static void *ieee80211_crypt_null_init(int keyidx) | 185 | static void *ieee80211_crypt_null_init(struct ieee80211_device *ieee, |
186 | int keyidx) | ||
186 | { | 187 | { |
187 | return (void *)1; | 188 | return (void *)1; |
188 | } | 189 | } |