blob: 0a57aa5e8e0a5ae172bfa585597fdd3d99e903d6 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Padma, Santhosh Kumar67f479b2016-12-28 15:43:42 +05302 * Copyright (c) 2013-2014, 2017 The Linux Foundation. All rights reserved.
Kiet Lam0fb93dd2014-02-19 00:32:59 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam0fb93dd2014-02-19 00:32:59 -080021
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028#if !defined( __SME_FTAPI_H )
29#define __SME_FTAPI_H
30
31#include <limFTDefs.h>
32#include <palTimer.h>
33
34/**=========================================================================
35
36 \brief macros and prototype for SME APIs
37
Jeff Johnson295189b2012-06-20 16:38:30 -070038 ========================================================================*/
39typedef enum eFTIEState
40{
41 eFT_START_READY, // Start before and after 11r assoc
42 eFT_AUTH_REQ_READY, // When we have recvd the 1st or nth auth req
43 eFT_WAIT_AUTH2, // Sent auth1 and waiting auth2
44 eFT_AUTH_COMPLETE, // We are now ready for FT phase, send auth1, recd auth2
45 eFT_REASSOC_REQ_WAIT, // Now we have sent Auth Rsp to the supplicant and waiting
46 // Reassoc Req from the supplicant.
47 eFT_SET_KEY_WAIT, // We have received the Reassoc request from
48 // supplicant. Waiting for the keys.
49} tFTIEStates;
50
51
52typedef struct sFTSMEContext
53{
54 tANI_U8 *auth_ft_ies;
55 tANI_U32 auth_ft_ies_length;
56
57 tANI_U8 *reassoc_ft_ies;
58 tANI_U16 reassoc_ft_ies_length;
59
60 // Pre-Auth info
61 tFTIEStates FTState; // The state of FT in the current 11rAssoc
62 tSirMacAddr preAuthbssId; // BSSID to preauth to
63 tANI_U32 smeSessionId;
64
65 // Saved pFTPreAuthRsp
66 tpSirFTPreAuthRsp psavedFTPreAuthRsp;
Gopichand Nakkala3d295922013-05-07 16:19:14 +053067 v_BOOL_t setFTPreAuthState;
68 v_BOOL_t setFTPTKState;
Jeff Johnson295189b2012-06-20 16:38:30 -070069
70 // Time to trigger reassoc once pre-auth is successful
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +053071 vos_timer_t preAuthReassocIntvlTimer;
Gopichand Nakkala3d295922013-05-07 16:19:14 +053072 tCsrRoamSetKey *pCsrFTKeyInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -070073
Kanchanapally, Vidyullatha4f84f682014-04-29 20:40:34 +053074 v_BOOL_t addMDIE;
Padma, Santhosh Kumar67f479b2016-12-28 15:43:42 +053075
76 tANI_BOOLEAN is_preauth_lfr_mbb;
77
78#ifdef WLAN_FEATURE_LFR_MBB
79 vos_timer_t pre_auth_reassoc_mbb_timer;
80#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070081} tftSMEContext, *tpftSMEContext;
82
83/*--------------------------------------------------------------------------
84 Prototype functions
85 ------------------------------------------------------------------------*/
86void sme_FTOpen(tHalHandle hHal);
87void sme_FTClose(tHalHandle hHal);
Gopichand Nakkala356fb102013-03-06 12:34:04 +053088void sme_SetFTIEs( tHalHandle hHal, tANI_U8 sessionId, const tANI_U8 *ft_ies, tANI_U16 ft_ies_length );
Jeff Johnson295189b2012-06-20 16:38:30 -070089eHalStatus sme_FTUpdateKey( tHalHandle hHal, tCsrRoamSetKey * pFTKeyInfo );
90void csrFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuthRsp );
91void sme_GetFTPreAuthResponse( tHalHandle hHal, tANI_U8 *ft_ies, tANI_U32 ft_ies_ip_len, tANI_U16 *ft_ies_length );
92void sme_GetRICIEs( tHalHandle hHal, tANI_U8 *ric_ies, tANI_U32 ric_ies_ip_len, tANI_U32 *ric_ies_length );
93void sme_PreauthReassocIntvlTimerCallback(void *context);
Gopichand Nakkala3d295922013-05-07 16:19:14 +053094void sme_SetFTPreAuthState(tHalHandle hHal, v_BOOL_t state);
95v_BOOL_t sme_GetFTPreAuthState(tHalHandle hHal);
96v_BOOL_t sme_GetFTPTKState(tHalHandle hHal);
97void sme_SetFTPTKState(tHalHandle hHal, v_BOOL_t state);
Mukul Sharmac159c432014-01-15 15:42:46 +053098#if defined(WLAN_FEATURE_VOWIFI_11R)
99void sme_FTReset(tHalHandle hHal);
100#endif
101
Jeff Johnson295189b2012-06-20 16:38:30 -0700102
103
104#endif //#if !defined( __SME_FTAPI_H )