xref: /wlan-driver/qca-wifi-host-cmn/umac/cmn_services/crypto/src/wlan_crypto_param_handling_i.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2017-2018, 2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 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  * DOC: Public APIs for crypto service
22  */
23 /* include files */
24 #ifndef __WLAN_CRYPTO_PARAM_HANDLING_I_H_
25 #define __WLAN_CRYPTO_PARAM_HANDLING_I_H_
26 /**
27  * wlan_crypto_set_authmode() - called by ucfg to configure authmode for vdev
28  * @crypto_params: crypto parameters
29  * @authmode: authmode
30  *
31  * This function gets called from ucfg to configure authmode for vdev.
32  *
33  * Return: QDF_STATUS_SUCCESS - in case of success
34  */
35 QDF_STATUS wlan_crypto_set_authmode(struct wlan_crypto_params *crypto_params,
36 					uint32_t authmode);
37 
38 /**
39  * wlan_crypto_get_authmode() - called by ucfg to get authmode of particular
40  *                              vdev
41  * @crypto_params: crypto parameters
42  *
43  * This function gets called from ucfg to get authmode of particular vdev
44  *
45  * Return: authmode
46  */
47 int32_t wlan_crypto_get_authmode(struct wlan_crypto_params *crypto_params);
48 
49 /**
50  * wlan_crypto_set_mcastcipher() - called by ucfg to configure mcastcipher in
51  *                                 vdev
52  * @crypto_params: crypto parameters
53  * @cipher: mcast cipher value.
54  *
55  * This function gets called from ucfg to configure mcastcipher in vdev
56  *
57  * Return: QDF_STATUS_SUCCESS - in case of success
58  */
59 QDF_STATUS wlan_crypto_set_mcastcipher(struct wlan_crypto_params *crypto_params,
60 					wlan_crypto_cipher_type cipher);
61 
62 /**
63  * wlan_crypto_get_mcastcipher() - called by ucfg to get mcastcipher from vdev
64  * @crypto_params: crypto parameters
65  *
66  * This function gets called from ucfg to get mcastcipher of particular vdev
67  *
68  * Return: mcast cipher
69  */
70 int32_t wlan_crypto_get_mcastcipher(struct wlan_crypto_params *crypto_params);
71 
72 /**
73  * wlan_crypto_set_ucastciphers() - called by ucfg to configure
74  *                                        unicast ciphers in vdev
75  * @crypto_params: crypto parameters
76  * @ciphers: bitmap value of all supported unicast ciphers
77  *
78  * This function gets called from ucfg to configure unicast ciphers in vdev
79  *
80  * Return: QDF_STATUS_SUCCESS - in case of success
81  */
82 QDF_STATUS wlan_crypto_set_ucastciphers(struct wlan_crypto_params *crypto_params,
83 						uint32_t ciphers);
84 
85 /**
86  * wlan_crypto_get_ucastciphers() - called by ucfg to get ucastcipher from vdev
87  * @crypto_params: crypto parameters
88  *
89  * This function gets called from ucfg to get supported unicast ciphers
90  *
91  * Return: bitmap value of all supported unicast ciphers
92  */
93 int32_t wlan_crypto_get_ucastciphers(struct wlan_crypto_params *crypto_params);
94 
95 /**
96  * wlan_crypto_set_mgmtcipher() - called by ucfg to configure
97  *                                        mgmt ciphers in vdev
98  * @crypto_params: crypto parameters
99  * @ciphers: bitmap value of all supported mgmt ciphers
100  *
101  * This function gets called from ucfg to configure mgmt ciphers in vdev
102  *
103  * Return: QDF_STATUS_SUCCESS - in case of success
104  */
105 QDF_STATUS wlan_crypto_set_mgmtcipher(struct wlan_crypto_params *crypto_params,
106 					uint32_t ciphers);
107 
108 /**
109  * wlan_crypto_get_mgmtciphers() - called by ucfg to get mgmtcipher from vdev
110  * @crypto_params: crypto parameters
111  *
112  * This function gets called from ucfg to get supported unicast ciphers
113  *
114  * Return: bitmap value of all supported unicast ciphers
115  */
116 int32_t wlan_crypto_get_mgmtciphers(struct wlan_crypto_params *crypto_params);
117 
118 /**
119  * wlan_crypto_set_cipher_cap() - called by ucfg to configure
120  *                                        cipher cap in vdev
121  * @crypto_params: crypto parameters
122  * @ciphers: bitmap value of all supported unicast ciphers
123  *
124  * This function gets called from ucfg to configure unicast ciphers in vdev
125  *
126  * Return: QDF_STATUS_SUCCESS - in case of success
127  */
128 QDF_STATUS wlan_crypto_set_cipher_cap(struct wlan_crypto_params *crypto_params,
129 					uint32_t ciphers);
130 
131 /**
132  * wlan_crypto_get_cipher_cap() - called by ucfg to get cipher caps from vdev
133  * @crypto_params: crypto parameters
134  *
135  * This function gets called from ucfg to get supported unicast ciphers
136  *
137  * Return: bitmap value of all supported unicast ciphers
138  */
139 int32_t wlan_crypto_get_cipher_cap(struct wlan_crypto_params *crypto_params);
140 
141 /**
142  * wlan_crypto_set_rsn_cap() - called by ucfg to configure
143  *                                        cipher cap in vdev
144  * @crypto_params: crypto parameters
145  * @ciphers: bitmap value of all supported unicast ciphers
146  *
147  * This function gets called from ucfg to configure unicast ciphers in vdev
148  *
149  * Return: QDF_STATUS_SUCCESS - in case of success
150  */
151 QDF_STATUS wlan_crypto_set_rsn_cap(struct wlan_crypto_params *crypto_params,
152 					uint32_t ciphers);
153 /**
154  * wlan_crypto_set_rsnx_cap() - called by ucfg to configure
155  *                                        RSNXE cap in vdev
156  * @crypto_params: crypto parameters
157  * @value: RSNXE Capabilities
158  *
159  * This function is used to configure RSNXE capabilities in vdev
160  *
161  * Return: QDF_STATUS_SUCCESS - in case of success
162  */
163 QDF_STATUS wlan_crypto_set_rsnx_cap(struct wlan_crypto_params *crypto_params,
164 				    uint32_t value);
165 
166 /**
167  * wlan_crypto_get_rsn_cap() - called by ucfg to get rsn caps from vdev
168  * @crypto_params: crypto parameters
169  *
170  * This function gets called from ucfg to get supported unicast ciphers
171  *
172  * Return: bitmap value of all supported unicast ciphers
173  */
174 int32_t wlan_crypto_get_rsn_cap(struct wlan_crypto_params *crypto_params);
175 
176 
177 /**
178  * wlan_crypto_set_key_mgmt() - called by ucfg to configure
179  *                                        key_mgmt in vdev
180  * @crypto_params: crypto parameters
181  * @ciphers: bitmap value of all supported unicast ciphers
182  *
183  * This function gets called from ucfg to configure unicast ciphers in vdev
184  *
185  * Return: QDF_STATUS_SUCCESS - in case of success
186  */
187 QDF_STATUS wlan_crypto_set_key_mgmt(struct wlan_crypto_params *crypto_params,
188 					uint32_t ciphers);
189 
190 /**
191  * wlan_crypto_get_key_mgmt() - called by ucfg to get key mgmt from vdev
192  * @crypto_params: crypto parameters
193  *
194  * This function gets called from ucfg to get supported unicast ciphers
195  *
196  * Return: bitmap value of all supported unicast ciphers
197  */
198 int32_t wlan_crypto_get_key_mgmt(struct wlan_crypto_params *crypto_params);
199 #endif /* __WLAN_CRYPTO_PARAM_HANDLING_I_H_ */
200