xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/mvl88w8977/mlan/esa/keyMgmtSta.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /** @file keyMgmtSta.h
2  *
3  *  @brief This file contains the defines for key management.
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 _KEY_MGMT_STA_H_
26 #define _KEY_MGMT_STA_H_
27 
28 #include "keyCommonDef.h"
29 #include "KeyApiStaDefs.h"
30 #include "IEEE_types.h"
31 #include "keyMgmtStaTypes.h"
32 #include "keyMgmtSta_rom.h"
33 
34 #ifdef BTAMP
35 #include "btamp_config.h"
36 #define BTAMP_SUPPLICATNT_SESSIONS  AMPHCI_MAX_PHYSICAL_LINK_SUPPORTED
37 #else
38 #define BTAMP_SUPPLICATNT_SESSIONS  0
39 #endif
40 
41 //longl test
42 #define MAX_SUPPLICANT_SESSIONS     (10)
43 
44 void keyMgmtControlledPortOpen(phostsa_private priv);
45 
46 extern BOOLEAN supplicantAkmIsWpaWpa2(phostsa_private priv, AkmSuite_t *pAkm);
47 extern BOOLEAN supplicantAkmIsWpaWpa2Psk(phostsa_private priv,
48 					 AkmSuite_t *pAkm);
49 extern BOOLEAN supplicantAkmUsesKdf(phostsa_private priv, AkmSuite_t *pAkm);
50 extern BOOLEAN supplicantGetPmkid(phostsa_private priv,
51 				  IEEEtypes_MacAddr_t *pBssid,
52 				  IEEEtypes_MacAddr_t *pSta, AkmSuite_t *pAkm,
53 				  UINT8 *pPMKID);
54 
55 extern void keyMgmtSetIGtk(phostsa_private priv,
56 			   keyMgmtInfoSta_t *pKeyMgmtInfoSta,
57 			   IGtkKde_t *pIGtkKde, UINT8 iGtkKdeLen);
58 
59 extern UINT8 *keyMgmtGetIGtk(phostsa_private priv);
60 
61 extern void keyMgmtSta_RomInit(void);
62 
63 #if 0
64 extern BufferDesc_t *GetTxEAPOLBuffer(struct cm_ConnectionInfo *connPtr,
65 				      EAPOL_KeyMsg_Tx_t **ppTxEapol,
66 				      BufferDesc_t * pBufDesc);
67 #endif
68 extern void allocSupplicantData(void *priv);
69 extern void freeSupplicantData(void *priv);
70 extern void supplicantInit(void *priv, supplicantData_t *suppData);
71 extern BOOLEAN keyMgmtProcessMsgExt(phostsa_private priv,
72 				    keyMgmtInfoSta_t *pKeyMgmtInfoSta,
73 				    EAPOL_KeyMsg_t *pKeyMsg);
74 
75 extern void ProcessKeyMgmtDataSta(phostsa_private priv, mlan_buffer *pmbuf,
76 				  IEEEtypes_MacAddr_t *sa,
77 				  IEEEtypes_MacAddr_t *da);
78 
79 #endif
80