xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/mvl88w8977/mlan/esa/common/pmkCache.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /** @file pmkcache.h
2  *
3  *  @brief This file contains define for pmk cache
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 PMK_CACHE_H__
26 #define PMK_CACHE_H__
27 
28 #include "wltypes.h"
29 #include "IEEE_types.h"
30 #include "pmkCache_rom.h"
31 
32 /*!
33 ** \brief      If a matching SSID entry is present in the PMK Cache, returns a
34 **             pointer to the PSK.  If no entry is found in the cache, a
35 **             new PSK entry will be generated if a PassPhrase is set.
36 ** \param      pSsid pointer to string containing desired SSID.
37 ** \param      ssidLen length of the SSID string *pSsid.
38 ** \exception  Does not handle the case when multiple matching SSID entries are
39 **             found. Returns the first match.
40 ** \return     pointer to PSK with matching SSID entry from PMK cache,
41 **             NULL if no matching entry found.
42 */
43 extern UINT8 *pmkCacheFindPSK(void *priv, UINT8 *pSsid, UINT8 ssidLen);
44 
45 /*!
46 ** \brief      Flushes all entries in PMK cache
47 */
48 extern void pmkCacheFlush(void *priv);
49 
50 extern void pmkCacheGetPassphrase(void *priv, char *pPassphrase);
51 
52 extern void pmkCacheSetPassphrase(void *priv, char *pPassphrase);
53 extern void pmkCacheInit(void *priv);
54 extern void pmkCacheRomInit(void);
55 
56 extern void supplicantDisable(void *priv);
57 
58 #endif
59