xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/mvl88w8977/mlan/esa/keyMgmtAp.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /** @file keyMgntAP.h
2  *
3  *  @brief This file contains the eapol paket process and key management for authenticator
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 _KEYMGMTAP_H_
26 #define _KEYMGMTAP_H_
27 //Authenticator related data structures, function prototypes
28 
29 #include "wltypes.h"
30 #include "keyMgmtAp_rom.h"
31 
32 #define STA_PS_EAPOL_HSK_TIMEOUT 3000	//ms
33 #define AP_RETRY_EAPOL_HSK_TIMEOUT 1000	//ms
34 
35 extern void KeyMgmtInit(void *priv);
36 extern void ReInitGTK(void *priv);
37 int isValidReplayCount(t_void *priv, apKeyMgmtInfoSta_t *pKeyMgmtInfo,
38 		       UINT8 *pRxReplayCount);
39 
40 extern void KeyMgmtGrpRekeyCountUpdate(t_void *context);
41 extern void KeyMgmtStartHskTimer(void *context);
42 extern void KeyMgmtStopHskTimer(void *context);
43 extern void KeyMgmtHskTimeout(t_void *context);
44 extern UINT32 keyApi_ApUpdateKeyMaterial(void *priv, cm_Connection *connPtr,
45 					 BOOLEAN updateGrpKey);
46 
47 extern Status_e ProcessPWKMsg2(hostsa_private *priv,
48 			       cm_Connection *connPtr, t_u8 *pbuf, t_u32 len);
49 extern Status_e ProcessPWKMsg4(hostsa_private *priv,
50 			       cm_Connection *connPtr, t_u8 *pbuf, t_u32 len);
51 extern Status_e ProcessGrpMsg2(hostsa_private *priv,
52 			       cm_Connection *connPtr, t_u8 *pbuf, t_u32 len);
53 extern Status_e GenerateApEapolMsg(hostsa_private *priv,
54 				   t_void *pconnPtr, keyMgmtState_e msgState);
55 extern void ApMicErrTimerExpCb(t_void *context);
56 extern void ApMicCounterMeasureInvoke(t_void *pconnPtr);
57 extern t_u16 keyMgmtAp_FormatWPARSN_IE(void *priv,
58 				       IEEEtypes_InfoElementHdr_t *pIe,
59 				       UINT8 isRsn,
60 				       Cipher_t *pCipher,
61 				       UINT8 cipherCount,
62 				       Cipher_t *pMcastCipher,
63 				       UINT16 authKey, UINT16 authKeyCount);
64 #endif //_KEYMGMTAP_H_
65