summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-08-19 14:51:44 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-08-20 14:03:18 +0200
commitd348f69f59af769c405c2f43a2d326d7123ef75a (patch)
treebbd28dc224d22f90e754fc9f6e192a9415b59538 /net/mac80211
parent8b3d1cc213f96bfffb5b7808d859b9ad26149e82 (diff)
downloadlinux-d348f69f59af769c405c2f43a2d326d7123ef75a.tar.gz
linux-d348f69f59af769c405c2f43a2d326d7123ef75a.tar.bz2
linux-d348f69f59af769c405c2f43a2d326d7123ef75a.zip
mac80211: simplify buffers in aes_128_cmac_vector
There's no need to use a single scratch buffer and calculate offsets into it, just use two separate buffers for the separate variables. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/aes_cmac.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/mac80211/aes_cmac.c b/net/mac80211/aes_cmac.c
index 8dfd70d8fcfb..a04752e91023 100644
--- a/net/mac80211/aes_cmac.c
+++ b/net/mac80211/aes_cmac.c
@@ -38,14 +38,10 @@ static void gf_mulx(u8 *pad)
static void aes_128_cmac_vector(struct crypto_cipher *tfm, size_t num_elem,
const u8 *addr[], const size_t *len, u8 *mac)
{
- u8 scratch[2 * AES_BLOCK_SIZE];
- u8 *cbc, *pad;
+ u8 cbc[AES_BLOCK_SIZE], pad[AES_BLOCK_SIZE];
const u8 *pos, *end;
size_t i, e, left, total_len;
- cbc = scratch;
- pad = scratch + AES_BLOCK_SIZE;
-
memset(cbc, 0, AES_BLOCK_SIZE);
total_len = 0;