qcacld-3.0: Send crypto keys to target after SSR
Currently, host driver receives the keys from the userspace and caches it in the VDEV object and then sends it to the target. But during SSR, driver destroys VDEV and hence keys are deleted. After SSR, driver need to send the keys again to the target as keys are destroyed from the target as well. But currently, keys are not available in the driver because keys are destroyed with VDEV deletion. So, to fix this, send crypto keys to target for SAP after SSR and clear the keys on SAP down. Change-Id: Icdfc93876ab79304b9dc96f9fce16553582a0d18 CRs-Fixed: 3663712
This commit is contained in:

committed by
Ravindra Konda

parent
37f1e796d3
commit
2d0bebc085
@@ -1788,11 +1788,13 @@ static void hdd_hostapd_set_sap_key(struct hdd_adapter *adapter)
|
||||
struct wlan_crypto_key *crypto_key;
|
||||
uint8_t key_index;
|
||||
|
||||
for (key_index = 0; key_index < WLAN_CRYPTO_MAXKEYIDX; ++key_index) {
|
||||
for (key_index = 0; key_index < WLAN_CRYPTO_TOTAL_KEYIDX; ++key_index) {
|
||||
crypto_key = wlan_crypto_get_key(adapter->deflink->vdev,
|
||||
key_index);
|
||||
if (!crypto_key)
|
||||
continue;
|
||||
|
||||
hdd_debug("key idx %d", key_index);
|
||||
ucfg_crypto_set_key_req(adapter->deflink->vdev, crypto_key,
|
||||
WLAN_CRYPTO_KEY_TYPE_GROUP);
|
||||
wma_update_set_key(adapter->deflink->vdev_id, false, key_index,
|
||||
|
@@ -250,6 +250,7 @@
|
||||
#include "cdp_txrx_mon.h"
|
||||
#include "os_if_ll_sap.h"
|
||||
#include "wlan_p2p_ucfg_api.h"
|
||||
#include "wlan_crypto_obj_mgr_i.h"
|
||||
|
||||
#ifdef MULTI_CLIENT_LL_SUPPORT
|
||||
#define WLAM_WLM_HOST_DRIVER_PORT_ID 0xFFFFFF
|
||||
@@ -9719,6 +9720,7 @@ static void hdd_stop_sap_go_adapter(struct hdd_adapter *adapter)
|
||||
struct wlan_hdd_link_info *link_info = adapter->deflink;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
uint8_t link_id;
|
||||
|
||||
mode = adapter->device_mode;
|
||||
ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(link_info);
|
||||
@@ -9790,6 +9792,13 @@ static void hdd_stop_sap_go_adapter(struct hdd_adapter *adapter)
|
||||
clear_bit(SOFTAP_INIT_DONE, &link_info->link_flags);
|
||||
qdf_mem_free(ap_ctx->beacon);
|
||||
ap_ctx->beacon = NULL;
|
||||
|
||||
if (vdev) {
|
||||
link_id = wlan_vdev_get_link_id(vdev);
|
||||
ucfg_crypto_free_key_by_link_id(hdd_ctx->psoc,
|
||||
&link_info->link_addr,
|
||||
link_id);
|
||||
}
|
||||
}
|
||||
/* Clear all the cached sta info */
|
||||
hdd_clear_cached_sta_info(adapter);
|
||||
@@ -19725,6 +19734,9 @@ void hdd_component_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||
ucfg_fwol_psoc_close(psoc);
|
||||
ucfg_dlm_psoc_close(psoc);
|
||||
ucfg_mlme_psoc_close(psoc);
|
||||
|
||||
if (!cds_is_driver_recovering())
|
||||
ucfg_crypto_flush_entries(psoc);
|
||||
}
|
||||
|
||||
void hdd_component_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
|
Reference in New Issue
Block a user