1 /** @file KeyMgmtApTypes.h 2 * 3 * @brief This file contains the key management type for ap 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 _KEYMGMTAPTYPES_H_ 26 #define _KEYMGMTAPTYPES_H_ 27 28 #include "wltypes.h" 29 #include "IEEE_types.h" 30 #include "keyMgmtStaTypes.h" 31 #include "keyMgmtApTypes_rom.h" 32 #include "keyCommonDef.h" 33 34 typedef enum { 35 STA_ASSO_EVT, 36 MSGRECVD_EVT, 37 KEYMGMTTIMEOUT_EVT, 38 GRPKEYTIMEOUT_EVT, 39 UPDATEKEYS_EVT 40 } keyMgmt_HskEvent_e; 41 42 /* Fields till keyMgmtState are being accessed in rom code and 43 * should be kept intact. Fields after keyMgmtState can be changed 44 * safely. 45 */ 46 typedef struct { 47 apKeyMgmtInfoStaRom_t rom; 48 UINT8 numHskTries; 49 UINT32 counterLo; 50 UINT32 counterHi; 51 UINT8 EAPOL_MIC_Key[EAPOL_MIC_KEY_SIZE]; 52 UINT8 EAPOL_Encr_Key[EAPOL_ENCR_KEY_SIZE]; 53 UINT8 EAPOLProtoVersion; 54 UINT8 rsvd[3]; 55 } apKeyMgmtInfoSta_t; 56 57 /* Convert an Ascii character to a hex nibble 58 e.g. Input is 'b' : Output will be 0xb 59 Input is 'E' : Output will be 0xE 60 Input is '8' : Output will be 0x8 61 Assumption is that input is a-f or A-F or 0-9 62 */ 63 #define ASCII2HEX(Asc) (((Asc) >= 'a') ? (Asc - 'a' + 0xA)\ 64 : ( (Asc) >= 'A' ? ( (Asc) - 'A' + 0xA ) : ((Asc) - '0') )) 65 66 #define ETH_P_EAPOL 0x8E88 67 68 #endif //_KEYMGMTAPTYPES_H_ 69