blob: 314069b953e4fe3668400257e7aea3f048e9bcb7 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -07003 *
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
22#if !defined( __SME_FTAPI_H )
23#define __SME_FTAPI_H
24
25#include <limFTDefs.h>
26#include <palTimer.h>
27
28/**=========================================================================
29
30 \brief macros and prototype for SME APIs
31
32 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
33
34 Qualcomm Confidential and Proprietary.
35
36 ========================================================================*/
37typedef enum eFTIEState
38{
39 eFT_START_READY, // Start before and after 11r assoc
40 eFT_AUTH_REQ_READY, // When we have recvd the 1st or nth auth req
41 eFT_WAIT_AUTH2, // Sent auth1 and waiting auth2
42 eFT_AUTH_COMPLETE, // We are now ready for FT phase, send auth1, recd auth2
43 eFT_REASSOC_REQ_WAIT, // Now we have sent Auth Rsp to the supplicant and waiting
44 // Reassoc Req from the supplicant.
45 eFT_SET_KEY_WAIT, // We have received the Reassoc request from
46 // supplicant. Waiting for the keys.
47} tFTIEStates;
48
49
50typedef struct sFTSMEContext
51{
52 tANI_U8 *auth_ft_ies;
53 tANI_U32 auth_ft_ies_length;
54
55 tANI_U8 *reassoc_ft_ies;
56 tANI_U16 reassoc_ft_ies_length;
57
58 // Pre-Auth info
59 tFTIEStates FTState; // The state of FT in the current 11rAssoc
60 tSirMacAddr preAuthbssId; // BSSID to preauth to
61 tANI_U32 smeSessionId;
62
63 // Saved pFTPreAuthRsp
64 tpSirFTPreAuthRsp psavedFTPreAuthRsp;
65
66 // Time to trigger reassoc once pre-auth is successful
67 tPalTimerHandle preAuthReassocIntvlTimer;
68
69} tftSMEContext, *tpftSMEContext;
70
71/*--------------------------------------------------------------------------
72 Prototype functions
73 ------------------------------------------------------------------------*/
74void sme_FTOpen(tHalHandle hHal);
75void sme_FTClose(tHalHandle hHal);
76void sme_SetFTIEs( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *ft_ies, tANI_U16 ft_ies_length );
77eHalStatus sme_FTUpdateKey( tHalHandle hHal, tCsrRoamSetKey * pFTKeyInfo );
78void csrFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuthRsp );
79void sme_GetFTPreAuthResponse( tHalHandle hHal, tANI_U8 *ft_ies, tANI_U32 ft_ies_ip_len, tANI_U16 *ft_ies_length );
80void sme_GetRICIEs( tHalHandle hHal, tANI_U8 *ric_ies, tANI_U32 ric_ies_ip_len, tANI_U32 *ric_ies_length );
81void sme_PreauthReassocIntvlTimerCallback(void *context);
82
83
84#endif //#if !defined( __SME_FTAPI_H )