blob: da4f11f7a27ca04381c45651c9f85ecd300c5ffe [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2013-2015 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
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
28#if defined WLAN_FEATURE_VOWIFI_11R
29/**=========================================================================
30
31 Macros and Function prototypes FT and 802.11R purposes
32
33 ========================================================================*/
34
35#ifndef __LIMFTDEFS_H__
36#define __LIMFTDEFS_H__
37
38#include <cds_api.h>
39#include "wma_if.h"
40
41/*--------------------------------------------------------------------------
42 Preprocessor definitions and constants
43 ------------------------------------------------------------------------*/
44#define SIR_MDIE_SIZE 3 /* MD ID(2 bytes), Capability(1 byte) */
45#define MAX_FTIE_SIZE 384 /* Max size limited to 384, on acct. of IW custom events */
46
47/*--------------------------------------------------------------------------
48 Type declarations
49 ------------------------------------------------------------------------*/
50/*--------------------------------------------------------------------------
51 FT Pre Auth Req SME<->PE
52 ------------------------------------------------------------------------*/
53typedef struct sSirFTPreAuthReq {
54 uint16_t messageType; /* eWNI_SME_FT_PRE_AUTH_REQ */
55 uint16_t length;
56 /*
57 * Track if response is processed for this request
58 * We expect only one response per request.
59 */
60 bool bPreAuthRspProcessed;
61 uint8_t preAuthchannelNum;
62 /* BSSID currently associated to suspend the link */
63 tSirMacAddr currbssId;
64 tSirMacAddr preAuthbssId; /* BSSID to preauth to */
65 uint16_t ft_ies_length;
66 uint8_t ft_ies[MAX_FTIE_SIZE];
67 tpSirBssDescription pbssDescription;
68} tSirFTPreAuthReq, *tpSirFTPreAuthReq;
69
70/*-------------------------------------------------------------------------
71 FT Pre Auth Rsp PE<->SME
72 ------------------------------------------------------------------------*/
73typedef struct sSirFTPreAuthRsp {
74 uint16_t messageType; /* eWNI_SME_FT_PRE_AUTH_RSP */
75 uint16_t length;
76 uint8_t smeSessionId;
77 tSirMacAddr preAuthbssId; /* BSSID to preauth to */
78 tSirRetStatus status;
79 uint16_t ft_ies_length;
80 uint8_t ft_ies[MAX_FTIE_SIZE];
81 uint16_t ric_ies_length;
82 uint8_t ric_ies[MAX_FTIE_SIZE];
83} tSirFTPreAuthRsp, *tpSirFTPreAuthRsp;
84
85/*--------------------------------------------------------------------------
86 FT Pre Auth Rsp Key SME<->PE
87 ------------------------------------------------------------------------*/
88typedef struct sSirFTUpdateKeyInfo {
89 uint16_t messageType;
90 uint16_t length;
91 uint32_t smeSessionId;
92 tSirMacAddr bssId;
93 tSirKeyMaterial keyMaterial;
94} tSirFTUpdateKeyInfo, *tpSirFTUpdateKeyInfo;
95
96/*--------------------------------------------------------------------------
97 FT Pre Auth Rsp Key SME<->PE
98 ------------------------------------------------------------------------*/
99typedef struct sSirFTPreAuthKeyInfo {
100 uint8_t extSetStaKeyParamValid; /* Ext Bss Config Msg if set */
101 /* SetStaKeyParams for ext bss msg */
102 tLimMlmSetKeysReq extSetStaKeyParam;
103} tSirFTPreAuthKeyInfo, *tpSirFTPreAuthKeyInfo;
104
105/*-------------------------------------------------------------------------
106 Global FT Information
107 ------------------------------------------------------------------------*/
108typedef struct sFTPEContext {
109 tpSirFTPreAuthReq pFTPreAuthReq; /* Saved FT Pre Auth Req */
110 tSirRetStatus ftPreAuthStatus;
111 uint16_t saved_auth_rsp_length;
112 uint8_t saved_auth_rsp[MAX_FTIE_SIZE];
113 tSirFTPreAuthKeyInfo PreAuthKeyInfo;
114 /* Items created for the new FT, session */
115 void *pAddBssReq; /* Save add bss req */
116 void *pAddStaReq; /*Save add sta req */
117 uint32_t peSessionId;
118 uint32_t smeSessionId;
119
120 /* This flag is required to indicate on which session the preauth
121 * has taken place, since the auth reponse for preauth will come
122 * for a new BSSID for which there is no session yet. This flag
123 * will be used to extract the session from the session preauth
124 * has been initiated
125 */
126 bool ftPreAuthSession;
127} tftPEContext, *tpftPEContext;
128
129#endif /* __LIMFTDEFS_H__ */
130
131#endif /* WLAN_FEATURE_VOWIFI_11R */