xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/mvl88w8977/mlan/esa/keyMgmtStaTypes.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /** @file keyMgmtstaType.h
2  *
3  *  @brief This file defines data types structrue for key managment.
4  *
5  * Copyright (C) 2014-2017, Marvell International Ltd.
6  *
7  * This software file (the "File") is distributed by Marvell International
8  * Ltd. under the terms of the GNU General Public License Version 2, June 1991
9  * (the "License").  You may use, redistribute and/or modify this File in
10  * accordance with the terms and conditions of the License, a copy of which
11  * is available by writing to the Free Software Foundation, Inc.,
12  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
13  * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
14  *
15  * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
17  * ARE EXPRESSLY DISCLAIMED.  The License provides additional details about
18  * this warranty disclaimer.
19  */
20 
21 /******************************************************
22 Change log:
23     03/07/2014: Initial version
24 ******************************************************/
25 #ifndef _KEYMGMTSTATYPES_H_
26 #define _KEYMGMTSTATYPES_H_
27 
28 #define WPA_AES_KEY_LEN     16
29 #define WPA_TKIP_KEY_LEN    32
30 #define WPA_WEP104_KEY_LEN  13
31 #define WPA_WEP40_KEY_LEN   5
32 
33 #define KEY_TYPE_WEP  0
34 #define KEY_TYPE_TKIP 1
35 #define KEY_TYPE_AES  2
36 #define KEY_TYPE_WAPI 3
37 #define KEY_TYPE_AES_CMAC	4
38 
39 /* This struct definition is used in ROM and should be kept intact */
40 typedef struct {
41 	UINT8 wep40:1;
42 	UINT8 wep104:1;
43 	UINT8 tkip:1;
44 	UINT8 ccmp:1;
45 
46 	UINT8 rsvd:4;
47 
48 } Cipher_t;
49 
50 /* This struct definition is used in ROM and should be kept intact */
51 typedef MLAN_PACK_START struct {
52 	UINT16 noRsn:1;
53 	UINT16 wepStatic:1;
54 	UINT16 wepDynamic:1;
55 	UINT16 wpa:1;
56 	UINT16 wpaNone:1;
57 	UINT16 wpa2:1;
58 	UINT16 cckm:1;
59 	UINT16 wapi:1;
60 	UINT16 rsvd:8;
61 
62 } MLAN_PACK_END SecurityMode_t;
63 
64 typedef MLAN_PACK_START enum {
65 	AKM_NONE = 0,
66 
67 	AKM_1X = 1,
68 	AKM_PSK = 2,
69 	AKM_FT_1X = 3,
70 	AKM_FT_PSK = 4,
71 	AKM_SHA256_1X = 5,
72 	AKM_SHA256_PSK = 6,
73 	AKM_TDLS = 7,
74 
75 	AKM_CCKM = 99,		/* Make CCKM a unique AKM enumeration */
76 
77 	AKM_WPA_MAX = 2,	/* Only AKM types 1 and 2 are expected for WPA */
78 	AKM_RSN_MAX = 6,	/* AKM types 1 to 6 are valid for RSN */
79 
80 	AKM_SUITE_MAX = 5	/* Used to size max parsing of AKMs from a BCN */
81 } MLAN_PACK_END AkmType_e;
82 
83 typedef AkmType_e AkmTypePacked_e;
84 
85 typedef struct {
86 	UINT8 akmOui[3];
87 	AkmTypePacked_e akmType;
88 
89 } AkmSuite_t;
90 
91 typedef struct {
92 	SecurityMode_t wpaType;
93 	Cipher_t mcstCipher;
94 	Cipher_t ucstCipher;
95 
96 } SecurityParams_t;
97 
98 typedef enum {
99 	host_PSK_SUPP_MIC_FAIL_TIMEOUT = 0x0001,
100 	host_PSK_SUPP_FOURWAY_HANDSHAKE_FAIL = 0x0002
101 } host_psk_suppMsg_e;
102 
103 typedef struct {
104 	UINT8 keyId[2];
105 	UINT8 IPN[6];
106 	UINT8 IGtk[32];
107 } IGtkKde_t;
108 
109 #endif
110