mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Send update pmk cmd only if set/del pmksa is successful
The WMI_PDEV_UPDATE_PMK_CACHE_CMDID command is sent even if the delete/set pmksa command fails due to same entry with same pmk already exists. This can cause invalid pmk entries to be updated in the Fw pmk table and also the host/fw pmksa table goes out of sync. To avoid this, send the WMI_PDEV_UPDATE_PMK_CACHE_CMDID command only if set pmksa/del pmksa is successful at crypto Change-Id: I080ebd9f6ca11bac216e6e8c62ef6060f0adef67 CRs-Fixed: 2937175
This commit is contained in:
parent
ee3eefe395
commit
f28d06bb69
1 changed files with 14 additions and 11 deletions
|
|
@ -22364,8 +22364,9 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy,
|
|||
TRACE_CODE_HDD_CFG80211_SET_PMKSA,
|
||||
adapter->vdev_id, result);
|
||||
|
||||
sme_set_del_pmkid_cache(hdd_ctx->psoc, adapter->vdev_id,
|
||||
pmk_cache, true);
|
||||
if (QDF_IS_STATUS_SUCCESS(result))
|
||||
sme_set_del_pmkid_cache(hdd_ctx->psoc, adapter->vdev_id,
|
||||
pmk_cache, true);
|
||||
|
||||
qdf_mem_zero(pmk_cache, sizeof(pmk_cache));
|
||||
|
||||
|
|
@ -22415,6 +22416,7 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy,
|
|||
{
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
|
||||
int status = 0;
|
||||
tPmkidCacheInfo *pmk_cache;
|
||||
|
||||
|
|
@ -22451,23 +22453,24 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy,
|
|||
|
||||
hdd_fill_pmksa_info(adapter, pmk_cache, pmksa, true);
|
||||
|
||||
/* clear single_pmk_info information */
|
||||
sme_clear_sae_single_pmk_info(hdd_ctx->psoc,adapter->vdev_id,
|
||||
pmk_cache);
|
||||
|
||||
/* Delete the PMKID CSR cache */
|
||||
if (QDF_STATUS_SUCCESS !=
|
||||
wlan_hdd_del_pmksa_cache(adapter, pmk_cache)) {
|
||||
qdf_status = wlan_hdd_del_pmksa_cache(adapter, pmk_cache);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
||||
if (!pmksa->bssid)
|
||||
hdd_err("Failed to delete PMKSA for null bssid");
|
||||
else
|
||||
hdd_err("Failed to delete PMKSA for " QDF_MAC_ADDR_FMT,
|
||||
QDF_MAC_ADDR_REF(pmksa->bssid));
|
||||
status = -EINVAL;
|
||||
}
|
||||
} else {
|
||||
/* clear single_pmk_info information */
|
||||
sme_clear_sae_single_pmk_info(hdd_ctx->psoc, adapter->vdev_id,
|
||||
pmk_cache);
|
||||
|
||||
sme_set_del_pmkid_cache(hdd_ctx->psoc, adapter->vdev_id, pmk_cache,
|
||||
false);
|
||||
/* Send the delete pmkid command to firmware */
|
||||
sme_set_del_pmkid_cache(hdd_ctx->psoc, adapter->vdev_id,
|
||||
pmk_cache, false);
|
||||
}
|
||||
|
||||
qdf_mem_zero(pmk_cache, sizeof(*pmk_cache));
|
||||
qdf_mem_free(pmk_cache);
|
||||
|
|
|
|||
Loading…
Reference in a new issue