blob: 7b38d69fb0863b279f38b07b9cc02a8db73d2f41 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Srinivas Girigowda6d1f9062014-02-03 18:15:54 -08002 * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08003 *
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/*
43 * */
44
45#if !defined( __RRMGLOBAL_H )
46#define __RRMGLOBAL_H
47
48/**=========================================================================
49
50 \file rrmGlobal.h
51
52 \brief Definitions for SME APIs
53
Jeff Johnson295189b2012-06-20 16:38:30 -070054 ========================================================================*/
55
Jeff Johnson295189b2012-06-20 16:38:30 -070056typedef enum eRrmRetStatus
57{
58 eRRM_SUCCESS,
59 eRRM_INCAPABLE,
60 eRRM_REFUSED,
61 eRRM_FAILURE
62} tRrmRetStatus;
63
Srinivas Girigowda6d1f9062014-02-03 18:15:54 -080064typedef enum eRrmMsgReqSource
65{
66 eRRM_MSG_SOURCE_DRV = 1, /* for both 11k and legacy ccx */
67 eRRM_MSG_SOURCE_CCX_UPLOAD = 2, /* ccx upload approach */
68} tRrmMsgReqSource;
69
Jeff Johnson295189b2012-06-20 16:38:30 -070070typedef struct sSirChannelInfo
71{
72 tANI_U8 regulatoryClass;
73 tANI_U8 channelNum;
74} tSirChannelInfo, * tpSirChannelInfo;
75
76typedef struct sSirBeaconReportReqInd
77{
78 tANI_U16 messageType; // eWNI_SME_BEACON_REPORT_REQ_IND
79 tANI_U16 length;
80 tSirMacAddr bssId;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -080081 tANI_U16 measurementDuration[SIR_CCX_MAX_MEAS_IE_REQS]; //ms
Jeff Johnson295189b2012-06-20 16:38:30 -070082 tANI_U16 randomizationInterval; //ms
83 tSirChannelInfo channelInfo;
84 tSirMacAddr macaddrBssid; //0: wildcard
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -080085 tANI_U8 fMeasurementtype[SIR_CCX_MAX_MEAS_IE_REQS]; //0:Passive, 1: Active, 2: table mode
Jeff Johnson295189b2012-06-20 16:38:30 -070086 tAniSSID ssId; //May be wilcard.
87 tANI_U16 uDialogToken;
88 tSirChannelList channelList; //From AP channel report.
Srinivas Girigowda6d1f9062014-02-03 18:15:54 -080089 tRrmMsgReqSource msgSource;
Jeff Johnson295189b2012-06-20 16:38:30 -070090} tSirBeaconReportReqInd, * tpSirBeaconReportReqInd;
91
92
93typedef struct sSirBeaconReportXmitInd
94{
95 tANI_U16 messageType; // eWNI_SME_BEACON_REPORT_RESP_XMIT_IND
96 tANI_U16 length;
97 tSirMacAddr bssId;
98 tANI_U16 uDialogToken;
99 tANI_U8 fMeasureDone;
100 tANI_U16 duration;
101 tANI_U8 regClass;
102 tANI_U8 numBssDesc;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800103 tpSirBssDescription pBssDescription[SIR_BCN_REPORT_MAX_BSS_DESC];
Jeff Johnson295189b2012-06-20 16:38:30 -0700104} tSirBeaconReportXmitInd, * tpSirBeaconReportXmitInd;
105
106typedef struct sSirNeighborReportReqInd
107{
108 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_REPORT_REQ_IND
109 tANI_U16 length;
110 tSirMacAddr bssId; //For the session.
111 tANI_U16 noSSID; //TRUE - dont include SSID in the request.
112 //FALSE include the SSID. It may be null (wildcard)
113 tSirMacSSid ucSSID;
114} tSirNeighborReportReqInd, * tpSirNeighborReportReqInd;
115
116
117typedef struct sSirNeighborBssDescription
118{
119 tANI_U16 length;
120 tSirMacAddr bssId;
121 tANI_U8 regClass;
122 tANI_U8 channel;
123 tANI_U8 phyType;
124 union sSirNeighborBssidInfo {
125 struct _rrmInfo {
126 tANI_U32 fApPreauthReachable:2; //see IEEE 802.11k Table 7-43a
127 tANI_U32 fSameSecurityMode:1;
128 tANI_U32 fSameAuthenticator:1;
129 tANI_U32 fCapSpectrumMeasurement:1; //see IEEE 802.11k Table 7-95d
130 tANI_U32 fCapQos:1;
131 tANI_U32 fCapApsd:1;
132 tANI_U32 fCapRadioMeasurement:1;
133 tANI_U32 fCapDelayedBlockAck:1;
134 tANI_U32 fCapImmediateBlockAck:1;
135 tANI_U32 fMobilityDomain:1;
136 tANI_U32 reserved:21;
137 } rrmInfo;
138 struct _ccxInfo {
139 tANI_U32 channelBand:8;
140 tANI_U32 minRecvSigPower:8;
141 tANI_U32 apTxPower:8;
142 tANI_U32 roamHysteresis:8;
143 tANI_U32 adaptScanThres:8;
144
145 tANI_U32 transitionTime:8;
146 tANI_U32 tsfOffset:16;
147
148 tANI_U32 beaconInterval:16;
149 tANI_U32 reserved: 16;
150 } ccxInfo;
151 } bssidInfo;
152
153 //Optional sub IEs....ignoring for now.
154}tSirNeighborBssDescription, *tpSirNeighborBssDescripton;
155
156typedef struct sSirNeighborReportInd
157{
158 tANI_U16 messageType; // eWNI_SME_NEIGHBOR_REPORT_IND
159 tANI_U16 length;
160 tANI_U16 numNeighborReports;
161 tSirMacAddr bssId; //For the session.
162 //tSirResultCodes statusCode;
163 tSirNeighborBssDescription sNeighborBssDescription[1];
164} tSirNeighborReportInd, * tpSirNeighborReportInd;
165
166typedef struct sRRMBeaconReportRequestedIes
167{
168 tANI_U8 num;
169 tANI_U8 *pElementIds;
170}tRRMBeaconReportRequestedIes, *tpRRMBeaconReportRequestedIes;
171
172//Reporting detail defines.
173//Reference - IEEE Std 802.11k-2008 section 7.3.2.21.6 Table 7-29h
174#define BEACON_REPORTING_DETAIL_NO_FF_IE 0
175#define BEACON_REPORTING_DETAIL_ALL_FF_REQ_IE 1
176#define BEACON_REPORTING_DETAIL_ALL_FF_IE 2
177
178
179typedef struct sRRMReq
180{
181 tANI_U8 dialog_token; //In action frame;
182 tANI_U8 token; //Within individual request;
183 tANI_U8 type;
184 union {
185 struct {
186 tANI_U8 reportingDetail;
187 tRRMBeaconReportRequestedIes reqIes;
188 }Beacon;
189 }request;
Kanchanapally, Vidyullathaced2f422014-02-04 20:45:38 +0530190 tANI_U8 sendEmptyBcnRpt;
Jeff Johnson295189b2012-06-20 16:38:30 -0700191}tRRMReq, *tpRRMReq;
192
193typedef struct sRRMCaps
194{
195 tANI_U8 LinkMeasurement: 1;
196 tANI_U8 NeighborRpt: 1;
197 tANI_U8 parallel: 1;
198 tANI_U8 repeated: 1;
199 tANI_U8 BeaconPassive: 1;
200 tANI_U8 BeaconActive: 1;
201 tANI_U8 BeaconTable: 1;
202 tANI_U8 BeaconRepCond: 1;
203 tANI_U8 FrameMeasurement: 1;
204 tANI_U8 ChannelLoad: 1;
205 tANI_U8 NoiseHistogram: 1;
206 tANI_U8 statistics: 1;
207 tANI_U8 LCIMeasurement: 1;
208 tANI_U8 LCIAzimuth: 1;
209 tANI_U8 TCMCapability: 1;
210 tANI_U8 triggeredTCM: 1;
211 tANI_U8 APChanReport: 1;
212 tANI_U8 RRMMIBEnabled: 1;
213 tANI_U8 MeasurementPilotEnabled: 1;
214 tANI_U8 NeighborTSFOffset: 1;
215 tANI_U8 RCPIMeasurement: 1;
216 tANI_U8 RSNIMeasurement: 1;
217 tANI_U8 BssAvgAccessDelay: 1;
218 tANI_U8 BSSAvailAdmission: 1;
219 tANI_U8 AntennaInformation: 1;
220
221 tANI_U8 operatingChanMax;
222 tANI_U8 nonOperatingChanMax;
223 tANI_U8 MeasurementPilot;
224}tRRMCaps, *tpRRMCaps;
225
226typedef struct sRrmPEContext
227{
228 tANI_U8 rrmEnable;
229 //tChannelList APchannelReport;
230 tANI_U32 startTSF[2]; //Used during scan/measurement to store the start TSF. this is not used directly in beacon reports.
231 //This value is stored into bssdescription and beacon report gets it from bss decsription.
232 tRRMCaps rrmEnabledCaps;
233 tPowerdBm txMgmtPower;
234 tANI_U8 DialogToken; //Dialog token for the request initiated from station.
235 tpRRMReq pCurrentReq;
236}tRrmPEContext, *tpRrmPEContext;
237
238// 2008 11k spec reference: 18.4.8.5 RCPI Measurement
239#define RCPI_LOW_RSSI_VALUE (-110)
240#define RCPI_MAX_VALUE (220)
241#define CALCULATE_RCPI(rssi) (((rssi) + 110) * 2)
242
243
244#endif //#if defined __RRMGLOBAL_H