blob: c49901041e68ac451f6768e65eadca2a979a89e2 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam0fb93dd2014-02-19 00:32:59 -08002 * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
3 *
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
74} tftSMEContext, *tpftSMEContext;
75
76/*--------------------------------------------------------------------------
77 Prototype functions
78 ------------------------------------------------------------------------*/
79void sme_FTOpen(tHalHandle hHal);
80void sme_FTClose(tHalHandle hHal);
Gopichand Nakkala356fb102013-03-06 12:34:04 +053081void sme_SetFTIEs( tHalHandle hHal, tANI_U8 sessionId, const tANI_U8 *ft_ies, tANI_U16 ft_ies_length );
Jeff Johnson295189b2012-06-20 16:38:30 -070082eHalStatus sme_FTUpdateKey( tHalHandle hHal, tCsrRoamSetKey * pFTKeyInfo );
83void csrFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuthRsp );
84void sme_GetFTPreAuthResponse( tHalHandle hHal, tANI_U8 *ft_ies, tANI_U32 ft_ies_ip_len, tANI_U16 *ft_ies_length );
85void sme_GetRICIEs( tHalHandle hHal, tANI_U8 *ric_ies, tANI_U32 ric_ies_ip_len, tANI_U32 *ric_ies_length );
86void sme_PreauthReassocIntvlTimerCallback(void *context);
Gopichand Nakkala3d295922013-05-07 16:19:14 +053087void sme_SetFTPreAuthState(tHalHandle hHal, v_BOOL_t state);
88v_BOOL_t sme_GetFTPreAuthState(tHalHandle hHal);
89v_BOOL_t sme_GetFTPTKState(tHalHandle hHal);
90void sme_SetFTPTKState(tHalHandle hHal, v_BOOL_t state);
Jeff Johnson295189b2012-06-20 16:38:30 -070091
92
93#endif //#if !defined( __SME_FTAPI_H )