Include PTID in PV1 nonce construction for CCMP test vector
Includ the PTID in the PV1 nonce construction. Signed-off-by: Henry Ptasinski <henry@e78com.com>
This commit is contained in:
parent
232667eafe
commit
30771e6e05
1 changed files with 6 additions and 1 deletions
|
@ -91,7 +91,7 @@ static void ccmp_aad_nonce_pv1(const u8 *hdr, const u8 *a1, const u8 *a2,
|
|||
const u8 *a3, const u8 *pn,
|
||||
u8 *aad, size_t *aad_len, u8 *nonce)
|
||||
{
|
||||
u16 fc, type;
|
||||
u16 fc, type, ptid;
|
||||
u8 *pos;
|
||||
|
||||
nonce[0] = BIT(5); /* PV1 */
|
||||
|
@ -102,6 +102,11 @@ static void ccmp_aad_nonce_pv1(const u8 *hdr, const u8 *a1, const u8 *a2,
|
|||
|
||||
if (type == 1)
|
||||
nonce[0] |= 0x10; /* Management */
|
||||
else if ((type == 0) || (type == 3)) {
|
||||
/* QoS Data */
|
||||
ptid = (fc & (BIT(5) | BIT(6) | BIT(7))) >> 5;
|
||||
nonce[0] |= ptid;
|
||||
}
|
||||
|
||||
fc &= ~(BIT(10) | BIT(11) | BIT(13) | BIT(14) | BIT(15));
|
||||
fc |= BIT(12);
|
||||
|
|
Loading…
Reference in a new issue