Commit d348f69f authored by Johannes Berg's avatar Johannes Berg

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: default avatarJohannes Berg <johannes.berg@intel.com>
parent 8b3d1cc2
...@@ -38,14 +38,10 @@ static void gf_mulx(u8 *pad) ...@@ -38,14 +38,10 @@ static void gf_mulx(u8 *pad)
static void aes_128_cmac_vector(struct crypto_cipher *tfm, size_t num_elem, static void aes_128_cmac_vector(struct crypto_cipher *tfm, size_t num_elem,
const u8 *addr[], const size_t *len, u8 *mac) const u8 *addr[], const size_t *len, u8 *mac)
{ {
u8 scratch[2 * AES_BLOCK_SIZE]; u8 cbc[AES_BLOCK_SIZE], pad[AES_BLOCK_SIZE];
u8 *cbc, *pad;
const u8 *pos, *end; const u8 *pos, *end;
size_t i, e, left, total_len; size_t i, e, left, total_len;
cbc = scratch;
pad = scratch + AES_BLOCK_SIZE;
memset(cbc, 0, AES_BLOCK_SIZE); memset(cbc, 0, AES_BLOCK_SIZE);
total_len = 0; total_len = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment