xref: /wlan-driver/qca-wifi-host-cmn/wmi/inc/wmi_unified_crypto_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022-2023 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  * This file contains the API definitions for the Unified Wireless Module
22  * Interface (WMI) specific to crypto component.
23  */
24 
25 #ifndef _WMI_UNIFIED_CRYPTO_API_H_
26 #define _WMI_UNIFIED_CRYPTO_API_H_
27 
28 /*
29  * WMI_ADD_CIPHER_KEY_CMDID
30  */
31 typedef enum {
32 	PAIRWISE_USAGE      = 0x00,
33 	GROUP_USAGE         = 0x01,
34 	TX_USAGE            = 0x02, /* default Tx Key - Static WEP only */
35 	PMK_USAGE           = 0x04, /* PMK cache */
36 } KEY_USAGE;
37 
38 /**
39  * wmi_extract_install_key_comp_event() - extract params of install key complete
40  *                                        from event
41  * @wmi_handle: wmi handle
42  * @evt_buf: pointer to event buffer
43  * @len: length of the event buffer
44  * @param: Pointer to hold params of install key complete
45  *
46  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
47  */
48 QDF_STATUS
49 wmi_extract_install_key_comp_event(wmi_unified_t wmi_handle,
50 				   void *evt_buf, uint32_t len,
51 				   struct wmi_install_key_comp_event *param);
52 
53 /**
54  * wmi_send_vdev_set_ltf_key_seed_cmd  - Set LTF key seed for PASN key
55  * derivation.
56  * @wmi: WMI handle
57  * @data: LTF Keyseed data
58  *
59  * Return: QDF_STATUS
60  */
61 QDF_STATUS
62 wmi_send_vdev_set_ltf_key_seed_cmd(wmi_unified_t wmi,
63 				   struct wlan_crypto_ltf_keyseed_data *data);
64 #endif
65 
66