mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Prepare non-zero IV for auth seq 3 frames
If the initialization vector is zero, some IOT APs unable to decrypt auth sequence 3 frame, which leads to disconnection. As IV is first 3 bytes of uninitialized "seed local variable", there are the changes of having IV value as 0. Hence host prepares non-zero initialization vector to encrypt auth sequence 3 frame. Change-Id: Ifc24ccc6c669bac3fc0389670580f6a9ec2672a0 CRs-Fixed: 2750718
This commit is contained in:
parent
60352aed62
commit
3edba3ed86
1 changed files with 7 additions and 0 deletions
|
|
@ -517,6 +517,13 @@ lim_encrypt_auth_frame(struct mac_context *mac, uint8_t keyId, uint8_t *pKey,
|
|||
SIR_MAC_AUTH_FRAME_INFO_LEN + SIR_MAC_CHALLENGE_ID_LEN;
|
||||
keyLength += 3;
|
||||
|
||||
/*
|
||||
* Make sure that IV is non-zero, because few IOT APs fails to decrypt
|
||||
* auth sequence 3 encrypted frames if initialization vector value is 0
|
||||
*/
|
||||
while (!(*(uint32_t *)seed))
|
||||
qdf_get_random_bytes(seed, SIR_MAC_WEP_IV_LENGTH);
|
||||
|
||||
/* Bytes 3-7 of seed is key */
|
||||
qdf_mem_copy((uint8_t *) &seed[3], pKey, keyLength - 3);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue