xref: /wlan-dirver/qca-wifi-host-cmn/os_if/linux/crypto/inc/wlan_nl_to_crypto_params.h (revision 1397a33f48ea6455be40871470b286e535820eb8)
1 /*
2  * Copyright (c) 2019 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, negative value for failure
34  */
35 int osif_nl_to_crypto_auth_type(enum nl80211_auth_type auth_type);
36 
37 /**
38  * osif_nl_to_crypto_akm_type() - populate akm type for crypto
39  * @akm_type: NL akm_type
40  *
41  * set the crypto akm type for corresponding akm type received
42  * from NL
43  *
44  * Return: crypto akm type, negative value for failure
45  */
46 int osif_nl_to_crypto_akm_type(u32 key_mgmt);
47 
48 /**
49  * osif_nl_to_crypto_cipher_type() - populate cipher type for crypto
50  * @cipher: NL cipher type
51  *
52  * set the crypto cipher type for corresponding cipher type received
53  * from NL.
54  *
55  * Return: crypto cipher type
56  */
57 enum wlan_crypto_cipher_type osif_nl_to_crypto_cipher_type(u32 cipher);
58 
59 /**
60  * osif_nl_to_crypto_cipher_len() - return the cipher length
61  * @cipher: NL cipher type
62  *
63  * Check the cipher type and return the corresponding length
64  *
65  * Return: crypto cipher length, negative value for failure
66  */
67 int osif_nl_to_crypto_cipher_len(u32 cipher);
68