qcacmn: Allow FILS decap for (Re)Assoc frame

Allow FILS decap for (Re)Association request/response frame
by returning keyid as 0.

Change-Id: Icdf6d325eeccda36eeaf5a5635fcf9cf361d1028
CRs-Fixed: 2217523
This commit is contained in:
Subrat Mishra 2018-05-21 12:20:52 +05:30 • committed by nshrivas
commit 4493d2d605
2 changed files with 13 additions and 0 deletions

View file

@ -432,6 +432,7 @@ void wlan_crypto_fils_delkey(struct wlan_objmgr_peer *peer)
if (key) {
qdf_mem_free(key->private);
key->private = NULL;
key->valid = 0;
}
}
#else

View file

@ -3198,6 +3198,18 @@ uint16_t wlan_crypto_get_keyid(uint8_t *data, int hdrlen)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)data;
uint8_t *iv;
uint8_t stype = WLAN_FC0_GET_STYPE(hdr->frame_control[0]);
/*
* In FILS SK (Re)Association request/response frame has
* to be decrypted
*/
if ((stype == WLAN_FC0_STYPE_ASSOC_REQ) ||
(stype == WLAN_FC0_STYPE_REASSOC_REQ) ||
(stype == WLAN_FC0_STYPE_ASSOC_RESP) ||
(stype == WLAN_FC0_STYPE_REASSOC_RESP)) {
return 0;
}
if (hdr->frame_control[1] & WLAN_FC1_ISWEP) {
iv = data + hdrlen;