xref: /wlan-dirver/qca-wifi-host-cmn/os_if/linux/crypto/inc/wlan_nl_to_crypto_params.h (revision 97f44cd39e4ff816eaa1710279d28cf6b9e65ad9)
1 /*
2  * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 /**
20  * DOC: wlan_nl_to_crypto_params.h
21  *
22  * Conversion of NL param type to Crypto param type APIs implementation
23  *
24  */
25 
26 /**
27  * osif_nl_to_crypto_auth_type() - populate auth type for crypto
28  * @auth_type: NL auth_type
29  *
30  * set the crypto auth type for corresponding auth type received
31  * from NL
32  *
33  * Return: crypto auth type
34  */
35 wlan_crypto_auth_mode
36 osif_nl_to_crypto_auth_type(enum nl80211_auth_type auth_type);
37 
38 /**
39  * osif_nl_to_crypto_akm_type() - populate akm type for crypto
40  * @akm_type: NL akm_type
41  *
42  * set the crypto akm type for corresponding akm type received
43  * from NL
44  *
45  * Return: crypto akm type
46  */
47 wlan_crypto_key_mgmt osif_nl_to_crypto_akm_type(u32 key_mgmt);
48 
49 /**
50  * osif_nl_to_crypto_cipher_type() - populate cipher type for crypto
51  * @cipher: NL cipher type
52  *
53  * set the crypto cipher type for corresponding cipher type received
54  * from NL.
55  *
56  * Return: crypto cipher type
57  */
58 enum wlan_crypto_cipher_type osif_nl_to_crypto_cipher_type(u32 cipher);
59 
60 /**
61  * osif_nl_to_crypto_cipher_len() - return the cipher length
62  * @cipher: NL cipher type
63  *
64  * Check the cipher type and return the corresponding length
65  *
66  * Return: crypto cipher length, negative value for failure
67  */
68 int osif_nl_to_crypto_cipher_len(u32 cipher);
69