diff options
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_crypt_ccmp.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c index b60e2a109ce4..ed968c01c7ff 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c @@ -133,7 +133,9 @@ static int ccmp_init_iv_and_aad(struct rtllib_hdr_4addr *hdr, pos = (u8 *) hdr; aad[0] = pos[0] & 0x8f; aad[1] = pos[1] & 0xc7; - memcpy(aad + 2, hdr->addr1, 3 * ETH_ALEN); + memcpy(&aad[2], &hdr->addr1, ETH_ALEN); + memcpy(&aad[8], &hdr->addr2, ETH_ALEN); + memcpy(&aad[14], &hdr->addr3, ETH_ALEN); pos = (u8 *) &hdr->seq_ctl; aad[20] = pos[0] & 0x0f; aad[21] = 0; /* all bits masked */ |