xref: /wlan-dirver/qca-wifi-host-cmn/target_if/crypto/inc/target_if_crypto.h (revision d0c05845839e5f2ba5a8dcebe0cd3e4cd4e8dfcf)
1 /*
2  * Copyright (c) 2019 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: declares crypto functions interfacing with the target
22  */
23 
24 #ifndef __TARGET_IF_CRYPTO_H__
25 #define __TARGET_IF_CRYPTO_H__
26 #include <wlan_lmac_if_def.h>
27 
28 /**
29  * target_if_crypto_register_tx_ops() - lmac handler to register
30  * crypto tx_ops callback functions
31  * @tx_ops: wlan_lmac_if_tx_ops object
32  *
33  * Return: QDF_STATUS
34  */
35 QDF_STATUS target_if_crypto_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
36 
37 /**
38  * target_if_crypto_set_key() - lmac handler to set key
39  * @vdev: VDEV object pointer
40  * @req: Key parameters that are required to install the key
41  * @key_type: Pairwise or Group Key type
42  *
43  * Return: QDF_STATUS
44  */
45 QDF_STATUS target_if_crypto_set_key(struct wlan_objmgr_vdev *vdev,
46 				    struct wlan_crypto_key *req,
47 				    enum wlan_crypto_key_type key_type);
48 
49 /**
50  * target_if_crypto_vdev_set_param() - Set crypto related vdev params to fw
51  * @psoc: Pointer to psoc
52  * @vdev_id: vdev id
53  * @param_id: param id
54  * @param_value: param value
55  *
56  * Return: QDF_STATUS
57  */
58 QDF_STATUS
59 target_if_crypto_vdev_set_param(struct wlan_objmgr_psoc *psoc, uint32_t vdev_id,
60 				uint32_t param_id, uint32_t param_value);
61 #endif
62