diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-07 00:48:31 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-07 00:48:31 -0400 |
commit | 0edd5b44913cd0aba6f23b626b407f70bb3fb018 (patch) | |
tree | dcb79cd9f99e7a20fef43af8e4029a4d8b7671a8 /net/ieee80211/ieee80211_crypt.c | |
parent | bbeec90b98a3066f6f2b8d41c80561f5665e4631 (diff) |
[wireless ieee80211,ipw2200] Lindent source code
No code changes, just Lindent + manual fixups.
This prepares us for updating to the latest Intel driver code, plus
gives the source code a nice facelift.
Diffstat (limited to 'net/ieee80211/ieee80211_crypt.c')
-rw-r--r-- | net/ieee80211/ieee80211_crypt.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/net/ieee80211/ieee80211_crypt.c b/net/ieee80211/ieee80211_crypt.c index 05a6f2f298db..61a9d92e455b 100644 --- a/net/ieee80211/ieee80211_crypt.c +++ b/net/ieee80211/ieee80211_crypt.c | |||
@@ -30,7 +30,6 @@ struct ieee80211_crypto_alg { | |||
30 | struct ieee80211_crypto_ops *ops; | 30 | struct ieee80211_crypto_ops *ops; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | |||
34 | struct ieee80211_crypto { | 33 | struct ieee80211_crypto { |
35 | struct list_head algs; | 34 | struct list_head algs; |
36 | spinlock_t lock; | 35 | spinlock_t lock; |
@@ -38,8 +37,7 @@ struct ieee80211_crypto { | |||
38 | 37 | ||
39 | static struct ieee80211_crypto *hcrypt; | 38 | static struct ieee80211_crypto *hcrypt; |
40 | 39 | ||
41 | void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, | 40 | void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee, int force) |
42 | int force) | ||
43 | { | 41 | { |
44 | struct list_head *ptr, *n; | 42 | struct list_head *ptr, *n; |
45 | struct ieee80211_crypt_data *entry; | 43 | struct ieee80211_crypt_data *entry; |
@@ -140,7 +138,7 @@ int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops) | |||
140 | spin_lock_irqsave(&hcrypt->lock, flags); | 138 | spin_lock_irqsave(&hcrypt->lock, flags); |
141 | for (ptr = hcrypt->algs.next; ptr != &hcrypt->algs; ptr = ptr->next) { | 139 | for (ptr = hcrypt->algs.next; ptr != &hcrypt->algs; ptr = ptr->next) { |
142 | struct ieee80211_crypto_alg *alg = | 140 | struct ieee80211_crypto_alg *alg = |
143 | (struct ieee80211_crypto_alg *) ptr; | 141 | (struct ieee80211_crypto_alg *)ptr; |
144 | if (alg->ops == ops) { | 142 | if (alg->ops == ops) { |
145 | list_del(&alg->list); | 143 | list_del(&alg->list); |
146 | del_alg = alg; | 144 | del_alg = alg; |
@@ -158,8 +156,7 @@ int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops) | |||
158 | return del_alg ? 0 : -1; | 156 | return del_alg ? 0 : -1; |
159 | } | 157 | } |
160 | 158 | ||
161 | 159 | struct ieee80211_crypto_ops *ieee80211_get_crypto_ops(const char *name) | |
162 | struct ieee80211_crypto_ops * ieee80211_get_crypto_ops(const char *name) | ||
163 | { | 160 | { |
164 | unsigned long flags; | 161 | unsigned long flags; |
165 | struct list_head *ptr; | 162 | struct list_head *ptr; |
@@ -171,7 +168,7 @@ struct ieee80211_crypto_ops * ieee80211_get_crypto_ops(const char *name) | |||
171 | spin_lock_irqsave(&hcrypt->lock, flags); | 168 | spin_lock_irqsave(&hcrypt->lock, flags); |
172 | for (ptr = hcrypt->algs.next; ptr != &hcrypt->algs; ptr = ptr->next) { | 169 | for (ptr = hcrypt->algs.next; ptr != &hcrypt->algs; ptr = ptr->next) { |
173 | struct ieee80211_crypto_alg *alg = | 170 | struct ieee80211_crypto_alg *alg = |
174 | (struct ieee80211_crypto_alg *) ptr; | 171 | (struct ieee80211_crypto_alg *)ptr; |
175 | if (strcmp(alg->ops->name, name) == 0) { | 172 | if (strcmp(alg->ops->name, name) == 0) { |
176 | found_alg = alg; | 173 | found_alg = alg; |
177 | break; | 174 | break; |
@@ -185,9 +182,13 @@ struct ieee80211_crypto_ops * ieee80211_get_crypto_ops(const char *name) | |||
185 | return NULL; | 182 | return NULL; |
186 | } | 183 | } |
187 | 184 | ||
188 | 185 | static void *ieee80211_crypt_null_init(int keyidx) | |
189 | static void * ieee80211_crypt_null_init(int keyidx) { return (void *) 1; } | 186 | { |
190 | static void ieee80211_crypt_null_deinit(void *priv) {} | 187 | return (void *)1; |
188 | } | ||
189 | static void ieee80211_crypt_null_deinit(void *priv) | ||
190 | { | ||
191 | } | ||
191 | 192 | ||
192 | static struct ieee80211_crypto_ops ieee80211_crypt_null = { | 193 | static struct ieee80211_crypto_ops ieee80211_crypt_null = { |
193 | .name = "NULL", | 194 | .name = "NULL", |
@@ -204,7 +205,6 @@ static struct ieee80211_crypto_ops ieee80211_crypt_null = { | |||
204 | .owner = THIS_MODULE, | 205 | .owner = THIS_MODULE, |
205 | }; | 206 | }; |
206 | 207 | ||
207 | |||
208 | static int __init ieee80211_crypto_init(void) | 208 | static int __init ieee80211_crypto_init(void) |
209 | { | 209 | { |
210 | int ret = -ENOMEM; | 210 | int ret = -ENOMEM; |
@@ -222,11 +222,10 @@ static int __init ieee80211_crypto_init(void) | |||
222 | kfree(hcrypt); | 222 | kfree(hcrypt); |
223 | hcrypt = NULL; | 223 | hcrypt = NULL; |
224 | } | 224 | } |
225 | out: | 225 | out: |
226 | return ret; | 226 | return ret; |
227 | } | 227 | } |
228 | 228 | ||
229 | |||
230 | static void __exit ieee80211_crypto_deinit(void) | 229 | static void __exit ieee80211_crypto_deinit(void) |
231 | { | 230 | { |
232 | struct list_head *ptr, *n; | 231 | struct list_head *ptr, *n; |
@@ -237,7 +236,7 @@ static void __exit ieee80211_crypto_deinit(void) | |||
237 | for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs; | 236 | for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs; |
238 | ptr = n, n = ptr->next) { | 237 | ptr = n, n = ptr->next) { |
239 | struct ieee80211_crypto_alg *alg = | 238 | struct ieee80211_crypto_alg *alg = |
240 | (struct ieee80211_crypto_alg *) ptr; | 239 | (struct ieee80211_crypto_alg *)ptr; |
241 | list_del(ptr); | 240 | list_del(ptr); |
242 | printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm " | 241 | printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm " |
243 | "'%s' (deinit)\n", alg->ops->name); | 242 | "'%s' (deinit)\n", alg->ops->name); |