diff options
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 34 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_crypt_wep.c | 28 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 34 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | 26 | ||||
-rw-r--r-- | net/wireless/lib80211_crypt_tkip.c | 34 | ||||
-rw-r--r-- | net/wireless/lib80211_crypt_wep.c | 28 |
6 files changed, 89 insertions, 95 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c index 9f18be14dda6..f38f1f74fcd6 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c | |||
@@ -49,9 +49,9 @@ struct rtllib_tkip_data { | |||
49 | u32 dot11RSNAStatsTKIPLocalMICFailures; | 49 | u32 dot11RSNAStatsTKIPLocalMICFailures; |
50 | 50 | ||
51 | int key_idx; | 51 | int key_idx; |
52 | struct crypto_skcipher *rx_tfm_arc4; | 52 | struct crypto_sync_skcipher *rx_tfm_arc4; |
53 | struct crypto_shash *rx_tfm_michael; | 53 | struct crypto_shash *rx_tfm_michael; |
54 | struct crypto_skcipher *tx_tfm_arc4; | 54 | struct crypto_sync_skcipher *tx_tfm_arc4; |
55 | struct crypto_shash *tx_tfm_michael; | 55 | struct crypto_shash *tx_tfm_michael; |
56 | /* scratch buffers for virt_to_page() (crypto API) */ | 56 | /* scratch buffers for virt_to_page() (crypto API) */ |
57 | u8 rx_hdr[16]; | 57 | u8 rx_hdr[16]; |
@@ -66,8 +66,7 @@ static void *rtllib_tkip_init(int key_idx) | |||
66 | if (priv == NULL) | 66 | if (priv == NULL) |
67 | goto fail; | 67 | goto fail; |
68 | priv->key_idx = key_idx; | 68 | priv->key_idx = key_idx; |
69 | priv->tx_tfm_arc4 = crypto_alloc_skcipher("ecb(arc4)", 0, | 69 | priv->tx_tfm_arc4 = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
70 | CRYPTO_ALG_ASYNC); | ||
71 | if (IS_ERR(priv->tx_tfm_arc4)) { | 70 | if (IS_ERR(priv->tx_tfm_arc4)) { |
72 | pr_debug("Could not allocate crypto API arc4\n"); | 71 | pr_debug("Could not allocate crypto API arc4\n"); |
73 | priv->tx_tfm_arc4 = NULL; | 72 | priv->tx_tfm_arc4 = NULL; |
@@ -81,8 +80,7 @@ static void *rtllib_tkip_init(int key_idx) | |||
81 | goto fail; | 80 | goto fail; |
82 | } | 81 | } |
83 | 82 | ||
84 | priv->rx_tfm_arc4 = crypto_alloc_skcipher("ecb(arc4)", 0, | 83 | priv->rx_tfm_arc4 = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
85 | CRYPTO_ALG_ASYNC); | ||
86 | if (IS_ERR(priv->rx_tfm_arc4)) { | 84 | if (IS_ERR(priv->rx_tfm_arc4)) { |
87 | pr_debug("Could not allocate crypto API arc4\n"); | 85 | pr_debug("Could not allocate crypto API arc4\n"); |
88 | priv->rx_tfm_arc4 = NULL; | 86 | priv->rx_tfm_arc4 = NULL; |
@@ -100,9 +98,9 @@ static void *rtllib_tkip_init(int key_idx) | |||
100 | fail: | 98 | fail: |
101 | if (priv) { | 99 | if (priv) { |
102 | crypto_free_shash(priv->tx_tfm_michael); | 100 | crypto_free_shash(priv->tx_tfm_michael); |
103 | crypto_free_skcipher(priv->tx_tfm_arc4); | 101 | crypto_free_sync_skcipher(priv->tx_tfm_arc4); |
104 | crypto_free_shash(priv->rx_tfm_michael); | 102 | crypto_free_shash(priv->rx_tfm_michael); |
105 | crypto_free_skcipher(priv->rx_tfm_arc4); | 103 | crypto_free_sync_skcipher(priv->rx_tfm_arc4); |
106 | kfree(priv); | 104 | kfree(priv); |
107 | } | 105 | } |
108 | 106 | ||
@@ -116,9 +114,9 @@ static void rtllib_tkip_deinit(void *priv) | |||
116 | 114 | ||
117 | if (_priv) { | 115 | if (_priv) { |
118 | crypto_free_shash(_priv->tx_tfm_michael); | 116 | crypto_free_shash(_priv->tx_tfm_michael); |
119 | crypto_free_skcipher(_priv->tx_tfm_arc4); | 117 | crypto_free_sync_skcipher(_priv->tx_tfm_arc4); |
120 | crypto_free_shash(_priv->rx_tfm_michael); | 118 | crypto_free_shash(_priv->rx_tfm_michael); |
121 | crypto_free_skcipher(_priv->rx_tfm_arc4); | 119 | crypto_free_sync_skcipher(_priv->rx_tfm_arc4); |
122 | } | 120 | } |
123 | kfree(priv); | 121 | kfree(priv); |
124 | } | 122 | } |
@@ -337,7 +335,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
337 | *pos++ = (tkey->tx_iv32 >> 24) & 0xff; | 335 | *pos++ = (tkey->tx_iv32 >> 24) & 0xff; |
338 | 336 | ||
339 | if (!tcb_desc->bHwSec) { | 337 | if (!tcb_desc->bHwSec) { |
340 | SKCIPHER_REQUEST_ON_STACK(req, tkey->tx_tfm_arc4); | 338 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, tkey->tx_tfm_arc4); |
341 | 339 | ||
342 | icv = skb_put(skb, 4); | 340 | icv = skb_put(skb, 4); |
343 | crc = ~crc32_le(~0, pos, len); | 341 | crc = ~crc32_le(~0, pos, len); |
@@ -349,8 +347,8 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
349 | sg_init_one(&sg, pos, len+4); | 347 | sg_init_one(&sg, pos, len+4); |
350 | 348 | ||
351 | 349 | ||
352 | crypto_skcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16); | 350 | crypto_sync_skcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16); |
353 | skcipher_request_set_tfm(req, tkey->tx_tfm_arc4); | 351 | skcipher_request_set_sync_tfm(req, tkey->tx_tfm_arc4); |
354 | skcipher_request_set_callback(req, 0, NULL, NULL); | 352 | skcipher_request_set_callback(req, 0, NULL, NULL); |
355 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); | 353 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); |
356 | ret = crypto_skcipher_encrypt(req); | 354 | ret = crypto_skcipher_encrypt(req); |
@@ -420,7 +418,7 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
420 | pos += 8; | 418 | pos += 8; |
421 | 419 | ||
422 | if (!tcb_desc->bHwSec || (skb->cb[0] == 1)) { | 420 | if (!tcb_desc->bHwSec || (skb->cb[0] == 1)) { |
423 | SKCIPHER_REQUEST_ON_STACK(req, tkey->rx_tfm_arc4); | 421 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, tkey->rx_tfm_arc4); |
424 | 422 | ||
425 | if ((iv32 < tkey->rx_iv32 || | 423 | if ((iv32 < tkey->rx_iv32 || |
426 | (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) && | 424 | (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) && |
@@ -447,8 +445,8 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
447 | 445 | ||
448 | sg_init_one(&sg, pos, plen+4); | 446 | sg_init_one(&sg, pos, plen+4); |
449 | 447 | ||
450 | crypto_skcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16); | 448 | crypto_sync_skcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16); |
451 | skcipher_request_set_tfm(req, tkey->rx_tfm_arc4); | 449 | skcipher_request_set_sync_tfm(req, tkey->rx_tfm_arc4); |
452 | skcipher_request_set_callback(req, 0, NULL, NULL); | 450 | skcipher_request_set_callback(req, 0, NULL, NULL); |
453 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); | 451 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); |
454 | err = crypto_skcipher_decrypt(req); | 452 | err = crypto_skcipher_decrypt(req); |
@@ -664,9 +662,9 @@ static int rtllib_tkip_set_key(void *key, int len, u8 *seq, void *priv) | |||
664 | struct rtllib_tkip_data *tkey = priv; | 662 | struct rtllib_tkip_data *tkey = priv; |
665 | int keyidx; | 663 | int keyidx; |
666 | struct crypto_shash *tfm = tkey->tx_tfm_michael; | 664 | struct crypto_shash *tfm = tkey->tx_tfm_michael; |
667 | struct crypto_skcipher *tfm2 = tkey->tx_tfm_arc4; | 665 | struct crypto_sync_skcipher *tfm2 = tkey->tx_tfm_arc4; |
668 | struct crypto_shash *tfm3 = tkey->rx_tfm_michael; | 666 | struct crypto_shash *tfm3 = tkey->rx_tfm_michael; |
669 | struct crypto_skcipher *tfm4 = tkey->rx_tfm_arc4; | 667 | struct crypto_sync_skcipher *tfm4 = tkey->rx_tfm_arc4; |
670 | 668 | ||
671 | keyidx = tkey->key_idx; | 669 | keyidx = tkey->key_idx; |
672 | memset(tkey, 0, sizeof(*tkey)); | 670 | memset(tkey, 0, sizeof(*tkey)); |
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/rtl8192e/rtllib_crypt_wep.c index b3343a5d0fd6..d11ec39171d5 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c | |||
@@ -27,8 +27,8 @@ struct prism2_wep_data { | |||
27 | u8 key[WEP_KEY_LEN + 1]; | 27 | u8 key[WEP_KEY_LEN + 1]; |
28 | u8 key_len; | 28 | u8 key_len; |
29 | u8 key_idx; | 29 | u8 key_idx; |
30 | struct crypto_skcipher *tx_tfm; | 30 | struct crypto_sync_skcipher *tx_tfm; |
31 | struct crypto_skcipher *rx_tfm; | 31 | struct crypto_sync_skcipher *rx_tfm; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | 34 | ||
@@ -41,13 +41,13 @@ static void *prism2_wep_init(int keyidx) | |||
41 | goto fail; | 41 | goto fail; |
42 | priv->key_idx = keyidx; | 42 | priv->key_idx = keyidx; |
43 | 43 | ||
44 | priv->tx_tfm = crypto_alloc_skcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); | 44 | priv->tx_tfm = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
45 | if (IS_ERR(priv->tx_tfm)) { | 45 | if (IS_ERR(priv->tx_tfm)) { |
46 | pr_debug("rtllib_crypt_wep: could not allocate crypto API arc4\n"); | 46 | pr_debug("rtllib_crypt_wep: could not allocate crypto API arc4\n"); |
47 | priv->tx_tfm = NULL; | 47 | priv->tx_tfm = NULL; |
48 | goto fail; | 48 | goto fail; |
49 | } | 49 | } |
50 | priv->rx_tfm = crypto_alloc_skcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); | 50 | priv->rx_tfm = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
51 | if (IS_ERR(priv->rx_tfm)) { | 51 | if (IS_ERR(priv->rx_tfm)) { |
52 | pr_debug("rtllib_crypt_wep: could not allocate crypto API arc4\n"); | 52 | pr_debug("rtllib_crypt_wep: could not allocate crypto API arc4\n"); |
53 | priv->rx_tfm = NULL; | 53 | priv->rx_tfm = NULL; |
@@ -61,8 +61,8 @@ static void *prism2_wep_init(int keyidx) | |||
61 | 61 | ||
62 | fail: | 62 | fail: |
63 | if (priv) { | 63 | if (priv) { |
64 | crypto_free_skcipher(priv->tx_tfm); | 64 | crypto_free_sync_skcipher(priv->tx_tfm); |
65 | crypto_free_skcipher(priv->rx_tfm); | 65 | crypto_free_sync_skcipher(priv->rx_tfm); |
66 | kfree(priv); | 66 | kfree(priv); |
67 | } | 67 | } |
68 | return NULL; | 68 | return NULL; |
@@ -74,8 +74,8 @@ static void prism2_wep_deinit(void *priv) | |||
74 | struct prism2_wep_data *_priv = priv; | 74 | struct prism2_wep_data *_priv = priv; |
75 | 75 | ||
76 | if (_priv) { | 76 | if (_priv) { |
77 | crypto_free_skcipher(_priv->tx_tfm); | 77 | crypto_free_sync_skcipher(_priv->tx_tfm); |
78 | crypto_free_skcipher(_priv->rx_tfm); | 78 | crypto_free_sync_skcipher(_priv->rx_tfm); |
79 | } | 79 | } |
80 | kfree(priv); | 80 | kfree(priv); |
81 | } | 81 | } |
@@ -135,7 +135,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
135 | memcpy(key + 3, wep->key, wep->key_len); | 135 | memcpy(key + 3, wep->key, wep->key_len); |
136 | 136 | ||
137 | if (!tcb_desc->bHwSec) { | 137 | if (!tcb_desc->bHwSec) { |
138 | SKCIPHER_REQUEST_ON_STACK(req, wep->tx_tfm); | 138 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, wep->tx_tfm); |
139 | 139 | ||
140 | /* Append little-endian CRC32 and encrypt it to produce ICV */ | 140 | /* Append little-endian CRC32 and encrypt it to produce ICV */ |
141 | crc = ~crc32_le(~0, pos, len); | 141 | crc = ~crc32_le(~0, pos, len); |
@@ -146,8 +146,8 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
146 | icv[3] = crc >> 24; | 146 | icv[3] = crc >> 24; |
147 | 147 | ||
148 | sg_init_one(&sg, pos, len+4); | 148 | sg_init_one(&sg, pos, len+4); |
149 | crypto_skcipher_setkey(wep->tx_tfm, key, klen); | 149 | crypto_sync_skcipher_setkey(wep->tx_tfm, key, klen); |
150 | skcipher_request_set_tfm(req, wep->tx_tfm); | 150 | skcipher_request_set_sync_tfm(req, wep->tx_tfm); |
151 | skcipher_request_set_callback(req, 0, NULL, NULL); | 151 | skcipher_request_set_callback(req, 0, NULL, NULL); |
152 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); | 152 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); |
153 | err = crypto_skcipher_encrypt(req); | 153 | err = crypto_skcipher_encrypt(req); |
@@ -199,11 +199,11 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
199 | plen = skb->len - hdr_len - 8; | 199 | plen = skb->len - hdr_len - 8; |
200 | 200 | ||
201 | if (!tcb_desc->bHwSec) { | 201 | if (!tcb_desc->bHwSec) { |
202 | SKCIPHER_REQUEST_ON_STACK(req, wep->rx_tfm); | 202 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, wep->rx_tfm); |
203 | 203 | ||
204 | sg_init_one(&sg, pos, plen+4); | 204 | sg_init_one(&sg, pos, plen+4); |
205 | crypto_skcipher_setkey(wep->rx_tfm, key, klen); | 205 | crypto_sync_skcipher_setkey(wep->rx_tfm, key, klen); |
206 | skcipher_request_set_tfm(req, wep->rx_tfm); | 206 | skcipher_request_set_sync_tfm(req, wep->rx_tfm); |
207 | skcipher_request_set_callback(req, 0, NULL, NULL); | 207 | skcipher_request_set_callback(req, 0, NULL, NULL); |
208 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); | 208 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); |
209 | err = crypto_skcipher_decrypt(req); | 209 | err = crypto_skcipher_decrypt(req); |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c index 1088fa0aee0e..829fa4bd253c 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | |||
@@ -53,9 +53,9 @@ struct ieee80211_tkip_data { | |||
53 | 53 | ||
54 | int key_idx; | 54 | int key_idx; |
55 | 55 | ||
56 | struct crypto_skcipher *rx_tfm_arc4; | 56 | struct crypto_sync_skcipher *rx_tfm_arc4; |
57 | struct crypto_shash *rx_tfm_michael; | 57 | struct crypto_shash *rx_tfm_michael; |
58 | struct crypto_skcipher *tx_tfm_arc4; | 58 | struct crypto_sync_skcipher *tx_tfm_arc4; |
59 | struct crypto_shash *tx_tfm_michael; | 59 | struct crypto_shash *tx_tfm_michael; |
60 | 60 | ||
61 | /* scratch buffers for virt_to_page() (crypto API) */ | 61 | /* scratch buffers for virt_to_page() (crypto API) */ |
@@ -71,8 +71,7 @@ static void *ieee80211_tkip_init(int key_idx) | |||
71 | goto fail; | 71 | goto fail; |
72 | priv->key_idx = key_idx; | 72 | priv->key_idx = key_idx; |
73 | 73 | ||
74 | priv->tx_tfm_arc4 = crypto_alloc_skcipher("ecb(arc4)", 0, | 74 | priv->tx_tfm_arc4 = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
75 | CRYPTO_ALG_ASYNC); | ||
76 | if (IS_ERR(priv->tx_tfm_arc4)) { | 75 | if (IS_ERR(priv->tx_tfm_arc4)) { |
77 | printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate " | 76 | printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate " |
78 | "crypto API arc4\n"); | 77 | "crypto API arc4\n"); |
@@ -88,8 +87,7 @@ static void *ieee80211_tkip_init(int key_idx) | |||
88 | goto fail; | 87 | goto fail; |
89 | } | 88 | } |
90 | 89 | ||
91 | priv->rx_tfm_arc4 = crypto_alloc_skcipher("ecb(arc4)", 0, | 90 | priv->rx_tfm_arc4 = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
92 | CRYPTO_ALG_ASYNC); | ||
93 | if (IS_ERR(priv->rx_tfm_arc4)) { | 91 | if (IS_ERR(priv->rx_tfm_arc4)) { |
94 | printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate " | 92 | printk(KERN_DEBUG "ieee80211_crypt_tkip: could not allocate " |
95 | "crypto API arc4\n"); | 93 | "crypto API arc4\n"); |
@@ -110,9 +108,9 @@ static void *ieee80211_tkip_init(int key_idx) | |||
110 | fail: | 108 | fail: |
111 | if (priv) { | 109 | if (priv) { |
112 | crypto_free_shash(priv->tx_tfm_michael); | 110 | crypto_free_shash(priv->tx_tfm_michael); |
113 | crypto_free_skcipher(priv->tx_tfm_arc4); | 111 | crypto_free_sync_skcipher(priv->tx_tfm_arc4); |
114 | crypto_free_shash(priv->rx_tfm_michael); | 112 | crypto_free_shash(priv->rx_tfm_michael); |
115 | crypto_free_skcipher(priv->rx_tfm_arc4); | 113 | crypto_free_sync_skcipher(priv->rx_tfm_arc4); |
116 | kfree(priv); | 114 | kfree(priv); |
117 | } | 115 | } |
118 | 116 | ||
@@ -126,9 +124,9 @@ static void ieee80211_tkip_deinit(void *priv) | |||
126 | 124 | ||
127 | if (_priv) { | 125 | if (_priv) { |
128 | crypto_free_shash(_priv->tx_tfm_michael); | 126 | crypto_free_shash(_priv->tx_tfm_michael); |
129 | crypto_free_skcipher(_priv->tx_tfm_arc4); | 127 | crypto_free_sync_skcipher(_priv->tx_tfm_arc4); |
130 | crypto_free_shash(_priv->rx_tfm_michael); | 128 | crypto_free_shash(_priv->rx_tfm_michael); |
131 | crypto_free_skcipher(_priv->rx_tfm_arc4); | 129 | crypto_free_sync_skcipher(_priv->rx_tfm_arc4); |
132 | } | 130 | } |
133 | kfree(priv); | 131 | kfree(priv); |
134 | } | 132 | } |
@@ -340,7 +338,7 @@ static int ieee80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
340 | *pos++ = (tkey->tx_iv32 >> 24) & 0xff; | 338 | *pos++ = (tkey->tx_iv32 >> 24) & 0xff; |
341 | 339 | ||
342 | if (!tcb_desc->bHwSec) { | 340 | if (!tcb_desc->bHwSec) { |
343 | SKCIPHER_REQUEST_ON_STACK(req, tkey->tx_tfm_arc4); | 341 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, tkey->tx_tfm_arc4); |
344 | 342 | ||
345 | icv = skb_put(skb, 4); | 343 | icv = skb_put(skb, 4); |
346 | crc = ~crc32_le(~0, pos, len); | 344 | crc = ~crc32_le(~0, pos, len); |
@@ -348,9 +346,9 @@ static int ieee80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
348 | icv[1] = crc >> 8; | 346 | icv[1] = crc >> 8; |
349 | icv[2] = crc >> 16; | 347 | icv[2] = crc >> 16; |
350 | icv[3] = crc >> 24; | 348 | icv[3] = crc >> 24; |
351 | crypto_skcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16); | 349 | crypto_sync_skcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16); |
352 | sg_init_one(&sg, pos, len+4); | 350 | sg_init_one(&sg, pos, len+4); |
353 | skcipher_request_set_tfm(req, tkey->tx_tfm_arc4); | 351 | skcipher_request_set_sync_tfm(req, tkey->tx_tfm_arc4); |
354 | skcipher_request_set_callback(req, 0, NULL, NULL); | 352 | skcipher_request_set_callback(req, 0, NULL, NULL); |
355 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); | 353 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); |
356 | ret = crypto_skcipher_encrypt(req); | 354 | ret = crypto_skcipher_encrypt(req); |
@@ -418,7 +416,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
418 | pos += 8; | 416 | pos += 8; |
419 | 417 | ||
420 | if (!tcb_desc->bHwSec) { | 418 | if (!tcb_desc->bHwSec) { |
421 | SKCIPHER_REQUEST_ON_STACK(req, tkey->rx_tfm_arc4); | 419 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, tkey->rx_tfm_arc4); |
422 | 420 | ||
423 | if (iv32 < tkey->rx_iv32 || | 421 | if (iv32 < tkey->rx_iv32 || |
424 | (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) { | 422 | (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) { |
@@ -440,10 +438,10 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
440 | 438 | ||
441 | plen = skb->len - hdr_len - 12; | 439 | plen = skb->len - hdr_len - 12; |
442 | 440 | ||
443 | crypto_skcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16); | 441 | crypto_sync_skcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16); |
444 | sg_init_one(&sg, pos, plen+4); | 442 | sg_init_one(&sg, pos, plen+4); |
445 | 443 | ||
446 | skcipher_request_set_tfm(req, tkey->rx_tfm_arc4); | 444 | skcipher_request_set_sync_tfm(req, tkey->rx_tfm_arc4); |
447 | skcipher_request_set_callback(req, 0, NULL, NULL); | 445 | skcipher_request_set_callback(req, 0, NULL, NULL); |
448 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); | 446 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); |
449 | 447 | ||
@@ -663,9 +661,9 @@ static int ieee80211_tkip_set_key(void *key, int len, u8 *seq, void *priv) | |||
663 | struct ieee80211_tkip_data *tkey = priv; | 661 | struct ieee80211_tkip_data *tkey = priv; |
664 | int keyidx; | 662 | int keyidx; |
665 | struct crypto_shash *tfm = tkey->tx_tfm_michael; | 663 | struct crypto_shash *tfm = tkey->tx_tfm_michael; |
666 | struct crypto_skcipher *tfm2 = tkey->tx_tfm_arc4; | 664 | struct crypto_sync_skcipher *tfm2 = tkey->tx_tfm_arc4; |
667 | struct crypto_shash *tfm3 = tkey->rx_tfm_michael; | 665 | struct crypto_shash *tfm3 = tkey->rx_tfm_michael; |
668 | struct crypto_skcipher *tfm4 = tkey->rx_tfm_arc4; | 666 | struct crypto_sync_skcipher *tfm4 = tkey->rx_tfm_arc4; |
669 | 667 | ||
670 | keyidx = tkey->key_idx; | 668 | keyidx = tkey->key_idx; |
671 | memset(tkey, 0, sizeof(*tkey)); | 669 | memset(tkey, 0, sizeof(*tkey)); |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c index b9f86be9e52b..d4a1bf0caa7a 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_wep.c | |||
@@ -32,8 +32,8 @@ struct prism2_wep_data { | |||
32 | u8 key[WEP_KEY_LEN + 1]; | 32 | u8 key[WEP_KEY_LEN + 1]; |
33 | u8 key_len; | 33 | u8 key_len; |
34 | u8 key_idx; | 34 | u8 key_idx; |
35 | struct crypto_skcipher *tx_tfm; | 35 | struct crypto_sync_skcipher *tx_tfm; |
36 | struct crypto_skcipher *rx_tfm; | 36 | struct crypto_sync_skcipher *rx_tfm; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | 39 | ||
@@ -46,10 +46,10 @@ static void *prism2_wep_init(int keyidx) | |||
46 | return NULL; | 46 | return NULL; |
47 | priv->key_idx = keyidx; | 47 | priv->key_idx = keyidx; |
48 | 48 | ||
49 | priv->tx_tfm = crypto_alloc_skcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); | 49 | priv->tx_tfm = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
50 | if (IS_ERR(priv->tx_tfm)) | 50 | if (IS_ERR(priv->tx_tfm)) |
51 | goto free_priv; | 51 | goto free_priv; |
52 | priv->rx_tfm = crypto_alloc_skcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); | 52 | priv->rx_tfm = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
53 | if (IS_ERR(priv->rx_tfm)) | 53 | if (IS_ERR(priv->rx_tfm)) |
54 | goto free_tx; | 54 | goto free_tx; |
55 | 55 | ||
@@ -58,7 +58,7 @@ static void *prism2_wep_init(int keyidx) | |||
58 | 58 | ||
59 | return priv; | 59 | return priv; |
60 | free_tx: | 60 | free_tx: |
61 | crypto_free_skcipher(priv->tx_tfm); | 61 | crypto_free_sync_skcipher(priv->tx_tfm); |
62 | free_priv: | 62 | free_priv: |
63 | kfree(priv); | 63 | kfree(priv); |
64 | return NULL; | 64 | return NULL; |
@@ -70,8 +70,8 @@ static void prism2_wep_deinit(void *priv) | |||
70 | struct prism2_wep_data *_priv = priv; | 70 | struct prism2_wep_data *_priv = priv; |
71 | 71 | ||
72 | if (_priv) { | 72 | if (_priv) { |
73 | crypto_free_skcipher(_priv->tx_tfm); | 73 | crypto_free_sync_skcipher(_priv->tx_tfm); |
74 | crypto_free_skcipher(_priv->rx_tfm); | 74 | crypto_free_sync_skcipher(_priv->rx_tfm); |
75 | } | 75 | } |
76 | kfree(priv); | 76 | kfree(priv); |
77 | } | 77 | } |
@@ -128,7 +128,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
128 | memcpy(key + 3, wep->key, wep->key_len); | 128 | memcpy(key + 3, wep->key, wep->key_len); |
129 | 129 | ||
130 | if (!tcb_desc->bHwSec) { | 130 | if (!tcb_desc->bHwSec) { |
131 | SKCIPHER_REQUEST_ON_STACK(req, wep->tx_tfm); | 131 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, wep->tx_tfm); |
132 | 132 | ||
133 | /* Append little-endian CRC32 and encrypt it to produce ICV */ | 133 | /* Append little-endian CRC32 and encrypt it to produce ICV */ |
134 | crc = ~crc32_le(~0, pos, len); | 134 | crc = ~crc32_le(~0, pos, len); |
@@ -138,10 +138,10 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
138 | icv[2] = crc >> 16; | 138 | icv[2] = crc >> 16; |
139 | icv[3] = crc >> 24; | 139 | icv[3] = crc >> 24; |
140 | 140 | ||
141 | crypto_skcipher_setkey(wep->tx_tfm, key, klen); | 141 | crypto_sync_skcipher_setkey(wep->tx_tfm, key, klen); |
142 | sg_init_one(&sg, pos, len+4); | 142 | sg_init_one(&sg, pos, len+4); |
143 | 143 | ||
144 | skcipher_request_set_tfm(req, wep->tx_tfm); | 144 | skcipher_request_set_sync_tfm(req, wep->tx_tfm); |
145 | skcipher_request_set_callback(req, 0, NULL, NULL); | 145 | skcipher_request_set_callback(req, 0, NULL, NULL); |
146 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); | 146 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); |
147 | 147 | ||
@@ -193,12 +193,12 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
193 | plen = skb->len - hdr_len - 8; | 193 | plen = skb->len - hdr_len - 8; |
194 | 194 | ||
195 | if (!tcb_desc->bHwSec) { | 195 | if (!tcb_desc->bHwSec) { |
196 | SKCIPHER_REQUEST_ON_STACK(req, wep->rx_tfm); | 196 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, wep->rx_tfm); |
197 | 197 | ||
198 | crypto_skcipher_setkey(wep->rx_tfm, key, klen); | 198 | crypto_sync_skcipher_setkey(wep->rx_tfm, key, klen); |
199 | sg_init_one(&sg, pos, plen+4); | 199 | sg_init_one(&sg, pos, plen+4); |
200 | 200 | ||
201 | skcipher_request_set_tfm(req, wep->rx_tfm); | 201 | skcipher_request_set_sync_tfm(req, wep->rx_tfm); |
202 | skcipher_request_set_callback(req, 0, NULL, NULL); | 202 | skcipher_request_set_callback(req, 0, NULL, NULL); |
203 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); | 203 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); |
204 | 204 | ||
diff --git a/net/wireless/lib80211_crypt_tkip.c b/net/wireless/lib80211_crypt_tkip.c index e6bce1f130c9..346e19cbdf59 100644 --- a/net/wireless/lib80211_crypt_tkip.c +++ b/net/wireless/lib80211_crypt_tkip.c | |||
@@ -64,9 +64,9 @@ struct lib80211_tkip_data { | |||
64 | 64 | ||
65 | int key_idx; | 65 | int key_idx; |
66 | 66 | ||
67 | struct crypto_skcipher *rx_tfm_arc4; | 67 | struct crypto_sync_skcipher *rx_tfm_arc4; |
68 | struct crypto_shash *rx_tfm_michael; | 68 | struct crypto_shash *rx_tfm_michael; |
69 | struct crypto_skcipher *tx_tfm_arc4; | 69 | struct crypto_sync_skcipher *tx_tfm_arc4; |
70 | struct crypto_shash *tx_tfm_michael; | 70 | struct crypto_shash *tx_tfm_michael; |
71 | 71 | ||
72 | /* scratch buffers for virt_to_page() (crypto API) */ | 72 | /* scratch buffers for virt_to_page() (crypto API) */ |
@@ -99,8 +99,7 @@ static void *lib80211_tkip_init(int key_idx) | |||
99 | 99 | ||
100 | priv->key_idx = key_idx; | 100 | priv->key_idx = key_idx; |
101 | 101 | ||
102 | priv->tx_tfm_arc4 = crypto_alloc_skcipher("ecb(arc4)", 0, | 102 | priv->tx_tfm_arc4 = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
103 | CRYPTO_ALG_ASYNC); | ||
104 | if (IS_ERR(priv->tx_tfm_arc4)) { | 103 | if (IS_ERR(priv->tx_tfm_arc4)) { |
105 | priv->tx_tfm_arc4 = NULL; | 104 | priv->tx_tfm_arc4 = NULL; |
106 | goto fail; | 105 | goto fail; |
@@ -112,8 +111,7 @@ static void *lib80211_tkip_init(int key_idx) | |||
112 | goto fail; | 111 | goto fail; |
113 | } | 112 | } |
114 | 113 | ||
115 | priv->rx_tfm_arc4 = crypto_alloc_skcipher("ecb(arc4)", 0, | 114 | priv->rx_tfm_arc4 = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
116 | CRYPTO_ALG_ASYNC); | ||
117 | if (IS_ERR(priv->rx_tfm_arc4)) { | 115 | if (IS_ERR(priv->rx_tfm_arc4)) { |
118 | priv->rx_tfm_arc4 = NULL; | 116 | priv->rx_tfm_arc4 = NULL; |
119 | goto fail; | 117 | goto fail; |
@@ -130,9 +128,9 @@ static void *lib80211_tkip_init(int key_idx) | |||
130 | fail: | 128 | fail: |
131 | if (priv) { | 129 | if (priv) { |
132 | crypto_free_shash(priv->tx_tfm_michael); | 130 | crypto_free_shash(priv->tx_tfm_michael); |
133 | crypto_free_skcipher(priv->tx_tfm_arc4); | 131 | crypto_free_sync_skcipher(priv->tx_tfm_arc4); |
134 | crypto_free_shash(priv->rx_tfm_michael); | 132 | crypto_free_shash(priv->rx_tfm_michael); |
135 | crypto_free_skcipher(priv->rx_tfm_arc4); | 133 | crypto_free_sync_skcipher(priv->rx_tfm_arc4); |
136 | kfree(priv); | 134 | kfree(priv); |
137 | } | 135 | } |
138 | 136 | ||
@@ -144,9 +142,9 @@ static void lib80211_tkip_deinit(void *priv) | |||
144 | struct lib80211_tkip_data *_priv = priv; | 142 | struct lib80211_tkip_data *_priv = priv; |
145 | if (_priv) { | 143 | if (_priv) { |
146 | crypto_free_shash(_priv->tx_tfm_michael); | 144 | crypto_free_shash(_priv->tx_tfm_michael); |
147 | crypto_free_skcipher(_priv->tx_tfm_arc4); | 145 | crypto_free_sync_skcipher(_priv->tx_tfm_arc4); |
148 | crypto_free_shash(_priv->rx_tfm_michael); | 146 | crypto_free_shash(_priv->rx_tfm_michael); |
149 | crypto_free_skcipher(_priv->rx_tfm_arc4); | 147 | crypto_free_sync_skcipher(_priv->rx_tfm_arc4); |
150 | } | 148 | } |
151 | kfree(priv); | 149 | kfree(priv); |
152 | } | 150 | } |
@@ -344,7 +342,7 @@ static int lib80211_tkip_hdr(struct sk_buff *skb, int hdr_len, | |||
344 | static int lib80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | 342 | static int lib80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) |
345 | { | 343 | { |
346 | struct lib80211_tkip_data *tkey = priv; | 344 | struct lib80211_tkip_data *tkey = priv; |
347 | SKCIPHER_REQUEST_ON_STACK(req, tkey->tx_tfm_arc4); | 345 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, tkey->tx_tfm_arc4); |
348 | int len; | 346 | int len; |
349 | u8 rc4key[16], *pos, *icv; | 347 | u8 rc4key[16], *pos, *icv; |
350 | u32 crc; | 348 | u32 crc; |
@@ -374,9 +372,9 @@ static int lib80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
374 | icv[2] = crc >> 16; | 372 | icv[2] = crc >> 16; |
375 | icv[3] = crc >> 24; | 373 | icv[3] = crc >> 24; |
376 | 374 | ||
377 | crypto_skcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16); | 375 | crypto_sync_skcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16); |
378 | sg_init_one(&sg, pos, len + 4); | 376 | sg_init_one(&sg, pos, len + 4); |
379 | skcipher_request_set_tfm(req, tkey->tx_tfm_arc4); | 377 | skcipher_request_set_sync_tfm(req, tkey->tx_tfm_arc4); |
380 | skcipher_request_set_callback(req, 0, NULL, NULL); | 378 | skcipher_request_set_callback(req, 0, NULL, NULL); |
381 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); | 379 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); |
382 | err = crypto_skcipher_encrypt(req); | 380 | err = crypto_skcipher_encrypt(req); |
@@ -400,7 +398,7 @@ static inline int tkip_replay_check(u32 iv32_n, u16 iv16_n, | |||
400 | static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | 398 | static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) |
401 | { | 399 | { |
402 | struct lib80211_tkip_data *tkey = priv; | 400 | struct lib80211_tkip_data *tkey = priv; |
403 | SKCIPHER_REQUEST_ON_STACK(req, tkey->rx_tfm_arc4); | 401 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, tkey->rx_tfm_arc4); |
404 | u8 rc4key[16]; | 402 | u8 rc4key[16]; |
405 | u8 keyidx, *pos; | 403 | u8 keyidx, *pos; |
406 | u32 iv32; | 404 | u32 iv32; |
@@ -463,9 +461,9 @@ static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
463 | 461 | ||
464 | plen = skb->len - hdr_len - 12; | 462 | plen = skb->len - hdr_len - 12; |
465 | 463 | ||
466 | crypto_skcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16); | 464 | crypto_sync_skcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16); |
467 | sg_init_one(&sg, pos, plen + 4); | 465 | sg_init_one(&sg, pos, plen + 4); |
468 | skcipher_request_set_tfm(req, tkey->rx_tfm_arc4); | 466 | skcipher_request_set_sync_tfm(req, tkey->rx_tfm_arc4); |
469 | skcipher_request_set_callback(req, 0, NULL, NULL); | 467 | skcipher_request_set_callback(req, 0, NULL, NULL); |
470 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); | 468 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); |
471 | err = crypto_skcipher_decrypt(req); | 469 | err = crypto_skcipher_decrypt(req); |
@@ -660,9 +658,9 @@ static int lib80211_tkip_set_key(void *key, int len, u8 * seq, void *priv) | |||
660 | struct lib80211_tkip_data *tkey = priv; | 658 | struct lib80211_tkip_data *tkey = priv; |
661 | int keyidx; | 659 | int keyidx; |
662 | struct crypto_shash *tfm = tkey->tx_tfm_michael; | 660 | struct crypto_shash *tfm = tkey->tx_tfm_michael; |
663 | struct crypto_skcipher *tfm2 = tkey->tx_tfm_arc4; | 661 | struct crypto_sync_skcipher *tfm2 = tkey->tx_tfm_arc4; |
664 | struct crypto_shash *tfm3 = tkey->rx_tfm_michael; | 662 | struct crypto_shash *tfm3 = tkey->rx_tfm_michael; |
665 | struct crypto_skcipher *tfm4 = tkey->rx_tfm_arc4; | 663 | struct crypto_sync_skcipher *tfm4 = tkey->rx_tfm_arc4; |
666 | 664 | ||
667 | keyidx = tkey->key_idx; | 665 | keyidx = tkey->key_idx; |
668 | memset(tkey, 0, sizeof(*tkey)); | 666 | memset(tkey, 0, sizeof(*tkey)); |
diff --git a/net/wireless/lib80211_crypt_wep.c b/net/wireless/lib80211_crypt_wep.c index d05f58b0fd04..bdadee497f57 100644 --- a/net/wireless/lib80211_crypt_wep.c +++ b/net/wireless/lib80211_crypt_wep.c | |||
@@ -35,8 +35,8 @@ struct lib80211_wep_data { | |||
35 | u8 key[WEP_KEY_LEN + 1]; | 35 | u8 key[WEP_KEY_LEN + 1]; |
36 | u8 key_len; | 36 | u8 key_len; |
37 | u8 key_idx; | 37 | u8 key_idx; |
38 | struct crypto_skcipher *tx_tfm; | 38 | struct crypto_sync_skcipher *tx_tfm; |
39 | struct crypto_skcipher *rx_tfm; | 39 | struct crypto_sync_skcipher *rx_tfm; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | static void *lib80211_wep_init(int keyidx) | 42 | static void *lib80211_wep_init(int keyidx) |
@@ -48,13 +48,13 @@ static void *lib80211_wep_init(int keyidx) | |||
48 | goto fail; | 48 | goto fail; |
49 | priv->key_idx = keyidx; | 49 | priv->key_idx = keyidx; |
50 | 50 | ||
51 | priv->tx_tfm = crypto_alloc_skcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); | 51 | priv->tx_tfm = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
52 | if (IS_ERR(priv->tx_tfm)) { | 52 | if (IS_ERR(priv->tx_tfm)) { |
53 | priv->tx_tfm = NULL; | 53 | priv->tx_tfm = NULL; |
54 | goto fail; | 54 | goto fail; |
55 | } | 55 | } |
56 | 56 | ||
57 | priv->rx_tfm = crypto_alloc_skcipher("ecb(arc4)", 0, CRYPTO_ALG_ASYNC); | 57 | priv->rx_tfm = crypto_alloc_sync_skcipher("ecb(arc4)", 0, 0); |
58 | if (IS_ERR(priv->rx_tfm)) { | 58 | if (IS_ERR(priv->rx_tfm)) { |
59 | priv->rx_tfm = NULL; | 59 | priv->rx_tfm = NULL; |
60 | goto fail; | 60 | goto fail; |
@@ -66,8 +66,8 @@ static void *lib80211_wep_init(int keyidx) | |||
66 | 66 | ||
67 | fail: | 67 | fail: |
68 | if (priv) { | 68 | if (priv) { |
69 | crypto_free_skcipher(priv->tx_tfm); | 69 | crypto_free_sync_skcipher(priv->tx_tfm); |
70 | crypto_free_skcipher(priv->rx_tfm); | 70 | crypto_free_sync_skcipher(priv->rx_tfm); |
71 | kfree(priv); | 71 | kfree(priv); |
72 | } | 72 | } |
73 | return NULL; | 73 | return NULL; |
@@ -77,8 +77,8 @@ static void lib80211_wep_deinit(void *priv) | |||
77 | { | 77 | { |
78 | struct lib80211_wep_data *_priv = priv; | 78 | struct lib80211_wep_data *_priv = priv; |
79 | if (_priv) { | 79 | if (_priv) { |
80 | crypto_free_skcipher(_priv->tx_tfm); | 80 | crypto_free_sync_skcipher(_priv->tx_tfm); |
81 | crypto_free_skcipher(_priv->rx_tfm); | 81 | crypto_free_sync_skcipher(_priv->rx_tfm); |
82 | } | 82 | } |
83 | kfree(priv); | 83 | kfree(priv); |
84 | } | 84 | } |
@@ -129,7 +129,7 @@ static int lib80211_wep_build_iv(struct sk_buff *skb, int hdr_len, | |||
129 | static int lib80211_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | 129 | static int lib80211_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) |
130 | { | 130 | { |
131 | struct lib80211_wep_data *wep = priv; | 131 | struct lib80211_wep_data *wep = priv; |
132 | SKCIPHER_REQUEST_ON_STACK(req, wep->tx_tfm); | 132 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, wep->tx_tfm); |
133 | u32 crc, klen, len; | 133 | u32 crc, klen, len; |
134 | u8 *pos, *icv; | 134 | u8 *pos, *icv; |
135 | struct scatterlist sg; | 135 | struct scatterlist sg; |
@@ -162,9 +162,9 @@ static int lib80211_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
162 | icv[2] = crc >> 16; | 162 | icv[2] = crc >> 16; |
163 | icv[3] = crc >> 24; | 163 | icv[3] = crc >> 24; |
164 | 164 | ||
165 | crypto_skcipher_setkey(wep->tx_tfm, key, klen); | 165 | crypto_sync_skcipher_setkey(wep->tx_tfm, key, klen); |
166 | sg_init_one(&sg, pos, len + 4); | 166 | sg_init_one(&sg, pos, len + 4); |
167 | skcipher_request_set_tfm(req, wep->tx_tfm); | 167 | skcipher_request_set_sync_tfm(req, wep->tx_tfm); |
168 | skcipher_request_set_callback(req, 0, NULL, NULL); | 168 | skcipher_request_set_callback(req, 0, NULL, NULL); |
169 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); | 169 | skcipher_request_set_crypt(req, &sg, &sg, len + 4, NULL); |
170 | err = crypto_skcipher_encrypt(req); | 170 | err = crypto_skcipher_encrypt(req); |
@@ -182,7 +182,7 @@ static int lib80211_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
182 | static int lib80211_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | 182 | static int lib80211_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) |
183 | { | 183 | { |
184 | struct lib80211_wep_data *wep = priv; | 184 | struct lib80211_wep_data *wep = priv; |
185 | SKCIPHER_REQUEST_ON_STACK(req, wep->rx_tfm); | 185 | SYNC_SKCIPHER_REQUEST_ON_STACK(req, wep->rx_tfm); |
186 | u32 crc, klen, plen; | 186 | u32 crc, klen, plen; |
187 | u8 key[WEP_KEY_LEN + 3]; | 187 | u8 key[WEP_KEY_LEN + 3]; |
188 | u8 keyidx, *pos, icv[4]; | 188 | u8 keyidx, *pos, icv[4]; |
@@ -208,9 +208,9 @@ static int lib80211_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) | |||
208 | /* Apply RC4 to data and compute CRC32 over decrypted data */ | 208 | /* Apply RC4 to data and compute CRC32 over decrypted data */ |
209 | plen = skb->len - hdr_len - 8; | 209 | plen = skb->len - hdr_len - 8; |
210 | 210 | ||
211 | crypto_skcipher_setkey(wep->rx_tfm, key, klen); | 211 | crypto_sync_skcipher_setkey(wep->rx_tfm, key, klen); |
212 | sg_init_one(&sg, pos, plen + 4); | 212 | sg_init_one(&sg, pos, plen + 4); |
213 | skcipher_request_set_tfm(req, wep->rx_tfm); | 213 | skcipher_request_set_sync_tfm(req, wep->rx_tfm); |
214 | skcipher_request_set_callback(req, 0, NULL, NULL); | 214 | skcipher_request_set_callback(req, 0, NULL, NULL); |
215 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); | 215 | skcipher_request_set_crypt(req, &sg, &sg, plen + 4, NULL); |
216 | err = crypto_skcipher_decrypt(req); | 216 | err = crypto_skcipher_decrypt(req); |