diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/orinoco/wext.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/orinoco/wext.c')
-rw-r--r-- | drivers/net/wireless/orinoco/wext.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c index 7698fdd6a3a2..fbcc6e1a2e1d 100644 --- a/drivers/net/wireless/orinoco/wext.c +++ b/drivers/net/wireless/orinoco/wext.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * | 2 | * |
3 | * See copyright notice in main.c | 3 | * See copyright notice in main.c |
4 | */ | 4 | */ |
5 | #include <linux/slab.h> | ||
5 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
6 | #include <linux/if_arp.h> | 7 | #include <linux/if_arp.h> |
7 | #include <linux/wireless.h> | 8 | #include <linux/wireless.h> |
@@ -23,7 +24,7 @@ | |||
23 | #define MAX_RID_LEN 1024 | 24 | #define MAX_RID_LEN 1024 |
24 | 25 | ||
25 | /* Helper routine to record keys | 26 | /* Helper routine to record keys |
26 | * Do not call from interrupt context */ | 27 | * It is called under orinoco_lock so it may not sleep */ |
27 | static int orinoco_set_key(struct orinoco_private *priv, int index, | 28 | static int orinoco_set_key(struct orinoco_private *priv, int index, |
28 | enum orinoco_alg alg, const u8 *key, int key_len, | 29 | enum orinoco_alg alg, const u8 *key, int key_len, |
29 | const u8 *seq, int seq_len) | 30 | const u8 *seq, int seq_len) |
@@ -32,14 +33,14 @@ static int orinoco_set_key(struct orinoco_private *priv, int index, | |||
32 | kzfree(priv->keys[index].seq); | 33 | kzfree(priv->keys[index].seq); |
33 | 34 | ||
34 | if (key_len) { | 35 | if (key_len) { |
35 | priv->keys[index].key = kzalloc(key_len, GFP_KERNEL); | 36 | priv->keys[index].key = kzalloc(key_len, GFP_ATOMIC); |
36 | if (!priv->keys[index].key) | 37 | if (!priv->keys[index].key) |
37 | goto nomem; | 38 | goto nomem; |
38 | } else | 39 | } else |
39 | priv->keys[index].key = NULL; | 40 | priv->keys[index].key = NULL; |
40 | 41 | ||
41 | if (seq_len) { | 42 | if (seq_len) { |
42 | priv->keys[index].seq = kzalloc(seq_len, GFP_KERNEL); | 43 | priv->keys[index].seq = kzalloc(seq_len, GFP_ATOMIC); |
43 | if (!priv->keys[index].seq) | 44 | if (!priv->keys[index].seq) |
44 | goto free_key; | 45 | goto free_key; |
45 | } else | 46 | } else |