mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
qcacld-3.0: Fix invalid bssid filled while deleting pmksa
In delete pmksa call for FILS case, the userspace sends only the ssid and cache id on the pmk cache. But the driver copies only the bssid which could cause invalid bssid being copied and the delete pmksa operation fails always. Fill pmksa ssid if SSID and cache id are provided, else copy the bssid. Change-Id: If18cfd86983c9fe9ae421295accf12bf1e8de148 CRs-Fixed: 3072262
This commit is contained in:
parent
23455c179e
commit
166b1a35fc
1 changed files with 10 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -22925,7 +22926,15 @@ static QDF_STATUS wlan_hdd_del_pmksa_cache(struct hdd_adapter *adapter,
|
|||
if (!vdev)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
qdf_copy_macaddr(&pmksa.bssid, &pmk_cache->BSSID);
|
||||
qdf_mem_zero(&pmksa, sizeof(pmksa));
|
||||
if (!pmk_cache->ssid_len) {
|
||||
qdf_copy_macaddr(&pmksa.bssid, &pmk_cache->BSSID);
|
||||
} else {
|
||||
qdf_mem_copy(pmksa.ssid, pmk_cache->ssid, pmk_cache->ssid_len);
|
||||
qdf_mem_copy(pmksa.cache_id, pmk_cache->cache_id,
|
||||
WLAN_CACHE_ID_LEN);
|
||||
pmksa.ssid_len = pmk_cache->ssid_len;
|
||||
}
|
||||
result = wlan_crypto_set_del_pmksa(vdev, &pmksa, false);
|
||||
hdd_objmgr_put_vdev(vdev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue