blob: 115f3f9f0b718b727999c18fcc0c0561f1395a58 [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
42#if !defined( __SME_FTAPI_H )
43#define __SME_FTAPI_H
44
45#include <limFTDefs.h>
46#include <palTimer.h>
47
48/**=========================================================================
49
50 \brief macros and prototype for SME APIs
51
52 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
53
54 Qualcomm Confidential and Proprietary.
55
56 ========================================================================*/
57typedef enum eFTIEState
58{
59 eFT_START_READY, // Start before and after 11r assoc
60 eFT_AUTH_REQ_READY, // When we have recvd the 1st or nth auth req
61 eFT_WAIT_AUTH2, // Sent auth1 and waiting auth2
62 eFT_AUTH_COMPLETE, // We are now ready for FT phase, send auth1, recd auth2
63 eFT_REASSOC_REQ_WAIT, // Now we have sent Auth Rsp to the supplicant and waiting
64 // Reassoc Req from the supplicant.
65 eFT_SET_KEY_WAIT, // We have received the Reassoc request from
66 // supplicant. Waiting for the keys.
67} tFTIEStates;
68
69
70typedef struct sFTSMEContext
71{
72 tANI_U8 *auth_ft_ies;
73 tANI_U32 auth_ft_ies_length;
74
75 tANI_U8 *reassoc_ft_ies;
76 tANI_U16 reassoc_ft_ies_length;
77
78 // Pre-Auth info
79 tFTIEStates FTState; // The state of FT in the current 11rAssoc
80 tSirMacAddr preAuthbssId; // BSSID to preauth to
81 tANI_U32 smeSessionId;
82
83 // Saved pFTPreAuthRsp
84 tpSirFTPreAuthRsp psavedFTPreAuthRsp;
85
86 // Time to trigger reassoc once pre-auth is successful
87 tPalTimerHandle preAuthReassocIntvlTimer;
88
89} tftSMEContext, *tpftSMEContext;
90
91/*--------------------------------------------------------------------------
92 Prototype functions
93 ------------------------------------------------------------------------*/
94void sme_FTOpen(tHalHandle hHal);
95void sme_FTClose(tHalHandle hHal);
Gopichand Nakkala356fb102013-03-06 12:34:04 +053096void sme_SetFTIEs( tHalHandle hHal, tANI_U8 sessionId, const tANI_U8 *ft_ies, tANI_U16 ft_ies_length );
Jeff Johnson295189b2012-06-20 16:38:30 -070097eHalStatus sme_FTUpdateKey( tHalHandle hHal, tCsrRoamSetKey * pFTKeyInfo );
98void csrFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuthRsp );
99void sme_GetFTPreAuthResponse( tHalHandle hHal, tANI_U8 *ft_ies, tANI_U32 ft_ies_ip_len, tANI_U16 *ft_ies_length );
100void sme_GetRICIEs( tHalHandle hHal, tANI_U8 *ric_ies, tANI_U32 ric_ies_ip_len, tANI_U32 *ric_ies_length );
101void sme_PreauthReassocIntvlTimerCallback(void *context);
102
103
104#endif //#if !defined( __SME_FTAPI_H )