qcacmn: tgt_if changes for ctrl_ops modifications

tgt_if module changes due to umac-dp decoupling changes in
ctrl_ops APIs

Change-Id: I6c49c83472f497b2ba3dd7135500aeb4fff25336
This commit is contained in:
Pavankumar Nandeshwar
2019-09-30 18:45:00 +05:30
committed by nshrivas
parent 0ce3870654
commit 13aabf095c
2 changed files with 24 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019 The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -195,16 +195,14 @@ QDF_STATUS target_if_crypto_set_key(struct wlan_objmgr_vdev *vdev,
&req->keyval[0], &req->keyval[0],
req->keylen); req->keylen);
params.key_len = req->keylen; params.key_len = req->keylen;
if (peer) {
/* Set PN check & security type in data path */ /* Set PN check & security type in data path */
qdf_mem_copy(&pn[0], &params.key_rsc_ctr, sizeof(pn)); qdf_mem_copy(&pn[0], &params.key_rsc_ctr, sizeof(pn));
cdp_set_pn_check(soc, vdev->vdev_objmgr.vdev_id, req->macaddr, cdp_set_pn_check(soc, vdev->vdev_objmgr.vdev_id, req->macaddr,
sec_type, pn); sec_type, pn);
cdp_set_key(soc, peer, pairwise, (uint32_t *)(req->keyval + cdp_set_key(soc, vdev->vdev_objmgr.vdev_id, req->macaddr, pairwise,
WLAN_CRYPTO_IV_SIZE + WLAN_CRYPTO_MIC_LEN)); (uint32_t *)(req->keyval + WLAN_CRYPTO_IV_SIZE +
} else { WLAN_CRYPTO_MIC_LEN));
target_if_info("peer not found");
}
target_if_debug("vdev_id:%d, key: idx:%d,len:%d", params.vdev_id, target_if_debug("vdev_id:%d, key: idx:%d,len:%d", params.vdev_id,
params.key_idx, params.key_len); params.key_idx, params.key_len);

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019 The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -308,24 +308,27 @@ QDF_STATUS target_if_vdev_set_tx_rx_decap_type(struct wlan_objmgr_vdev *vdev,
uint32_t value) uint32_t value)
{ {
ol_txrx_soc_handle soc_txrx_handle; ol_txrx_soc_handle soc_txrx_handle;
struct cdp_vdev *vdev_txrx_handle;
struct wlan_objmgr_psoc *psoc; struct wlan_objmgr_psoc *psoc;
uint8_t vdev_id = wlan_vdev_get_id(vdev);
cdp_config_param_type val = {0};
psoc = wlan_vdev_get_psoc(vdev); psoc = wlan_vdev_get_psoc(vdev);
soc_txrx_handle = wlan_psoc_get_dp_handle(psoc); soc_txrx_handle = wlan_psoc_get_dp_handle(psoc);
vdev_txrx_handle = wlan_vdev_get_dp_handle(vdev);
if (!soc_txrx_handle || !vdev_txrx_handle) if (!soc_txrx_handle)
return QDF_STATUS_E_INVAL; return QDF_STATUS_E_INVAL;
if (param_id == WLAN_MLME_CFG_TX_ENCAP_TYPE) if (param_id == WLAN_MLME_CFG_TX_ENCAP_TYPE) {
cdp_set_tx_encap_type(soc_txrx_handle, val.cdp_vdev_param_tx_encap = value;
(struct cdp_vdev *)vdev_txrx_handle, return cdp_txrx_set_vdev_param(soc_txrx_handle,
value); vdev_id, CDP_TX_ENCAP_TYPE,
else if (param_id == WLAN_MLME_CFG_RX_DECAP_TYPE) val);
cdp_set_vdev_rx_decap_type(soc_txrx_handle, } else if (param_id == WLAN_MLME_CFG_RX_DECAP_TYPE) {
(struct cdp_vdev *)vdev_txrx_handle, val.cdp_vdev_param_rx_decap = value;
value); return cdp_txrx_set_vdev_param(soc_txrx_handle,
vdev_id, CDP_RX_DECAP_TYPE,
val);
}
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
} }