|
@@ -1654,7 +1654,13 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle,
|
|
|
#endif
|
|
|
params.key_txmic_len = 0;
|
|
|
params.key_rxmic_len = 0;
|
|
|
-
|
|
|
+ params.key_rsc_counter = qdf_mem_malloc(sizeof(uint64_t));
|
|
|
+ if (!params.key_rsc_counter) {
|
|
|
+ WMA_LOGE(FL("can't allocate memory for key_rsc_counter"));
|
|
|
+ return QDF_STATUS_E_NOMEM;
|
|
|
+ }
|
|
|
+ qdf_mem_copy(params.key_rsc_counter,
|
|
|
+ &key_params->key_rsc[0], sizeof(uint64_t));
|
|
|
params.key_flags = 0;
|
|
|
if (key_params->unicast)
|
|
|
params.key_flags |= PAIRWISE_USAGE;
|
|
@@ -1736,7 +1742,8 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle,
|
|
|
/* TODO: MFP ? */
|
|
|
WMA_LOGE("%s:Invalid encryption type:%d", __func__,
|
|
|
key_params->key_type);
|
|
|
- return QDF_STATUS_E_NOMEM;
|
|
|
+ status = QDF_STATUS_E_NOMEM;
|
|
|
+ goto end;
|
|
|
}
|
|
|
|
|
|
#ifdef BIG_ENDIAN_HOST
|
|
@@ -1789,17 +1796,17 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle,
|
|
|
WMA_LOGD("unicast %d peer_mac %pM def_key_idx %d",
|
|
|
key_params->unicast, key_params->peer_mac,
|
|
|
key_params->def_key_idx);
|
|
|
+ WMA_LOGD("keyrsc param %llu", *(params.key_rsc_counter));
|
|
|
|
|
|
status = wmi_unified_setup_install_key_cmd(wma_handle->wmi_handle,
|
|
|
¶ms);
|
|
|
-
|
|
|
-
|
|
|
if (!key_params->unicast) {
|
|
|
/* Its GTK release the wake lock */
|
|
|
WMA_LOGD("Release set key wake lock");
|
|
|
wma_release_wakelock(&iface->vdev_set_key_wakelock);
|
|
|
}
|
|
|
-
|
|
|
+end:
|
|
|
+ qdf_mem_free(params.key_rsc_counter);
|
|
|
return status;
|
|
|
}
|
|
|
|
|
@@ -1891,6 +1898,9 @@ void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
|
|
|
key_params.key_idx = key_info->key[i].keyId;
|
|
|
|
|
|
key_params.key_len = key_info->key[i].keyLength;
|
|
|
+ qdf_mem_copy(key_params.key_rsc,
|
|
|
+ key_info->key[i].keyRsc,
|
|
|
+ SIR_MAC_MAX_KEY_RSC_LEN);
|
|
|
if (key_info->encType == eSIR_ED_TKIP) {
|
|
|
qdf_mem_copy(key_params.key_data,
|
|
|
key_info->key[i].key, 16);
|