diff options
Diffstat (limited to 'drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c')
-rw-r--r-- | drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c index 58f3eeb2143..bba77141d9a 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_wep.c | |||
@@ -9,13 +9,15 @@ | |||
9 | * more details. | 9 | * more details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | //#include <linux/config.h> | 14 | //#include <linux/config.h> |
13 | #include <linux/module.h> | 15 | #include <linux/module.h> |
14 | #include <linux/init.h> | 16 | #include <linux/init.h> |
15 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
16 | #include <linux/random.h> | 18 | #include <linux/random.h> |
17 | #include <linux/skbuff.h> | 19 | #include <linux/skbuff.h> |
18 | #include <asm/string.h> | 20 | #include <linux/string.h> |
19 | 21 | ||
20 | #include "ieee80211.h" | 22 | #include "ieee80211.h" |
21 | 23 | ||
@@ -40,7 +42,7 @@ struct prism2_wep_data { | |||
40 | }; | 42 | }; |
41 | 43 | ||
42 | 44 | ||
43 | static void * prism2_wep_init(int keyidx) | 45 | static void *prism2_wep_init(int keyidx) |
44 | { | 46 | { |
45 | struct prism2_wep_data *priv; | 47 | struct prism2_wep_data *priv; |
46 | 48 | ||
@@ -50,15 +52,13 @@ static void * prism2_wep_init(int keyidx) | |||
50 | priv->key_idx = keyidx; | 52 | priv->key_idx = keyidx; |
51 | priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); | 53 | priv->tx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); |
52 | if (IS_ERR(priv->tx_tfm)) { | 54 | if (IS_ERR(priv->tx_tfm)) { |
53 | printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate " | 55 | pr_debug("could not allocate crypto API arc4\n"); |
54 | "crypto API arc4\n"); | ||
55 | priv->tx_tfm = NULL; | 56 | priv->tx_tfm = NULL; |
56 | goto fail; | 57 | goto fail; |
57 | } | 58 | } |
58 | priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); | 59 | priv->rx_tfm = crypto_alloc_blkcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); |
59 | if (IS_ERR(priv->rx_tfm)) { | 60 | if (IS_ERR(priv->rx_tfm)) { |
60 | printk(KERN_DEBUG "ieee80211_crypt_wep: could not allocate " | 61 | pr_debug("could not allocate crypto API arc4\n"); |
61 | "crypto API arc4\n"); | ||
62 | priv->rx_tfm = NULL; | 62 | priv->rx_tfm = NULL; |
63 | goto fail; | 63 | goto fail; |
64 | } | 64 | } |
@@ -217,7 +217,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
217 | memmove(skb->data + 4, skb->data, hdr_len); | 217 | memmove(skb->data + 4, skb->data, hdr_len); |
218 | skb_pull(skb, 4); | 218 | skb_pull(skb, 4); |
219 | skb_trim(skb, skb->len - 4); | 219 | skb_trim(skb, skb->len - 4); |
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |
222 | 222 | ||
223 | 223 | ||
@@ -248,7 +248,7 @@ static int prism2_wep_get_key(void *key, int len, u8 *seq, void *priv) | |||
248 | } | 248 | } |
249 | 249 | ||
250 | 250 | ||
251 | static char * prism2_wep_print_stats(char *p, void *priv) | 251 | static char *prism2_wep_print_stats(char *p, void *priv) |
252 | { | 252 | { |
253 | struct prism2_wep_data *wep = priv; | 253 | struct prism2_wep_data *wep = priv; |
254 | p += sprintf(p, "key[%d] alg=WEP len=%d\n", | 254 | p += sprintf(p, "key[%d] alg=WEP len=%d\n", |
@@ -289,5 +289,5 @@ void ieee80211_crypto_wep_exit(void) | |||
289 | void ieee80211_wep_null(void) | 289 | void ieee80211_wep_null(void) |
290 | { | 290 | { |
291 | // printk("============>%s()\n", __func__); | 291 | // printk("============>%s()\n", __func__); |
292 | return; | 292 | return; |
293 | } | 293 | } |