blob: b6a0086046b6a2013205eeb4ef7791956e57e322 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002 * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
Kiet Lam842dad02014-02-18 18:44:02 -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.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080022/*
Kiet Lam842dad02014-02-18 18:44:02 -080023 * 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/*
Jeff Johnson295189b2012-06-20 16:38:30 -070029 * This file parserApi.h contains the definitions used
30 * for parsing received 802.11 frames
31 * Author: Chandra Modumudi
32 * Date: 02/11/02
33 * History:-
34 * Date Modified by Modification Information
35 * --------------------------------------------------------------------
36 *
37 */
38#ifndef __PARSE_H__
39#define __PARSE_H__
40
41#include <stdarg.h>
42#include "sirMacPropExts.h"
43#include "dot11f.h"
44#include "limSession.h"
45
46#define COUNTRY_STRING_LENGTH ( 3 )
47#define COUNTRY_INFO_MAX_CHANNEL ( 84 )
48#define MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE (COUNTRY_STRING_LENGTH * COUNTRY_INFO_MAX_CHANNEL)
49#define HIGHEST_24GHZ_CHANNEL_NUM ( 14 )
50
Kiran Kumar Lokere27090372013-07-19 20:13:55 -070051#define IS_24G_CH(__chNum) ((__chNum > 0) && (__chNum < 14))
52#define IS_5G_CH(__chNum) ((__chNum >= 36) && (__chNum <= 165))
53
Jeff Johnson295189b2012-06-20 16:38:30 -070054typedef struct sSirCountryInformation
55{
56 tANI_U8 countryString[COUNTRY_STRING_LENGTH];
57 tANI_U8 numIntervals; //number of channel intervals
58 struct channelPowerLim
59 {
60 tANI_U8 channelNumber;
61 tANI_U8 numChannel;
62 tANI_U8 maxTransmitPower;
63 } channelTransmitPower[COUNTRY_INFO_MAX_CHANNEL];
64} tSirCountryInformation,*tpSirCountryInformation;
65
66
67/// Structure common to Beaons & Probe Responses
68typedef struct sSirProbeRespBeacon
69{
70 tSirMacTimeStamp timeStamp;
71 tANI_U16 beaconInterval;
72 tSirMacCapabilityInfo capabilityInfo;
73
74 tSirMacSSid ssId;
75 tSirMacRateSet supportedRates;
76 tSirMacRateSet extendedRates;
77 tSirMacChanNum channelNumber;
78 tSirMacCfParamSet cfParamSet;
79 tSirMacTim tim;
80 tSirMacEdcaParamSetIE edcaParams;
81 tSirMacQosCapabilityIE qosCapability;
82
83 tSirCountryInformation countryInfoParam;
84 tSirMacWpaInfo wpa;
85 tSirMacRsnInfo rsn;
86
87 tSirMacErpInfo erpIEInfo;
88
89 tSirPropIEStruct propIEinfo;
90 tDot11fIEPowerConstraints localPowerConstraint;
91 tDot11fIETPCReport tpcReport;
92 tDot11fIEChanSwitchAnn channelSwitchIE;
93 tDot11fIEExtChanSwitchAnn extChannelSwitchIE;
94 tSirMacAddr bssid;
95 tDot11fIEQuiet quietIE;
96 tDot11fIEHTCaps HTCaps;
97 tDot11fIEHTInfo HTInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -070098 tDot11fIEP2PProbeRes P2PProbeRes;
Jeff Johnson295189b2012-06-20 16:38:30 -070099#ifdef WLAN_FEATURE_VOWIFI_11R
100 tANI_U8 mdie[SIR_MDIE_SIZE];
101#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800102#ifdef FEATURE_WLAN_ESE
103 tDot11fIEESETxmitPower eseTxPwr;
Jeff Johnson295189b2012-06-20 16:38:30 -0700104 tDot11fIEQBSSLoad QBSSLoad;
105#endif
106 tANI_U8 ssidPresent;
107 tANI_U8 suppRatesPresent;
108 tANI_U8 extendedRatesPresent;
109 tANI_U8 cfPresent;
110 tANI_U8 dsParamsPresent;
111 tANI_U8 timPresent;
112
113 tANI_U8 edcaPresent;
114 tANI_U8 qosCapabilityPresent;
115 tANI_U8 wmeEdcaPresent;
116 tANI_U8 wmeInfoPresent;
117 tANI_U8 wsmCapablePresent;
118
119 tANI_U8 countryInfoPresent;
120 tANI_U8 wpaPresent;
121 tANI_U8 rsnPresent;
122 tANI_U8 erpPresent;
123 tANI_U8 channelSwitchPresent;
124 tANI_U8 extChannelSwitchPresent;
125 tANI_U8 quietIEPresent;
126 tANI_U8 tpcReportPresent;
127 tANI_U8 powerConstraintPresent;
128
129#ifdef WLAN_FEATURE_VOWIFI_11R
130 tANI_U8 mdiePresent;
131#endif
132
Jeff Johnsone7245742012-09-05 17:12:55 -0700133#ifdef WLAN_FEATURE_11AC
134 tDot11fIEVHTCaps VHTCaps;
135 tDot11fIEVHTOperation VHTOperation;
136 tDot11fIEVHTExtBssLoad VHTExtBssLoad;
Mohit Khanna4a70d262012-09-11 16:30:12 -0700137 tDot11fIEOperatingMode OperatingMode;
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700138 tANI_U8 WiderBWChanSwitchAnnPresent;
139 tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
Jeff Johnsone7245742012-09-05 17:12:55 -0700140#endif
Sandeep Puligilla11d49a62014-01-30 12:05:16 +0530141 tDot11fIEOBSSScanParameters OBSSScanParameters;
Jeff Johnson295189b2012-06-20 16:38:30 -0700142} tSirProbeRespBeacon, *tpSirProbeRespBeacon;
143
144// probe Request structure
145typedef struct sSirProbeReq
146{
147 tSirMacSSid ssId;
148 tSirMacRateSet supportedRates;
149 tSirMacRateSet extendedRates;
150 tDot11fIEWscProbeReq probeReqWscIeInfo;
151 tDot11fIEHTCaps HTCaps;
152 tANI_U8 ssidPresent;
153 tANI_U8 suppRatesPresent;
154 tANI_U8 extendedRatesPresent;
155 tANI_U8 wscIePresent;
156 tANI_U8 p2pIePresent;
Jeff Johnsone7245742012-09-05 17:12:55 -0700157#ifdef WLAN_FEATURE_11AC
158 tDot11fIEVHTCaps VHTCaps;
159#endif
160
Jeff Johnson295189b2012-06-20 16:38:30 -0700161
162} tSirProbeReq, *tpSirProbeReq;
163
164/// Association Request structure (one day to be replaced by
165/// tDot11fAssocRequest)
166typedef struct sSirAssocReq
167{
168
169 tSirMacCapabilityInfo capabilityInfo;
170 tANI_U16 listenInterval;
171 tSirMacAddr currentApAddr; /* only in reassoc frames */
172 tSirMacSSid ssId;
173 tSirMacRateSet supportedRates;
174 tSirMacRateSet extendedRates;
175
176 tSirAddtsReqInfo addtsReq;
177 tSirMacQosCapabilityStaIE qosCapability;
178
179 tSirMacWpaInfo wpa;
180 tSirMacRsnInfo rsn;
181 tSirAddie addIE;
182
183 tSirPropIEStruct propIEinfo;
184 tSirMacPowerCapabilityIE powerCapability;
185 tSirMacSupportedChannelIE supportedChannels;
186 tDot11fIEHTCaps HTCaps;
Jeff Johnson295189b2012-06-20 16:38:30 -0700187 tDot11fIEWMMInfoStation WMMInfoStation;
Jeff Johnson295189b2012-06-20 16:38:30 -0700188 /// This is set if the frame is a reassoc request:
189 tANI_U8 reassocRequest;
190 tANI_U8 ssidPresent;
191 tANI_U8 suppRatesPresent;
192 tANI_U8 extendedRatesPresent;
193
194 tANI_U8 wmeInfoPresent;
195 tANI_U8 qosCapabilityPresent;
196 tANI_U8 addtsPresent;
197 tANI_U8 wsmCapablePresent;
198
199 tANI_U8 wpaPresent;
200 tANI_U8 rsnPresent;
201 tANI_U8 addIEPresent;
202
203 tANI_U8 powerCapabilityPresent;
204 tANI_U8 supportedChannelsPresent;
Jeff Johnson295189b2012-06-20 16:38:30 -0700205 // keeing copy of assoction request received, this is
206 // required for indicating the frame to upper layers
207 tANI_U32 assocReqFrameLength;
208 tANI_U8* assocReqFrame;
Jeff Johnsone7245742012-09-05 17:12:55 -0700209#ifdef WLAN_FEATURE_11AC
210 tDot11fIEVHTCaps VHTCaps;
Mohit Khanna7d5aeb22012-09-11 16:21:57 -0700211 tDot11fIEOperatingMode operMode;
Jeff Johnsone7245742012-09-05 17:12:55 -0700212#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700213} tSirAssocReq, *tpSirAssocReq;
214
215
216/// Association Response structure (one day to be replaced by
217/// tDot11fAssocRequest)
218typedef struct sSirAssocRsp
219{
220
221 tSirMacCapabilityInfo capabilityInfo;
222 tANI_U16 aid;
223 tANI_U16 statusCode;
224 tSirMacRateSet supportedRates;
225 tSirMacRateSet extendedRates;
226 tSirPropIEStruct propIEinfo;
227 tSirMacEdcaParamSetIE edca;
228 tSirAddtsRspInfo addtsRsp;
229 tDot11fIEHTCaps HTCaps;
230 tDot11fIEHTInfo HTInfo;
231#if defined WLAN_FEATURE_VOWIFI_11R
232 tDot11fIEFTInfo FTInfo;
233 tANI_U8 mdie[SIR_MDIE_SIZE];
234 tANI_U8 num_RICData;
235 tDot11fIERICDataDesc RICData[2];
236#endif
237
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800238#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700239 tANI_U8 num_tspecs;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800240 tDot11fIEWMMTSPEC TSPECInfo[SIR_ESE_MAX_TSPEC_IES];
241 tSirMacESETSMIE tsmIE;
Jeff Johnson295189b2012-06-20 16:38:30 -0700242#endif
243
244 tANI_U8 suppRatesPresent;
245 tANI_U8 extendedRatesPresent;
246
247 tANI_U8 edcaPresent;
248 tANI_U8 wmeEdcaPresent;
249 tANI_U8 addtsPresent;
250 tANI_U8 wsmCapablePresent;
251#if defined WLAN_FEATURE_VOWIFI_11R
252 tANI_U8 ftinfoPresent;
253 tANI_U8 mdiePresent;
254 tANI_U8 ricPresent;
255#endif
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800256#ifdef FEATURE_WLAN_ESE
Jeff Johnson295189b2012-06-20 16:38:30 -0700257 tANI_U8 tspecPresent;
258 tANI_U8 tsmPresent;
259#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700260#ifdef WLAN_FEATURE_11AC
261 tDot11fIEVHTCaps VHTCaps;
262 tDot11fIEVHTOperation VHTOperation;
263#endif
Sandeep Puligilla11d49a62014-01-30 12:05:16 +0530264 tDot11fIEOBSSScanParameters OBSSScanParameters;
Jeff Johnson295189b2012-06-20 16:38:30 -0700265} tSirAssocRsp, *tpSirAssocRsp;
266
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800267#if defined(FEATURE_WLAN_ESE_UPLOAD)
268// Structure to hold Ese Beacon report mandatory IEs
269typedef struct sSirEseBcnReportMandatoryIe
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800270{
271 tSirMacSSid ssId;
272 tSirMacRateSet supportedRates;
273 tSirMacFHParamSet fhParamSet;
274 tSirMacDsParamSetIE dsParamSet;
275 tSirMacCfParamSet cfParamSet;
276 tSirMacIBSSParams ibssParamSet;
277 tSirMacTim tim;
278 tSirMacRRMEnabledCap rmEnabledCapabilities;
279
280 tANI_U8 ssidPresent;
281 tANI_U8 suppRatesPresent;
282 tANI_U8 fhParamPresent;
283 tANI_U8 dsParamsPresent;
284 tANI_U8 cfPresent;
285 tANI_U8 ibssParamPresent;
286 tANI_U8 timPresent;
Varun Reddy Yeturucf02bc22013-12-06 18:18:50 -0800287 tANI_U8 rrmPresent;
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800288} tSirEseBcnReportMandatoryIe, *tpSirEseBcnReportMandatoryIe;
289#endif /* FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800290
Jeff Johnson295189b2012-06-20 16:38:30 -0700291tANI_U8
292sirIsPropCapabilityEnabled(struct sAniSirGlobal *pMac, tANI_U32 bitnum);
293
294tSirRetStatus
295sirGetCfgPropCaps(struct sAniSirGlobal *, tANI_U16 *);
296
297void dot11fLog(tpAniSirGlobal pMac, int nSev, const char *lpszFormat, ...);
298
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800299#define CFG_GET_INT(nStatus, pMac, nItem, cfg ) do { \
300 (nStatus) = wlan_cfgGetInt( (pMac), (nItem), & (cfg) ); \
301 if ( eSIR_SUCCESS != (nStatus) ) \
302 { \
303 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700304 #nItem " from CFG (%d)."), \
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800305 (nStatus) ); \
306 return nStatus; \
307 } \
308 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700309
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800310#define CFG_GET_INT_NO_STATUS(nStatus, pMac, nItem, cfg ) do { \
311 (nStatus) = wlan_cfgGetInt( (pMac), (nItem), & (cfg) ); \
312 if ( eSIR_SUCCESS != (nStatus) ) \
313 { \
314 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700315 #nItem " from CFG (%d)."), \
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800316 (nStatus) ); \
317 return; \
318 } \
319 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700320
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800321#define CFG_GET_STR(nStatus, pMac, nItem, cfg, nCfg, nMaxCfg) do { \
322 (nCfg) = (nMaxCfg); \
323 (nStatus) = wlan_cfgGetStr( (pMac), (nItem), (cfg), & (nCfg) ); \
324 if ( eSIR_SUCCESS != (nStatus) ) \
325 { \
326 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700327 #nItem " from CFG (%d)."), \
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800328 (nStatus) ); \
329 return nStatus; \
330 } \
331 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700332
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800333#define CFG_GET_STR_NO_STATUS(nStatus, pMac, nItem, cfg, nCfg, \
334 nMaxCfg) do { \
335 (nCfg) = (nMaxCfg); \
336 (nStatus) = wlan_cfgGetStr( (pMac), (nItem), (cfg), & (nCfg) ); \
337 if ( eSIR_SUCCESS != (nStatus) ) \
338 { \
339 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700340 #nItem " from CFG (%d)."), \
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800341 (nStatus) ); \
342 return; \
343 } \
344 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700345
346void swapBitField16(tANI_U16 in, tANI_U16 *out);
347
348// Currently implemented as "shims" between callers & the new framesc-
349// generated code:
350
351tSirRetStatus
352sirConvertProbeReqFrame2Struct(struct sAniSirGlobal *pMac,
353 tANI_U8 *frame,
354 tANI_U32 len,
355 tpSirProbeReq probe);
356
357tSirRetStatus
358sirConvertProbeFrame2Struct(struct sAniSirGlobal *pMac, tANI_U8 *frame,
359 tANI_U32 len,
360 tpSirProbeRespBeacon probe);
361
362tSirRetStatus
363sirConvertAssocReqFrame2Struct(struct sAniSirGlobal *pMac,
364 tANI_U8 * frame,
365 tANI_U32 len,
366 tpSirAssocReq assoc);
367
368tSirRetStatus
369sirConvertAssocRespFrame2Struct(struct sAniSirGlobal *pMac,
370 tANI_U8 * frame,
371 tANI_U32 len,
372 tpSirAssocRsp assoc);
373
374tSirRetStatus
375sirConvertReassocReqFrame2Struct(struct sAniSirGlobal *pMac,
376 tANI_U8 * frame,
377 tANI_U32 len,
378 tpSirAssocReq assoc);
379
380tSirRetStatus
381sirParseBeaconIE(struct sAniSirGlobal *pMac,
382 tpSirProbeRespBeacon pBeaconStruct,
383 tANI_U8 *pPayload,
384 tANI_U32 payloadLength);
385
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800386#if defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800387tSirRetStatus
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800388sirFillBeaconMandatoryIEforEseBcnReport(tpAniSirGlobal pMac,
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800389 tANI_U8 *pPayload,
390 const tANI_U32 payloadLength,
391 tANI_U8 **outIeBuf,
392 tANI_U32 *pOutIeLen);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800393#endif /* FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800394
Jeff Johnson295189b2012-06-20 16:38:30 -0700395tSirRetStatus
396sirConvertBeaconFrame2Struct(struct sAniSirGlobal *pMac,
397 tANI_U8 *pBeaconFrame,
398 tpSirProbeRespBeacon pBeaconStruct);
399
400tSirRetStatus
401sirConvertAuthFrame2Struct(struct sAniSirGlobal *pMac,
402 tANI_U8 * frame,
403 tANI_U32 len,
404 tpSirMacAuthFrameBody auth);
405
406tSirRetStatus
407sirConvertAddtsReq2Struct(struct sAniSirGlobal *pMac,
408 tANI_U8 *frame,
409 tANI_U32 len,
410 tSirAddtsReqInfo *addTs);
411
412tSirRetStatus
413sirConvertAddtsRsp2Struct(struct sAniSirGlobal *pMac,
414 tANI_U8 *frame,
415 tANI_U32 len,
416 tSirAddtsRspInfo *addts);
417
418tSirRetStatus
419sirConvertDeltsReq2Struct(struct sAniSirGlobal *pMac,
420 tANI_U8 *frame,
421 tANI_U32 len,
422 tSirDeltsReqInfo *delTs);
423
424#ifdef ANI_SUPPORT_11H
425tSirRetStatus
426sirConvertTpcReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *,
427 tpSirMacTpcReqActionFrame, tANI_U32);
428
429tSirRetStatus
430sirConvertMeasReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *,
431 tpSirMacMeasReqActionFrame, tANI_U32);
432#endif
433
434
435/**
436 * \brief Populated a tDot11fFfCapabilities
437 *
438 * \sa PopulatedDot11fCapabilities2
439 *
440 *
441 * \param pMac Pointer to the global MAC datastructure
442 *
443 * \param pDot11f Address of a tDot11fFfCapabilities to be filled in
444 *
445 *
446 * \note If SIR_MAC_PROP_CAPABILITY_11EQOS is enabled, we'll clear the QOS
447 * bit in pDot11f
448 *
449 *
450 */
451
452tSirRetStatus
453PopulateDot11fCapabilities(tpAniSirGlobal pMac,
454 tDot11fFfCapabilities *pDot11f,
455 tpPESession psessionEntry);
456
457/**
458 * \brief Populated a tDot11fFfCapabilities
459 *
460 * \sa PopulatedDot11fCapabilities2
461 *
462 *
463 * \param pMac Pointer to the global MAC datastructure
464 *
465 * \param pDot11f Address of a tDot11fFfCapabilities to be filled in
466 *
467 * \param pSta Pointer to a tDphHashNode representing a peer
468 *
469 *
470 * \note If SIR_MAC_PROP_CAPABILITY_11EQOS is enabled on our peer, we'll
471 * clear the QOS bit in pDot11f
472 *
473 *
474 */
475
476struct sDphHashNode;
477
478tSirRetStatus
479PopulateDot11fCapabilities2(tpAniSirGlobal pMac,
480 tDot11fFfCapabilities *pDot11f,
481 struct sDphHashNode *pSta,
482 tpPESession psessionEntry);
483
484/// Populate a tDot11fIEChanSwitchAnn
485void
486PopulateDot11fChanSwitchAnn(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700487 tDot11fIEChanSwitchAnn *pDot11f,
488 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700489
490/// Populate a tDot11fIEChanSwitchAnn
491void
492PopulateDot11fExtChanSwitchAnn(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700493 tDot11fIEExtChanSwitchAnn *pDot11f,
494 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700495
496/// Populate a tDot11fIECountry
497tSirRetStatus
498PopulateDot11fCountry(tpAniSirGlobal pMac,
499 tDot11fIECountry *pDot11f, tpPESession psessionEntry);
500
501/// Populated a PopulateDot11fDSParams
502tSirRetStatus
503PopulateDot11fDSParams(tpAniSirGlobal pMac,
504 tDot11fIEDSParams *pDot11f, tANI_U8 channel,
505 tpPESession psessionEntry);
506
507
508/// Populated a tDot11fIEEDCAParamSet
509void
510PopulateDot11fEDCAParamSet(tpAniSirGlobal pMac,
511 tDot11fIEEDCAParamSet *pDot11f,
512 tpPESession psessionEntry);
513
Jeff Johnson295189b2012-06-20 16:38:30 -0700514tSirRetStatus
515PopulateDot11fERPInfo(tpAniSirGlobal pMac,
516 tDot11fIEERPInfo *pDot11f, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700517
518tSirRetStatus
519PopulateDot11fExtSuppRates(tpAniSirGlobal pMac,
520 tANI_U8 nChannelNum, tDot11fIEExtSuppRates *pDot11f,
521 tpPESession psessionEntry);
522
523#if defined WLAN_FEATURE_VOWIFI
524tSirRetStatus
525PopulateDot11fBeaconReport(tpAniSirGlobal pMac,
526 tDot11fIEMeasurementReport *pDot11f,
527 tSirMacBeaconReport *pBeaconReport );
528#endif
529
530/**
531 * \brief Populate a tDot11fIEExtSuppRates
532 *
533 *
534 * \param pMac Pointer to the global MAC datastructure
535 *
536 * \param nChannelNum Channel on which the enclosing frame will be going out
537 *
538 * \param pDot11f Address of a tDot11fIEExtSuppRates struct to be filled in.
539 *
540 *
541 * This method is a NOP if the channel is greater than 14.
542 *
543 *
544 */
545
546tSirRetStatus
547PopulateDot11fExtSuppRates1(tpAniSirGlobal pMac,
548 tANI_U8 nChannelNum,
549 tDot11fIEExtSuppRates *pDot11f);
550
551tSirRetStatus
552PopulateDot11fHCF(tpAniSirGlobal pMac,
553 tANI_U32 capEnable,
554 tDot11fIEHCF *pDot11f);
555
556tSirRetStatus
557PopulateDot11fHTCaps(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700558 tpPESession psessionEntry,
559 tDot11fIEHTCaps *pDot11f);
Jeff Johnson295189b2012-06-20 16:38:30 -0700560
Jeff Johnson295189b2012-06-20 16:38:30 -0700561tSirRetStatus
562PopulateDot11fHTInfo(tpAniSirGlobal pMac,
563 tDot11fIEHTInfo *pDot11f,
564 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700565
566void PopulateDot11fIBSSParams(tpAniSirGlobal pMac,
567 tDot11fIEIBSSParams *pDot11f, tpPESession psessionEntry);
568
569#ifdef ANI_SUPPORT_11H
570tSirRetStatus
571PopulateDot11fMeasurementReport0(tpAniSirGlobal pMac,
572 tpSirMacMeasReqActionFrame pReq,
573 tDot11fIEMeasurementReport *pDot11f);
574
575/// Populate a tDot11fIEMeasurementReport when the report type is CCA
576tSirRetStatus
577PopulateDot11fMeasurementReport1(tpAniSirGlobal pMac,
578 tpSirMacMeasReqActionFrame pReq,
579 tDot11fIEMeasurementReport *pDot11f);
580
581/// Populate a tDot11fIEMeasurementReport when the report type is RPI Hist
582tSirRetStatus
583PopulateDot11fMeasurementReport2(tpAniSirGlobal pMac,
584 tpSirMacMeasReqActionFrame pReq,
585 tDot11fIEMeasurementReport *pDot11f);
586#endif //ANI_SUPPORT_11H
587
588/// Populate a tDot11fIEPowerCaps
589void
590PopulateDot11fPowerCaps(tpAniSirGlobal pMac,
591 tDot11fIEPowerCaps *pCaps,
592 tANI_U8 nAssocType,tpPESession psessionEntry);
593
594/// Populate a tDot11fIEPowerConstraints
595tSirRetStatus
596PopulateDot11fPowerConstraints(tpAniSirGlobal pMac,
597 tDot11fIEPowerConstraints *pDot11f);
598
599tSirRetStatus
600PopulateDot11fPropCapability(tpAniSirGlobal pMac,
601 tANI_U32 capEnable,
602 tDot11fIEPropCapability *pDot11f);
603
604void
605PopulateDot11fPropChannSwitchAnn(tpAniSirGlobal pMac,
606 tANI_U32 capEnable,
607 tDot11fIEPropChannSwitchAnn *pDot11f);
608
609void
610PopulateDot11fPropEDCAParams(tpAniSirGlobal pMac,
611 tANI_U16 caps,
612 tDot11fIEPropEDCAParams *pDot11f);
613
614tSirRetStatus
615PopulateDot11fPropSuppRates(tpAniSirGlobal pMac,
616 tANI_U32 capEnable,
617 tDot11fIEPropSuppRates *pDot11f);
618
619void
620PopulateDot11fQOSCapsAp(tpAniSirGlobal pMac,
621 tDot11fIEQOSCapsAp *pDot11f, tpPESession psessionEntry);
622
623void
624PopulateDot11fQOSCapsStation(tpAniSirGlobal pMac,
625 tDot11fIEQOSCapsStation *pDot11f);
626
627tSirRetStatus
628PopulateDot11fRSN(tpAniSirGlobal pMac,
629 tpSirRSNie pRsnIe,
630 tDot11fIERSN *pDot11f);
631
632tSirRetStatus
633PopulateDot11fRSNOpaque( tpAniSirGlobal pMac,
634 tpSirRSNie pRsnIe,
635 tDot11fIERSNOpaque *pDot11f );
636
637#if defined(FEATURE_WLAN_WAPI)
638
639tSirRetStatus
640PopulateDot11fWAPI(tpAniSirGlobal pMac,
641 tpSirRSNie pRsnIe,
642 tDot11fIEWAPI *pDot11f);
643
644tSirRetStatus PopulateDot11fWAPIOpaque( tpAniSirGlobal pMac,
645 tpSirRSNie pRsnIe,
646 tDot11fIEWAPIOpaque *pDot11f );
647
648#endif //defined(FEATURE_WLAN_WAPI)
649
650/// Populate a tDot11fIESSID given a tSirMacSSid
651void
652PopulateDot11fSSID(tpAniSirGlobal pMac,
653 tSirMacSSid *pInternal,
654 tDot11fIESSID *pDot11f);
655
656/// Populate a tDot11fIESSID from CFG
657tSirRetStatus
658PopulateDot11fSSID2(tpAniSirGlobal pMac,
659 tDot11fIESSID *pDot11f);
660
661
662/**
663 * \brief Populate a tDot11fIESchedule
664 *
665 * \sa PopulateDot11fWMMSchedule
666 *
667 *
668 * \param pSchedule Address of a tSirMacScheduleIE struct
669 *
670 * \param pDot11f Address of a tDot11fIESchedule to be filled in
671 *
672 *
673 */
674
675void
676PopulateDot11fSchedule(tSirMacScheduleIE *pSchedule,
677 tDot11fIESchedule *pDot11f);
678
679void
680PopulateDot11fSuppChannels(tpAniSirGlobal pMac,
681 tDot11fIESuppChannels *pDot11f,
682 tANI_U8 nAssocType,tpPESession psessionEntry);
683
684/**
685 * \brief Populated a tDot11fIESuppRates
686 *
687 *
688 * \param pMac Pointer to the global MAC datastructure
689 *
690 * \param nChannelNum Channel the enclosing frame will be going out on; see
691 * below
692 *
693 * \param pDot11f Address of a tDot11fIESuppRates struct to be filled in.
694 *
695 *
696 * If nChannelNum is greater than 13, the supported rates will be
697 * WNI_CFG_SUPPORTED_RATES_11B. If it is less than or equal to 13, the
698 * supported rates will be WNI_CFG_SUPPORTED_RATES_11A. If nChannelNum is
699 * set to the sentinel value POPULATE_DOT11F_RATES_OPERATIONAL, the struct
700 * will be populated with WNI_CFG_OPERATIONAL_RATE_SET.
701 *
702 *
703 */
704
705#define POPULATE_DOT11F_RATES_OPERATIONAL ( 0xff )
706
707tSirRetStatus
708PopulateDot11fSuppRates(tpAniSirGlobal pMac,
709 tANI_U8 nChannelNum,
710 tDot11fIESuppRates *pDot11f,tpPESession);
711
712
713tSirRetStatus PopulateDot11fTPCReport(tpAniSirGlobal pMac,
714 tDot11fIETPCReport *pDot11f,
715 tpPESession psessionEntry);
716
717/// Populate a tDot11FfTSInfo
718void PopulateDot11fTSInfo(tSirMacTSInfo *pInfo,
719 tDot11fFfTSInfo *pDot11f);
720
721
722void PopulateDot11fWMM(tpAniSirGlobal pMac,
723 tDot11fIEWMMInfoAp *pInfo,
724 tDot11fIEWMMParams *pParams,
725 tDot11fIEWMMCaps *pCaps,
726 tpPESession psessionEntry);
727
728void PopulateDot11fWMMCaps(tDot11fIEWMMCaps *pCaps);
729
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800730#if defined(FEATURE_WLAN_ESE)
731// Fill the ESE version IE
732void PopulateDot11fESEVersion(tDot11fIEESEVersion *pESEVersion);
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700733// Fill the Radio Management Capability
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800734void PopulateDot11fESERadMgmtCap(tDot11fIEESERadMgmtCap *pESERadMgmtCap);
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700735// Fill the CCKM IE
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800736tSirRetStatus PopulateDot11fESECckmOpaque( tpAniSirGlobal pMac,
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700737 tpSirCCKMie pCCKMie,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800738 tDot11fIEESECckmOpaque *pDot11f );
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700739
Jeff Johnson295189b2012-06-20 16:38:30 -0700740void PopulateDot11TSRSIE(tpAniSirGlobal pMac,
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800741 tSirMacESETSRSIE *pOld,
742 tDot11fIEESETrafStrmRateSet *pDot11f,
Jeff Johnson295189b2012-06-20 16:38:30 -0700743 tANI_U8 rate_length);
744void PopulateDot11fReAssocTspec(tpAniSirGlobal pMac, tDot11fReAssocRequest *pReassoc, tpPESession psessionEntry);
745#endif
746
747void PopulateDot11fWMMInfoAp(tpAniSirGlobal pMac,
748 tDot11fIEWMMInfoAp *pInfo,
749 tpPESession psessionEntry);
750
751void PopulateDot11fWMMInfoStation(tpAniSirGlobal pMac,
752 tDot11fIEWMMInfoStation *pInfo);
753
Jeff Johnson295189b2012-06-20 16:38:30 -0700754void PopulateDot11fWMMParams(tpAniSirGlobal pMac,
755 tDot11fIEWMMParams *pParams,
756 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700757
758/**
759 * \brief Populate a tDot11fIEWMMSchedule
760 *
761 * \sa PopulatedDot11fSchedule
762 *
763 *
764 * \param pSchedule Address of a tSirMacScheduleIE struct
765 *
766 * \param pDot11f Address of a tDot11fIEWMMSchedule to be filled in
767 *
768 *
769 */
770
771void
772PopulateDot11fWMMSchedule(tSirMacScheduleIE *pSchedule,
773 tDot11fIEWMMSchedule *pDot11f);
774
775tSirRetStatus
776PopulateDot11fWPA(tpAniSirGlobal pMac,
777 tpSirRSNie pRsnIe,
778 tDot11fIEWPA *pDot11f);
779
780tSirRetStatus
781PopulateDot11fWPAOpaque( tpAniSirGlobal pMac,
782 tpSirRSNie pRsnIe,
783 tDot11fIEWPAOpaque *pDot11f );
784
785void
786PopulateDot11fTSPEC(tSirMacTspecIE *pOld,
787 tDot11fIETSPEC *pDot11f);
788
789void
790PopulateDot11fWMMTSPEC(tSirMacTspecIE *pOld,
791 tDot11fIEWMMTSPEC *pDot11f);
792
793tSirRetStatus
794PopulateDot11fTCLAS(tpAniSirGlobal pMac,
795 tSirTclasInfo *pOld,
796 tDot11fIETCLAS *pDot11f);
797
798tSirRetStatus
799PopulateDot11fWMMTCLAS(tpAniSirGlobal pMac,
800 tSirTclasInfo *pOld,
801 tDot11fIEWMMTCLAS *pDot11f);
802
Jeff Johnson295189b2012-06-20 16:38:30 -0700803
804tSirRetStatus PopulateDot11fWsc(tpAniSirGlobal pMac,
805 tDot11fIEWscBeacon *pDot11f);
806
807tSirRetStatus PopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac,
808 tDot11fIEWscBeacon *pDot11f);
809
810tSirRetStatus DePopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac,
811 tDot11fIEWscBeacon *pDot11f);
812
Jeff Johnson295189b2012-06-20 16:38:30 -0700813tSirRetStatus PopulateDot11fProbeResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscProbeRes *pDot11f, tpPESession psessionEntry);
814tSirRetStatus PopulateDot11fAssocResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscAssocRes *pDot11f, tpPESession psessionEntry);
815tSirRetStatus PopulateDot11fBeaconWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscBeacon *pDot11f, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700816
817tSirRetStatus PopulateDot11fWscInProbeRes(tpAniSirGlobal pMac,
818 tDot11fIEWscProbeRes *pDot11f);
819
820tSirRetStatus PopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac,
821 tDot11fIEWscProbeRes *pDot11f);
822
823tSirRetStatus DePopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac,
824 tDot11fIEWscProbeRes *pDot11f);
825
826
827tSirRetStatus PopulateDot11fAssocResWscIE(tpAniSirGlobal pMac,
828 tDot11fIEWscAssocRes *pDot11f,
829 tpSirAssocReq pRcvdAssocReq);
830
Jeff Johnson295189b2012-06-20 16:38:30 -0700831tSirRetStatus PopulateDot11AssocResP2PIE(tpAniSirGlobal pMac,
832 tDot11fIEP2PAssocRes *pDot11f,
833 tpSirAssocReq pRcvdAssocReq);
Jeff Johnson295189b2012-06-20 16:38:30 -0700834
835tSirRetStatus PopulateDot11fWscInAssocRes(tpAniSirGlobal pMac,
836 tDot11fIEWscAssocRes *pDot11f);
837
838
839#if defined WLAN_FEATURE_VOWIFI
840tSirRetStatus PopulateDot11fWFATPC( tpAniSirGlobal pMac,
841 tDot11fIEWFATPC *pDot11f, tANI_U8 txPower, tANI_U8 linkMargin );
842
843tSirRetStatus PopulateDot11fRRMIe( tpAniSirGlobal pMac,
844 tDot11fIERRMEnabledCap *pDot11f,
845 tpPESession psessionEntry );
846#endif
847
848#if defined WLAN_FEATURE_VOWIFI_11R
849void PopulateMDIE( tpAniSirGlobal pMac,
850 tDot11fIEMobilityDomain *pDot11f, tANI_U8 mdie[] );
851void PopulateFTInfo( tpAniSirGlobal pMac,
852 tDot11fIEFTInfo *pDot11f );
853#endif
854
855void PopulateDot11fAssocRspRates ( tpAniSirGlobal pMac, tDot11fIESuppRates *pSupp,
856 tDot11fIEExtSuppRates *pExt, tANI_U16 *_11bRates, tANI_U16 *_11aRates );
857
858int FindIELocation( tpAniSirGlobal pMac,
859 tpSirRSNie pRsnIe,
860 tANI_U8 EID);
861#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700862
863#ifdef WLAN_FEATURE_11AC
864tSirRetStatus
865PopulateDot11fVHTCaps(tpAniSirGlobal pMac, tDot11fIEVHTCaps *pDot11f);
866
867tSirRetStatus
868PopulateDot11fVHTOperation(tpAniSirGlobal pMac, tDot11fIEVHTOperation *pDot11f);
869
870tSirRetStatus
871PopulateDot11fVHTExtBssLoad(tpAniSirGlobal pMac, tDot11fIEVHTExtBssLoad *pDot11f);
872
Mohit Khanna4a70d262012-09-11 16:30:12 -0700873tSirRetStatus
Sandeep Puligilla60342762014-01-30 21:05:37 +0530874PopulateDot11fExtCap(tpAniSirGlobal pMac, tDot11fIEExtCap * pDot11f,
875 tPESession *sessionEntry);
Mohit Khanna4a70d262012-09-11 16:30:12 -0700876
877tSirRetStatus
878PopulateDot11fOperatingMode(tpAniSirGlobal pMac, tDot11fIEOperatingMode *pDot11f, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700879
880void
881PopulateDot11fWiderBWChanSwitchAnn(tpAniSirGlobal pMac,
882 tDot11fIEWiderBWChanSwitchAnn *pDot11f,
883 tpPESession psessionEntry);
Jeff Johnsone7245742012-09-05 17:12:55 -0700884#endif
Chet Lanctot8cecea22014-02-11 19:09:36 -0800885
886void PopulateDot11fTimeoutInterval( tpAniSirGlobal pMac,
887 tDot11fIETimeoutInterval *pDot11f,
888 tANI_U8 type, tANI_U32 value );
889