blob: 2689c9ec6258713aa6ac009b483396ece5b87493 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -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.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
Gopichand Nakkala3d295922013-05-07 16:19:14 +053042
43
Jeff Johnson295189b2012-06-20 16:38:30 -070044#if !defined( __SME_FTAPI_H )
45#define __SME_FTAPI_H
46
47#include <limFTDefs.h>
48#include <palTimer.h>
49
50/**=========================================================================
51
52 \brief macros and prototype for SME APIs
53
Gopichand Nakkala3d295922013-05-07 16:19:14 +053054 Copyright 2008 (c) Qualcomm Technologies, Inc. All Rights Reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070055
Gopichand Nakkala3d295922013-05-07 16:19:14 +053056 Qualcomm Technologies Confidential and Proprietary.
Jeff Johnson295189b2012-06-20 16:38:30 -070057
58 ========================================================================*/
59typedef enum eFTIEState
60{
61 eFT_START_READY, // Start before and after 11r assoc
62 eFT_AUTH_REQ_READY, // When we have recvd the 1st or nth auth req
63 eFT_WAIT_AUTH2, // Sent auth1 and waiting auth2
64 eFT_AUTH_COMPLETE, // We are now ready for FT phase, send auth1, recd auth2
65 eFT_REASSOC_REQ_WAIT, // Now we have sent Auth Rsp to the supplicant and waiting
66 // Reassoc Req from the supplicant.
67 eFT_SET_KEY_WAIT, // We have received the Reassoc request from
68 // supplicant. Waiting for the keys.
69} tFTIEStates;
70
71
72typedef struct sFTSMEContext
73{
74 tANI_U8 *auth_ft_ies;
75 tANI_U32 auth_ft_ies_length;
76
77 tANI_U8 *reassoc_ft_ies;
78 tANI_U16 reassoc_ft_ies_length;
79
80 // Pre-Auth info
81 tFTIEStates FTState; // The state of FT in the current 11rAssoc
82 tSirMacAddr preAuthbssId; // BSSID to preauth to
83 tANI_U32 smeSessionId;
84
85 // Saved pFTPreAuthRsp
86 tpSirFTPreAuthRsp psavedFTPreAuthRsp;
Gopichand Nakkala3d295922013-05-07 16:19:14 +053087 v_BOOL_t setFTPreAuthState;
88 v_BOOL_t setFTPTKState;
Jeff Johnson295189b2012-06-20 16:38:30 -070089
90 // Time to trigger reassoc once pre-auth is successful
Madan Mohan Koyyalamudia48c6812013-07-11 12:01:37 +053091 vos_timer_t preAuthReassocIntvlTimer;
Gopichand Nakkala3d295922013-05-07 16:19:14 +053092 tCsrRoamSetKey *pCsrFTKeyInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -070093
94} tftSMEContext, *tpftSMEContext;
95
96/*--------------------------------------------------------------------------
97 Prototype functions
98 ------------------------------------------------------------------------*/
99void sme_FTOpen(tHalHandle hHal);
100void sme_FTClose(tHalHandle hHal);
Gopichand Nakkala356fb102013-03-06 12:34:04 +0530101void sme_SetFTIEs( tHalHandle hHal, tANI_U8 sessionId, const tANI_U8 *ft_ies, tANI_U16 ft_ies_length );
Jeff Johnson295189b2012-06-20 16:38:30 -0700102eHalStatus sme_FTUpdateKey( tHalHandle hHal, tCsrRoamSetKey * pFTKeyInfo );
103void csrFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuthRsp );
104void sme_GetFTPreAuthResponse( tHalHandle hHal, tANI_U8 *ft_ies, tANI_U32 ft_ies_ip_len, tANI_U16 *ft_ies_length );
105void sme_GetRICIEs( tHalHandle hHal, tANI_U8 *ric_ies, tANI_U32 ric_ies_ip_len, tANI_U32 *ric_ies_length );
106void sme_PreauthReassocIntvlTimerCallback(void *context);
Gopichand Nakkala3d295922013-05-07 16:19:14 +0530107void sme_SetFTPreAuthState(tHalHandle hHal, v_BOOL_t state);
108v_BOOL_t sme_GetFTPreAuthState(tHalHandle hHal);
109v_BOOL_t sme_GetFTPTKState(tHalHandle hHal);
110void sme_SetFTPTKState(tHalHandle hHal, v_BOOL_t state);
Jeff Johnson295189b2012-06-20 16:38:30 -0700111
112
113#endif //#if !defined( __SME_FTAPI_H )