aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wpa.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-07-06 16:02:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-08 11:11:24 -0400
commit0cd20a278e1ef9da9f6a987942794c9d65af8c4d (patch)
treeefd5aa9a72518f32518dcb4b85b78626cbc8113e /net/mac80211/wpa.c
parent544e5d8bcd7ab305494e57cfa388b2d06a43c520 (diff)
mac80211: use AES_BLOCK_SIZE
mac80211 has a defnition of AES_BLOCK_SIZE and multiple definitions of AES_BLOCK_LEN. Remove them all and use crypto/aes.h. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wpa.c')
-rw-r--r--net/mac80211/wpa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 3452d5e0a3cb..01684234b704 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -291,10 +291,10 @@ static void ccmp_special_blocks(struct sk_buff *skb, u8 *pn, u8 *scratch,
291 unsigned int hdrlen; 291 unsigned int hdrlen;
292 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; 292 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
293 293
294 memset(scratch, 0, 6 * AES_BLOCK_LEN); 294 memset(scratch, 0, 6 * AES_BLOCK_SIZE);
295 295
296 b_0 = scratch + 3 * AES_BLOCK_LEN; 296 b_0 = scratch + 3 * AES_BLOCK_SIZE;
297 aad = scratch + 4 * AES_BLOCK_LEN; 297 aad = scratch + 4 * AES_BLOCK_SIZE;
298 298
299 /* 299 /*
300 * Mask FC: zero subtype b4 b5 b6 (if not mgmt) 300 * Mask FC: zero subtype b4 b5 b6 (if not mgmt)
@@ -386,7 +386,7 @@ static int ccmp_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
386 u8 *pos; 386 u8 *pos;
387 u8 pn[6]; 387 u8 pn[6];
388 u64 pn64; 388 u64 pn64;
389 u8 scratch[6 * AES_BLOCK_LEN]; 389 u8 scratch[6 * AES_BLOCK_SIZE];
390 390
391 if (info->control.hw_key && 391 if (info->control.hw_key &&
392 !(info->control.hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV)) { 392 !(info->control.hw_key->flags & IEEE80211_KEY_FLAG_GENERATE_IV)) {
@@ -487,7 +487,7 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx)
487 } 487 }
488 488
489 if (!(status->flag & RX_FLAG_DECRYPTED)) { 489 if (!(status->flag & RX_FLAG_DECRYPTED)) {
490 u8 scratch[6 * AES_BLOCK_LEN]; 490 u8 scratch[6 * AES_BLOCK_SIZE];
491 /* hardware didn't decrypt/verify MIC */ 491 /* hardware didn't decrypt/verify MIC */
492 ccmp_special_blocks(skb, pn, scratch, 1); 492 ccmp_special_blocks(skb, pn, scratch, 1);
493 493