blob: 225b58533ca44121ebf110f50bd6f88c11e3bc68 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, 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/*
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 * Airgo Networks, Inc proprietary. All rights reserved.
44 * This file parserApi.h contains the definitions used
45 * for parsing received 802.11 frames
46 * Author: Chandra Modumudi
47 * Date: 02/11/02
48 * History:-
49 * Date Modified by Modification Information
50 * --------------------------------------------------------------------
51 *
52 */
53#ifndef __PARSE_H__
54#define __PARSE_H__
55
56#include <stdarg.h>
57#include "sirMacPropExts.h"
58#include "dot11f.h"
59#include "limSession.h"
60
61#define COUNTRY_STRING_LENGTH ( 3 )
62#define COUNTRY_INFO_MAX_CHANNEL ( 84 )
63#define MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE (COUNTRY_STRING_LENGTH * COUNTRY_INFO_MAX_CHANNEL)
64#define HIGHEST_24GHZ_CHANNEL_NUM ( 14 )
65
Kiran Kumar Lokere27090372013-07-19 20:13:55 -070066#define IS_24G_CH(__chNum) ((__chNum > 0) && (__chNum < 14))
67#define IS_5G_CH(__chNum) ((__chNum >= 36) && (__chNum <= 165))
68
Jeff Johnson295189b2012-06-20 16:38:30 -070069typedef struct sSirCountryInformation
70{
71 tANI_U8 countryString[COUNTRY_STRING_LENGTH];
72 tANI_U8 numIntervals; //number of channel intervals
73 struct channelPowerLim
74 {
75 tANI_U8 channelNumber;
76 tANI_U8 numChannel;
77 tANI_U8 maxTransmitPower;
78 } channelTransmitPower[COUNTRY_INFO_MAX_CHANNEL];
79} tSirCountryInformation,*tpSirCountryInformation;
80
81
82/// Structure common to Beaons & Probe Responses
83typedef struct sSirProbeRespBeacon
84{
85 tSirMacTimeStamp timeStamp;
86 tANI_U16 beaconInterval;
87 tSirMacCapabilityInfo capabilityInfo;
88
89 tSirMacSSid ssId;
90 tSirMacRateSet supportedRates;
91 tSirMacRateSet extendedRates;
92 tSirMacChanNum channelNumber;
93 tSirMacCfParamSet cfParamSet;
94 tSirMacTim tim;
95 tSirMacEdcaParamSetIE edcaParams;
96 tSirMacQosCapabilityIE qosCapability;
97
98 tSirCountryInformation countryInfoParam;
99 tSirMacWpaInfo wpa;
100 tSirMacRsnInfo rsn;
101
102 tSirMacErpInfo erpIEInfo;
103
104 tSirPropIEStruct propIEinfo;
105 tDot11fIEPowerConstraints localPowerConstraint;
106 tDot11fIETPCReport tpcReport;
107 tDot11fIEChanSwitchAnn channelSwitchIE;
108 tDot11fIEExtChanSwitchAnn extChannelSwitchIE;
109 tSirMacAddr bssid;
110 tDot11fIEQuiet quietIE;
111 tDot11fIEHTCaps HTCaps;
112 tDot11fIEHTInfo HTInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700113 tDot11fIEP2PProbeRes P2PProbeRes;
Jeff Johnson295189b2012-06-20 16:38:30 -0700114#ifdef WLAN_FEATURE_VOWIFI_11R
115 tANI_U8 mdie[SIR_MDIE_SIZE];
116#endif
117#ifdef FEATURE_WLAN_CCX
118 tDot11fIECCXTxmitPower ccxTxPwr;
119 tDot11fIEQBSSLoad QBSSLoad;
120#endif
121 tANI_U8 ssidPresent;
122 tANI_U8 suppRatesPresent;
123 tANI_U8 extendedRatesPresent;
124 tANI_U8 cfPresent;
125 tANI_U8 dsParamsPresent;
126 tANI_U8 timPresent;
127
128 tANI_U8 edcaPresent;
129 tANI_U8 qosCapabilityPresent;
130 tANI_U8 wmeEdcaPresent;
131 tANI_U8 wmeInfoPresent;
132 tANI_U8 wsmCapablePresent;
133
134 tANI_U8 countryInfoPresent;
135 tANI_U8 wpaPresent;
136 tANI_U8 rsnPresent;
137 tANI_U8 erpPresent;
138 tANI_U8 channelSwitchPresent;
139 tANI_U8 extChannelSwitchPresent;
140 tANI_U8 quietIEPresent;
141 tANI_U8 tpcReportPresent;
142 tANI_U8 powerConstraintPresent;
143
144#ifdef WLAN_FEATURE_VOWIFI_11R
145 tANI_U8 mdiePresent;
146#endif
147
Jeff Johnsone7245742012-09-05 17:12:55 -0700148#ifdef WLAN_FEATURE_11AC
149 tDot11fIEVHTCaps VHTCaps;
150 tDot11fIEVHTOperation VHTOperation;
151 tDot11fIEVHTExtBssLoad VHTExtBssLoad;
Mohit Khanna4a70d262012-09-11 16:30:12 -0700152 tDot11fIEOperatingMode OperatingMode;
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700153 tANI_U8 WiderBWChanSwitchAnnPresent;
154 tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
Jeff Johnsone7245742012-09-05 17:12:55 -0700155#endif
Sandeep Puligilla11d49a62014-01-30 12:05:16 +0530156 tDot11fIEOBSSScanParameters OBSSScanParameters;
Jeff Johnson295189b2012-06-20 16:38:30 -0700157} tSirProbeRespBeacon, *tpSirProbeRespBeacon;
158
159// probe Request structure
160typedef struct sSirProbeReq
161{
162 tSirMacSSid ssId;
163 tSirMacRateSet supportedRates;
164 tSirMacRateSet extendedRates;
165 tDot11fIEWscProbeReq probeReqWscIeInfo;
166 tDot11fIEHTCaps HTCaps;
167 tANI_U8 ssidPresent;
168 tANI_U8 suppRatesPresent;
169 tANI_U8 extendedRatesPresent;
170 tANI_U8 wscIePresent;
171 tANI_U8 p2pIePresent;
Jeff Johnsone7245742012-09-05 17:12:55 -0700172#ifdef WLAN_FEATURE_11AC
173 tDot11fIEVHTCaps VHTCaps;
174#endif
175
Jeff Johnson295189b2012-06-20 16:38:30 -0700176
177} tSirProbeReq, *tpSirProbeReq;
178
179/// Association Request structure (one day to be replaced by
180/// tDot11fAssocRequest)
181typedef struct sSirAssocReq
182{
183
184 tSirMacCapabilityInfo capabilityInfo;
185 tANI_U16 listenInterval;
186 tSirMacAddr currentApAddr; /* only in reassoc frames */
187 tSirMacSSid ssId;
188 tSirMacRateSet supportedRates;
189 tSirMacRateSet extendedRates;
190
191 tSirAddtsReqInfo addtsReq;
192 tSirMacQosCapabilityStaIE qosCapability;
193
194 tSirMacWpaInfo wpa;
195 tSirMacRsnInfo rsn;
196 tSirAddie addIE;
197
198 tSirPropIEStruct propIEinfo;
199 tSirMacPowerCapabilityIE powerCapability;
200 tSirMacSupportedChannelIE supportedChannels;
201 tDot11fIEHTCaps HTCaps;
Jeff Johnson295189b2012-06-20 16:38:30 -0700202 tDot11fIEWMMInfoStation WMMInfoStation;
Jeff Johnson295189b2012-06-20 16:38:30 -0700203 /// This is set if the frame is a reassoc request:
204 tANI_U8 reassocRequest;
205 tANI_U8 ssidPresent;
206 tANI_U8 suppRatesPresent;
207 tANI_U8 extendedRatesPresent;
208
209 tANI_U8 wmeInfoPresent;
210 tANI_U8 qosCapabilityPresent;
211 tANI_U8 addtsPresent;
212 tANI_U8 wsmCapablePresent;
213
214 tANI_U8 wpaPresent;
215 tANI_U8 rsnPresent;
216 tANI_U8 addIEPresent;
217
218 tANI_U8 powerCapabilityPresent;
219 tANI_U8 supportedChannelsPresent;
Jeff Johnson295189b2012-06-20 16:38:30 -0700220 // keeing copy of assoction request received, this is
221 // required for indicating the frame to upper layers
222 tANI_U32 assocReqFrameLength;
223 tANI_U8* assocReqFrame;
Jeff Johnsone7245742012-09-05 17:12:55 -0700224#ifdef WLAN_FEATURE_11AC
225 tDot11fIEVHTCaps VHTCaps;
Mohit Khanna7d5aeb22012-09-11 16:21:57 -0700226 tDot11fIEOperatingMode operMode;
Jeff Johnsone7245742012-09-05 17:12:55 -0700227#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700228} tSirAssocReq, *tpSirAssocReq;
229
230
231/// Association Response structure (one day to be replaced by
232/// tDot11fAssocRequest)
233typedef struct sSirAssocRsp
234{
235
236 tSirMacCapabilityInfo capabilityInfo;
237 tANI_U16 aid;
238 tANI_U16 statusCode;
239 tSirMacRateSet supportedRates;
240 tSirMacRateSet extendedRates;
241 tSirPropIEStruct propIEinfo;
242 tSirMacEdcaParamSetIE edca;
243 tSirAddtsRspInfo addtsRsp;
244 tDot11fIEHTCaps HTCaps;
245 tDot11fIEHTInfo HTInfo;
246#if defined WLAN_FEATURE_VOWIFI_11R
247 tDot11fIEFTInfo FTInfo;
248 tANI_U8 mdie[SIR_MDIE_SIZE];
249 tANI_U8 num_RICData;
250 tDot11fIERICDataDesc RICData[2];
251#endif
252
253#ifdef FEATURE_WLAN_CCX
254 tANI_U8 num_tspecs;
255 tDot11fIEWMMTSPEC TSPECInfo[SIR_CCX_MAX_TSPEC_IES];
256 tSirMacCCXTSMIE tsmIE;
257#endif
258
259 tANI_U8 suppRatesPresent;
260 tANI_U8 extendedRatesPresent;
261
262 tANI_U8 edcaPresent;
263 tANI_U8 wmeEdcaPresent;
264 tANI_U8 addtsPresent;
265 tANI_U8 wsmCapablePresent;
266#if defined WLAN_FEATURE_VOWIFI_11R
267 tANI_U8 ftinfoPresent;
268 tANI_U8 mdiePresent;
269 tANI_U8 ricPresent;
270#endif
271#ifdef FEATURE_WLAN_CCX
272 tANI_U8 tspecPresent;
273 tANI_U8 tsmPresent;
274#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700275#ifdef WLAN_FEATURE_11AC
276 tDot11fIEVHTCaps VHTCaps;
277 tDot11fIEVHTOperation VHTOperation;
278#endif
Sandeep Puligilla11d49a62014-01-30 12:05:16 +0530279 tDot11fIEOBSSScanParameters OBSSScanParameters;
Jeff Johnson295189b2012-06-20 16:38:30 -0700280} tSirAssocRsp, *tpSirAssocRsp;
281
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800282#if defined(FEATURE_WLAN_CCX_UPLOAD)
283// Structure to hold CCX Beacon report mandatory IEs
284typedef struct sSirCcxBcnReportMandatoryIe
285{
286 tSirMacSSid ssId;
287 tSirMacRateSet supportedRates;
288 tSirMacFHParamSet fhParamSet;
289 tSirMacDsParamSetIE dsParamSet;
290 tSirMacCfParamSet cfParamSet;
291 tSirMacIBSSParams ibssParamSet;
292 tSirMacTim tim;
293 tSirMacRRMEnabledCap rmEnabledCapabilities;
294
295 tANI_U8 ssidPresent;
296 tANI_U8 suppRatesPresent;
297 tANI_U8 fhParamPresent;
298 tANI_U8 dsParamsPresent;
299 tANI_U8 cfPresent;
300 tANI_U8 ibssParamPresent;
301 tANI_U8 timPresent;
Varun Reddy Yeturucf02bc22013-12-06 18:18:50 -0800302 tANI_U8 rrmPresent;
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800303} tSirCcxBcnReportMandatoryIe, *tpSirCcxBcnReportMandatoryIe;
304#endif /* FEATURE_WLAN_CCX_UPLOAD */
305
Jeff Johnson295189b2012-06-20 16:38:30 -0700306tANI_U8
307sirIsPropCapabilityEnabled(struct sAniSirGlobal *pMac, tANI_U32 bitnum);
308
309tSirRetStatus
310sirGetCfgPropCaps(struct sAniSirGlobal *, tANI_U16 *);
311
312void dot11fLog(tpAniSirGlobal pMac, int nSev, const char *lpszFormat, ...);
313
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800314#define CFG_GET_INT(nStatus, pMac, nItem, cfg ) do { \
315 (nStatus) = wlan_cfgGetInt( (pMac), (nItem), & (cfg) ); \
316 if ( eSIR_SUCCESS != (nStatus) ) \
317 { \
318 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700319 #nItem " from CFG (%d)."), \
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800320 (nStatus) ); \
321 return nStatus; \
322 } \
323 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700324
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800325#define CFG_GET_INT_NO_STATUS(nStatus, pMac, nItem, cfg ) do { \
326 (nStatus) = wlan_cfgGetInt( (pMac), (nItem), & (cfg) ); \
327 if ( eSIR_SUCCESS != (nStatus) ) \
328 { \
329 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700330 #nItem " from CFG (%d)."), \
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800331 (nStatus) ); \
332 return; \
333 } \
334 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700335
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800336#define CFG_GET_STR(nStatus, pMac, nItem, cfg, nCfg, nMaxCfg) do { \
337 (nCfg) = (nMaxCfg); \
338 (nStatus) = wlan_cfgGetStr( (pMac), (nItem), (cfg), & (nCfg) ); \
339 if ( eSIR_SUCCESS != (nStatus) ) \
340 { \
341 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700342 #nItem " from CFG (%d)."), \
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800343 (nStatus) ); \
344 return nStatus; \
345 } \
346 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700347
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800348#define CFG_GET_STR_NO_STATUS(nStatus, pMac, nItem, cfg, nCfg, \
349 nMaxCfg) do { \
350 (nCfg) = (nMaxCfg); \
351 (nStatus) = wlan_cfgGetStr( (pMac), (nItem), (cfg), & (nCfg) ); \
352 if ( eSIR_SUCCESS != (nStatus) ) \
353 { \
354 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
Kiran Kumar Lokereaf882c82013-03-18 16:07:05 -0700355 #nItem " from CFG (%d)."), \
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800356 (nStatus) ); \
357 return; \
358 } \
359 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700360
361void swapBitField16(tANI_U16 in, tANI_U16 *out);
362
363// Currently implemented as "shims" between callers & the new framesc-
364// generated code:
365
366tSirRetStatus
367sirConvertProbeReqFrame2Struct(struct sAniSirGlobal *pMac,
368 tANI_U8 *frame,
369 tANI_U32 len,
370 tpSirProbeReq probe);
371
372tSirRetStatus
373sirConvertProbeFrame2Struct(struct sAniSirGlobal *pMac, tANI_U8 *frame,
374 tANI_U32 len,
375 tpSirProbeRespBeacon probe);
376
377tSirRetStatus
378sirConvertAssocReqFrame2Struct(struct sAniSirGlobal *pMac,
379 tANI_U8 * frame,
380 tANI_U32 len,
381 tpSirAssocReq assoc);
382
383tSirRetStatus
384sirConvertAssocRespFrame2Struct(struct sAniSirGlobal *pMac,
385 tANI_U8 * frame,
386 tANI_U32 len,
387 tpSirAssocRsp assoc);
388
389tSirRetStatus
390sirConvertReassocReqFrame2Struct(struct sAniSirGlobal *pMac,
391 tANI_U8 * frame,
392 tANI_U32 len,
393 tpSirAssocReq assoc);
394
395tSirRetStatus
396sirParseBeaconIE(struct sAniSirGlobal *pMac,
397 tpSirProbeRespBeacon pBeaconStruct,
398 tANI_U8 *pPayload,
399 tANI_U32 payloadLength);
400
Srinivas Girigowda91ccbe82013-11-10 16:37:38 -0800401#if defined(FEATURE_WLAN_CCX_UPLOAD)
402tSirRetStatus
403sirFillBeaconMandatoryIEforCcxBcnReport(tpAniSirGlobal pMac,
404 tANI_U8 *pPayload,
405 const tANI_U32 payloadLength,
406 tANI_U8 **outIeBuf,
407 tANI_U32 *pOutIeLen);
408#endif /* FEATURE_WLAN_CCX_UPLOAD */
409
Jeff Johnson295189b2012-06-20 16:38:30 -0700410tSirRetStatus
411sirConvertBeaconFrame2Struct(struct sAniSirGlobal *pMac,
412 tANI_U8 *pBeaconFrame,
413 tpSirProbeRespBeacon pBeaconStruct);
414
415tSirRetStatus
416sirConvertAuthFrame2Struct(struct sAniSirGlobal *pMac,
417 tANI_U8 * frame,
418 tANI_U32 len,
419 tpSirMacAuthFrameBody auth);
420
421tSirRetStatus
422sirConvertAddtsReq2Struct(struct sAniSirGlobal *pMac,
423 tANI_U8 *frame,
424 tANI_U32 len,
425 tSirAddtsReqInfo *addTs);
426
427tSirRetStatus
428sirConvertAddtsRsp2Struct(struct sAniSirGlobal *pMac,
429 tANI_U8 *frame,
430 tANI_U32 len,
431 tSirAddtsRspInfo *addts);
432
433tSirRetStatus
434sirConvertDeltsReq2Struct(struct sAniSirGlobal *pMac,
435 tANI_U8 *frame,
436 tANI_U32 len,
437 tSirDeltsReqInfo *delTs);
438
439#ifdef ANI_SUPPORT_11H
440tSirRetStatus
441sirConvertTpcReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *,
442 tpSirMacTpcReqActionFrame, tANI_U32);
443
444tSirRetStatus
445sirConvertMeasReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *,
446 tpSirMacMeasReqActionFrame, tANI_U32);
447#endif
448
449
450/**
451 * \brief Populated a tDot11fFfCapabilities
452 *
453 * \sa PopulatedDot11fCapabilities2
454 *
455 *
456 * \param pMac Pointer to the global MAC datastructure
457 *
458 * \param pDot11f Address of a tDot11fFfCapabilities to be filled in
459 *
460 *
461 * \note If SIR_MAC_PROP_CAPABILITY_11EQOS is enabled, we'll clear the QOS
462 * bit in pDot11f
463 *
464 *
465 */
466
467tSirRetStatus
468PopulateDot11fCapabilities(tpAniSirGlobal pMac,
469 tDot11fFfCapabilities *pDot11f,
470 tpPESession psessionEntry);
471
472/**
473 * \brief Populated a tDot11fFfCapabilities
474 *
475 * \sa PopulatedDot11fCapabilities2
476 *
477 *
478 * \param pMac Pointer to the global MAC datastructure
479 *
480 * \param pDot11f Address of a tDot11fFfCapabilities to be filled in
481 *
482 * \param pSta Pointer to a tDphHashNode representing a peer
483 *
484 *
485 * \note If SIR_MAC_PROP_CAPABILITY_11EQOS is enabled on our peer, we'll
486 * clear the QOS bit in pDot11f
487 *
488 *
489 */
490
491struct sDphHashNode;
492
493tSirRetStatus
494PopulateDot11fCapabilities2(tpAniSirGlobal pMac,
495 tDot11fFfCapabilities *pDot11f,
496 struct sDphHashNode *pSta,
497 tpPESession psessionEntry);
498
499/// Populate a tDot11fIEChanSwitchAnn
500void
501PopulateDot11fChanSwitchAnn(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700502 tDot11fIEChanSwitchAnn *pDot11f,
503 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700504
505/// Populate a tDot11fIEChanSwitchAnn
506void
507PopulateDot11fExtChanSwitchAnn(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700508 tDot11fIEExtChanSwitchAnn *pDot11f,
509 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700510
511/// Populate a tDot11fIECountry
512tSirRetStatus
513PopulateDot11fCountry(tpAniSirGlobal pMac,
514 tDot11fIECountry *pDot11f, tpPESession psessionEntry);
515
516/// Populated a PopulateDot11fDSParams
517tSirRetStatus
518PopulateDot11fDSParams(tpAniSirGlobal pMac,
519 tDot11fIEDSParams *pDot11f, tANI_U8 channel,
520 tpPESession psessionEntry);
521
522
523/// Populated a tDot11fIEEDCAParamSet
524void
525PopulateDot11fEDCAParamSet(tpAniSirGlobal pMac,
526 tDot11fIEEDCAParamSet *pDot11f,
527 tpPESession psessionEntry);
528
Jeff Johnson295189b2012-06-20 16:38:30 -0700529tSirRetStatus
530PopulateDot11fERPInfo(tpAniSirGlobal pMac,
531 tDot11fIEERPInfo *pDot11f, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700532
533tSirRetStatus
534PopulateDot11fExtSuppRates(tpAniSirGlobal pMac,
535 tANI_U8 nChannelNum, tDot11fIEExtSuppRates *pDot11f,
536 tpPESession psessionEntry);
537
538#if defined WLAN_FEATURE_VOWIFI
539tSirRetStatus
540PopulateDot11fBeaconReport(tpAniSirGlobal pMac,
541 tDot11fIEMeasurementReport *pDot11f,
542 tSirMacBeaconReport *pBeaconReport );
543#endif
544
545/**
546 * \brief Populate a tDot11fIEExtSuppRates
547 *
548 *
549 * \param pMac Pointer to the global MAC datastructure
550 *
551 * \param nChannelNum Channel on which the enclosing frame will be going out
552 *
553 * \param pDot11f Address of a tDot11fIEExtSuppRates struct to be filled in.
554 *
555 *
556 * This method is a NOP if the channel is greater than 14.
557 *
558 *
559 */
560
561tSirRetStatus
562PopulateDot11fExtSuppRates1(tpAniSirGlobal pMac,
563 tANI_U8 nChannelNum,
564 tDot11fIEExtSuppRates *pDot11f);
565
566tSirRetStatus
567PopulateDot11fHCF(tpAniSirGlobal pMac,
568 tANI_U32 capEnable,
569 tDot11fIEHCF *pDot11f);
570
571tSirRetStatus
572PopulateDot11fHTCaps(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700573 tpPESession psessionEntry,
574 tDot11fIEHTCaps *pDot11f);
Jeff Johnson295189b2012-06-20 16:38:30 -0700575
Jeff Johnson295189b2012-06-20 16:38:30 -0700576tSirRetStatus
577PopulateDot11fHTInfo(tpAniSirGlobal pMac,
578 tDot11fIEHTInfo *pDot11f,
579 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700580
581void PopulateDot11fIBSSParams(tpAniSirGlobal pMac,
582 tDot11fIEIBSSParams *pDot11f, tpPESession psessionEntry);
583
584#ifdef ANI_SUPPORT_11H
585tSirRetStatus
586PopulateDot11fMeasurementReport0(tpAniSirGlobal pMac,
587 tpSirMacMeasReqActionFrame pReq,
588 tDot11fIEMeasurementReport *pDot11f);
589
590/// Populate a tDot11fIEMeasurementReport when the report type is CCA
591tSirRetStatus
592PopulateDot11fMeasurementReport1(tpAniSirGlobal pMac,
593 tpSirMacMeasReqActionFrame pReq,
594 tDot11fIEMeasurementReport *pDot11f);
595
596/// Populate a tDot11fIEMeasurementReport when the report type is RPI Hist
597tSirRetStatus
598PopulateDot11fMeasurementReport2(tpAniSirGlobal pMac,
599 tpSirMacMeasReqActionFrame pReq,
600 tDot11fIEMeasurementReport *pDot11f);
601#endif //ANI_SUPPORT_11H
602
603/// Populate a tDot11fIEPowerCaps
604void
605PopulateDot11fPowerCaps(tpAniSirGlobal pMac,
606 tDot11fIEPowerCaps *pCaps,
607 tANI_U8 nAssocType,tpPESession psessionEntry);
608
609/// Populate a tDot11fIEPowerConstraints
610tSirRetStatus
611PopulateDot11fPowerConstraints(tpAniSirGlobal pMac,
612 tDot11fIEPowerConstraints *pDot11f);
613
614tSirRetStatus
615PopulateDot11fPropCapability(tpAniSirGlobal pMac,
616 tANI_U32 capEnable,
617 tDot11fIEPropCapability *pDot11f);
618
619void
620PopulateDot11fPropChannSwitchAnn(tpAniSirGlobal pMac,
621 tANI_U32 capEnable,
622 tDot11fIEPropChannSwitchAnn *pDot11f);
623
624void
625PopulateDot11fPropEDCAParams(tpAniSirGlobal pMac,
626 tANI_U16 caps,
627 tDot11fIEPropEDCAParams *pDot11f);
628
629tSirRetStatus
630PopulateDot11fPropSuppRates(tpAniSirGlobal pMac,
631 tANI_U32 capEnable,
632 tDot11fIEPropSuppRates *pDot11f);
633
634void
635PopulateDot11fQOSCapsAp(tpAniSirGlobal pMac,
636 tDot11fIEQOSCapsAp *pDot11f, tpPESession psessionEntry);
637
638void
639PopulateDot11fQOSCapsStation(tpAniSirGlobal pMac,
640 tDot11fIEQOSCapsStation *pDot11f);
641
642tSirRetStatus
643PopulateDot11fRSN(tpAniSirGlobal pMac,
644 tpSirRSNie pRsnIe,
645 tDot11fIERSN *pDot11f);
646
647tSirRetStatus
648PopulateDot11fRSNOpaque( tpAniSirGlobal pMac,
649 tpSirRSNie pRsnIe,
650 tDot11fIERSNOpaque *pDot11f );
651
652#if defined(FEATURE_WLAN_WAPI)
653
654tSirRetStatus
655PopulateDot11fWAPI(tpAniSirGlobal pMac,
656 tpSirRSNie pRsnIe,
657 tDot11fIEWAPI *pDot11f);
658
659tSirRetStatus PopulateDot11fWAPIOpaque( tpAniSirGlobal pMac,
660 tpSirRSNie pRsnIe,
661 tDot11fIEWAPIOpaque *pDot11f );
662
663#endif //defined(FEATURE_WLAN_WAPI)
664
665/// Populate a tDot11fIESSID given a tSirMacSSid
666void
667PopulateDot11fSSID(tpAniSirGlobal pMac,
668 tSirMacSSid *pInternal,
669 tDot11fIESSID *pDot11f);
670
671/// Populate a tDot11fIESSID from CFG
672tSirRetStatus
673PopulateDot11fSSID2(tpAniSirGlobal pMac,
674 tDot11fIESSID *pDot11f);
675
676
677/**
678 * \brief Populate a tDot11fIESchedule
679 *
680 * \sa PopulateDot11fWMMSchedule
681 *
682 *
683 * \param pSchedule Address of a tSirMacScheduleIE struct
684 *
685 * \param pDot11f Address of a tDot11fIESchedule to be filled in
686 *
687 *
688 */
689
690void
691PopulateDot11fSchedule(tSirMacScheduleIE *pSchedule,
692 tDot11fIESchedule *pDot11f);
693
694void
695PopulateDot11fSuppChannels(tpAniSirGlobal pMac,
696 tDot11fIESuppChannels *pDot11f,
697 tANI_U8 nAssocType,tpPESession psessionEntry);
698
699/**
700 * \brief Populated a tDot11fIESuppRates
701 *
702 *
703 * \param pMac Pointer to the global MAC datastructure
704 *
705 * \param nChannelNum Channel the enclosing frame will be going out on; see
706 * below
707 *
708 * \param pDot11f Address of a tDot11fIESuppRates struct to be filled in.
709 *
710 *
711 * If nChannelNum is greater than 13, the supported rates will be
712 * WNI_CFG_SUPPORTED_RATES_11B. If it is less than or equal to 13, the
713 * supported rates will be WNI_CFG_SUPPORTED_RATES_11A. If nChannelNum is
714 * set to the sentinel value POPULATE_DOT11F_RATES_OPERATIONAL, the struct
715 * will be populated with WNI_CFG_OPERATIONAL_RATE_SET.
716 *
717 *
718 */
719
720#define POPULATE_DOT11F_RATES_OPERATIONAL ( 0xff )
721
722tSirRetStatus
723PopulateDot11fSuppRates(tpAniSirGlobal pMac,
724 tANI_U8 nChannelNum,
725 tDot11fIESuppRates *pDot11f,tpPESession);
726
727
728tSirRetStatus PopulateDot11fTPCReport(tpAniSirGlobal pMac,
729 tDot11fIETPCReport *pDot11f,
730 tpPESession psessionEntry);
731
732/// Populate a tDot11FfTSInfo
733void PopulateDot11fTSInfo(tSirMacTSInfo *pInfo,
734 tDot11fFfTSInfo *pDot11f);
735
736
737void PopulateDot11fWMM(tpAniSirGlobal pMac,
738 tDot11fIEWMMInfoAp *pInfo,
739 tDot11fIEWMMParams *pParams,
740 tDot11fIEWMMCaps *pCaps,
741 tpPESession psessionEntry);
742
743void PopulateDot11fWMMCaps(tDot11fIEWMMCaps *pCaps);
744
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700745#if defined(FEATURE_WLAN_CCX)
746// Fill the CCX version IE
747void PopulateDot11fCCXVersion(tDot11fIECCXVersion *pCCXVersion);
748// Fill the Radio Management Capability
749void PopulateDot11fCCXRadMgmtCap(tDot11fIECCXRadMgmtCap *pCCXRadMgmtCap);
750// Fill the CCKM IE
751tSirRetStatus PopulateDot11fCCXCckmOpaque( tpAniSirGlobal pMac,
752 tpSirCCKMie pCCKMie,
753 tDot11fIECCXCckmOpaque *pDot11f );
754
Jeff Johnson295189b2012-06-20 16:38:30 -0700755void PopulateDot11TSRSIE(tpAniSirGlobal pMac,
756 tSirMacCCXTSRSIE *pOld,
757 tDot11fIECCXTrafStrmRateSet *pDot11f,
758 tANI_U8 rate_length);
759void PopulateDot11fReAssocTspec(tpAniSirGlobal pMac, tDot11fReAssocRequest *pReassoc, tpPESession psessionEntry);
760#endif
761
762void PopulateDot11fWMMInfoAp(tpAniSirGlobal pMac,
763 tDot11fIEWMMInfoAp *pInfo,
764 tpPESession psessionEntry);
765
766void PopulateDot11fWMMInfoStation(tpAniSirGlobal pMac,
767 tDot11fIEWMMInfoStation *pInfo);
768
Jeff Johnson295189b2012-06-20 16:38:30 -0700769void PopulateDot11fWMMParams(tpAniSirGlobal pMac,
770 tDot11fIEWMMParams *pParams,
771 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700772
773/**
774 * \brief Populate a tDot11fIEWMMSchedule
775 *
776 * \sa PopulatedDot11fSchedule
777 *
778 *
779 * \param pSchedule Address of a tSirMacScheduleIE struct
780 *
781 * \param pDot11f Address of a tDot11fIEWMMSchedule to be filled in
782 *
783 *
784 */
785
786void
787PopulateDot11fWMMSchedule(tSirMacScheduleIE *pSchedule,
788 tDot11fIEWMMSchedule *pDot11f);
789
790tSirRetStatus
791PopulateDot11fWPA(tpAniSirGlobal pMac,
792 tpSirRSNie pRsnIe,
793 tDot11fIEWPA *pDot11f);
794
795tSirRetStatus
796PopulateDot11fWPAOpaque( tpAniSirGlobal pMac,
797 tpSirRSNie pRsnIe,
798 tDot11fIEWPAOpaque *pDot11f );
799
800void
801PopulateDot11fTSPEC(tSirMacTspecIE *pOld,
802 tDot11fIETSPEC *pDot11f);
803
804void
805PopulateDot11fWMMTSPEC(tSirMacTspecIE *pOld,
806 tDot11fIEWMMTSPEC *pDot11f);
807
808tSirRetStatus
809PopulateDot11fTCLAS(tpAniSirGlobal pMac,
810 tSirTclasInfo *pOld,
811 tDot11fIETCLAS *pDot11f);
812
813tSirRetStatus
814PopulateDot11fWMMTCLAS(tpAniSirGlobal pMac,
815 tSirTclasInfo *pOld,
816 tDot11fIEWMMTCLAS *pDot11f);
817
Jeff Johnson295189b2012-06-20 16:38:30 -0700818
819tSirRetStatus PopulateDot11fWsc(tpAniSirGlobal pMac,
820 tDot11fIEWscBeacon *pDot11f);
821
822tSirRetStatus PopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac,
823 tDot11fIEWscBeacon *pDot11f);
824
825tSirRetStatus DePopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac,
826 tDot11fIEWscBeacon *pDot11f);
827
Jeff Johnson295189b2012-06-20 16:38:30 -0700828tSirRetStatus PopulateDot11fProbeResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscProbeRes *pDot11f, tpPESession psessionEntry);
829tSirRetStatus PopulateDot11fAssocResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscAssocRes *pDot11f, tpPESession psessionEntry);
830tSirRetStatus PopulateDot11fBeaconWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscBeacon *pDot11f, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700831
832tSirRetStatus PopulateDot11fWscInProbeRes(tpAniSirGlobal pMac,
833 tDot11fIEWscProbeRes *pDot11f);
834
835tSirRetStatus PopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac,
836 tDot11fIEWscProbeRes *pDot11f);
837
838tSirRetStatus DePopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac,
839 tDot11fIEWscProbeRes *pDot11f);
840
841
842tSirRetStatus PopulateDot11fAssocResWscIE(tpAniSirGlobal pMac,
843 tDot11fIEWscAssocRes *pDot11f,
844 tpSirAssocReq pRcvdAssocReq);
845
Jeff Johnson295189b2012-06-20 16:38:30 -0700846tSirRetStatus PopulateDot11AssocResP2PIE(tpAniSirGlobal pMac,
847 tDot11fIEP2PAssocRes *pDot11f,
848 tpSirAssocReq pRcvdAssocReq);
Jeff Johnson295189b2012-06-20 16:38:30 -0700849
850tSirRetStatus PopulateDot11fWscInAssocRes(tpAniSirGlobal pMac,
851 tDot11fIEWscAssocRes *pDot11f);
852
853
854#if defined WLAN_FEATURE_VOWIFI
855tSirRetStatus PopulateDot11fWFATPC( tpAniSirGlobal pMac,
856 tDot11fIEWFATPC *pDot11f, tANI_U8 txPower, tANI_U8 linkMargin );
857
858tSirRetStatus PopulateDot11fRRMIe( tpAniSirGlobal pMac,
859 tDot11fIERRMEnabledCap *pDot11f,
860 tpPESession psessionEntry );
861#endif
862
863#if defined WLAN_FEATURE_VOWIFI_11R
864void PopulateMDIE( tpAniSirGlobal pMac,
865 tDot11fIEMobilityDomain *pDot11f, tANI_U8 mdie[] );
866void PopulateFTInfo( tpAniSirGlobal pMac,
867 tDot11fIEFTInfo *pDot11f );
868#endif
869
870void PopulateDot11fAssocRspRates ( tpAniSirGlobal pMac, tDot11fIESuppRates *pSupp,
871 tDot11fIEExtSuppRates *pExt, tANI_U16 *_11bRates, tANI_U16 *_11aRates );
872
873int FindIELocation( tpAniSirGlobal pMac,
874 tpSirRSNie pRsnIe,
875 tANI_U8 EID);
876#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700877
878#ifdef WLAN_FEATURE_11AC
879tSirRetStatus
880PopulateDot11fVHTCaps(tpAniSirGlobal pMac, tDot11fIEVHTCaps *pDot11f);
881
882tSirRetStatus
883PopulateDot11fVHTOperation(tpAniSirGlobal pMac, tDot11fIEVHTOperation *pDot11f);
884
885tSirRetStatus
886PopulateDot11fVHTExtBssLoad(tpAniSirGlobal pMac, tDot11fIEVHTExtBssLoad *pDot11f);
887
Mohit Khanna4a70d262012-09-11 16:30:12 -0700888tSirRetStatus
Sandeep Puligilla60342762014-01-30 21:05:37 +0530889PopulateDot11fExtCap(tpAniSirGlobal pMac, tDot11fIEExtCap * pDot11f,
890 tPESession *sessionEntry);
Mohit Khanna4a70d262012-09-11 16:30:12 -0700891
892tSirRetStatus
893PopulateDot11fOperatingMode(tpAniSirGlobal pMac, tDot11fIEOperatingMode *pDot11f, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700894
895void
896PopulateDot11fWiderBWChanSwitchAnn(tpAniSirGlobal pMac,
897 tDot11fIEWiderBWChanSwitchAnn *pDot11f,
898 tpPESession psessionEntry);
Jeff Johnsone7245742012-09-05 17:12:55 -0700899#endif