Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 166b1a35 authored by Sai Pavan Akhil Remella's avatar Sai Pavan Akhil Remella Committed by Madan Koyyalamudi
Browse files

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
parent 23455c17
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
/*
 * 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_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);