Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 2 | * Copyright (c) 2013-2014, 2017 The Linux Foundation. All rights reserved. |
Kiet Lam | 0fb93dd | 2014-02-19 00:32:59 -0800 | [diff] [blame] | 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 Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 20 | */ |
Kiet Lam | 0fb93dd | 2014-02-19 00:32:59 -0800 | [diff] [blame] | 21 | |
| 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 Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 28 | #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 Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 38 | ========================================================================*/ |
| 39 | typedef 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 | |
| 52 | typedef 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 Nakkala | 3d29592 | 2013-05-07 16:19:14 +0530 | [diff] [blame] | 67 | v_BOOL_t setFTPreAuthState; |
| 68 | v_BOOL_t setFTPTKState; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 69 | |
| 70 | // Time to trigger reassoc once pre-auth is successful |
Madan Mohan Koyyalamudi | a48c681 | 2013-07-11 12:01:37 +0530 | [diff] [blame] | 71 | vos_timer_t preAuthReassocIntvlTimer; |
Gopichand Nakkala | 3d29592 | 2013-05-07 16:19:14 +0530 | [diff] [blame] | 72 | tCsrRoamSetKey *pCsrFTKeyInfo; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 73 | |
Kanchanapally, Vidyullatha | 4f84f68 | 2014-04-29 20:40:34 +0530 | [diff] [blame] | 74 | v_BOOL_t addMDIE; |
Padma, Santhosh Kumar | 67f479b | 2016-12-28 15:43:42 +0530 | [diff] [blame] | 75 | |
| 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 Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 81 | } tftSMEContext, *tpftSMEContext; |
| 82 | |
| 83 | /*-------------------------------------------------------------------------- |
| 84 | Prototype functions |
| 85 | ------------------------------------------------------------------------*/ |
| 86 | void sme_FTOpen(tHalHandle hHal); |
| 87 | void sme_FTClose(tHalHandle hHal); |
Gopichand Nakkala | 356fb10 | 2013-03-06 12:34:04 +0530 | [diff] [blame] | 88 | void sme_SetFTIEs( tHalHandle hHal, tANI_U8 sessionId, const tANI_U8 *ft_ies, tANI_U16 ft_ies_length ); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 89 | eHalStatus sme_FTUpdateKey( tHalHandle hHal, tCsrRoamSetKey * pFTKeyInfo ); |
| 90 | void csrFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuthRsp ); |
| 91 | void sme_GetFTPreAuthResponse( tHalHandle hHal, tANI_U8 *ft_ies, tANI_U32 ft_ies_ip_len, tANI_U16 *ft_ies_length ); |
| 92 | void sme_GetRICIEs( tHalHandle hHal, tANI_U8 *ric_ies, tANI_U32 ric_ies_ip_len, tANI_U32 *ric_ies_length ); |
| 93 | void sme_PreauthReassocIntvlTimerCallback(void *context); |
Gopichand Nakkala | 3d29592 | 2013-05-07 16:19:14 +0530 | [diff] [blame] | 94 | void sme_SetFTPreAuthState(tHalHandle hHal, v_BOOL_t state); |
| 95 | v_BOOL_t sme_GetFTPreAuthState(tHalHandle hHal); |
| 96 | v_BOOL_t sme_GetFTPTKState(tHalHandle hHal); |
| 97 | void sme_SetFTPTKState(tHalHandle hHal, v_BOOL_t state); |
Mukul Sharma | c159c43 | 2014-01-15 15:42:46 +0530 | [diff] [blame] | 98 | #if defined(WLAN_FEATURE_VOWIFI_11R) |
| 99 | void sme_FTReset(tHalHandle hHal); |
| 100 | #endif |
| 101 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 102 | |
| 103 | |
| 104 | #endif //#if !defined( __SME_FTAPI_H ) |