aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/wext.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/orinoco/wext.c')
-rw-r--r--drivers/net/wireless/orinoco/wext.c7
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 */
27static int orinoco_set_key(struct orinoco_private *priv, int index, 28static 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