blob: 6502496c212cb2b95bdb4bd5be4593afac601e7c [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
66typedef struct sSirCountryInformation
67{
68 tANI_U8 countryString[COUNTRY_STRING_LENGTH];
69 tANI_U8 numIntervals; //number of channel intervals
70 struct channelPowerLim
71 {
72 tANI_U8 channelNumber;
73 tANI_U8 numChannel;
74 tANI_U8 maxTransmitPower;
75 } channelTransmitPower[COUNTRY_INFO_MAX_CHANNEL];
76} tSirCountryInformation,*tpSirCountryInformation;
77
78
79/// Structure common to Beaons & Probe Responses
80typedef struct sSirProbeRespBeacon
81{
82 tSirMacTimeStamp timeStamp;
83 tANI_U16 beaconInterval;
84 tSirMacCapabilityInfo capabilityInfo;
85
86 tSirMacSSid ssId;
87 tSirMacRateSet supportedRates;
88 tSirMacRateSet extendedRates;
89 tSirMacChanNum channelNumber;
90 tSirMacCfParamSet cfParamSet;
91 tSirMacTim tim;
92 tSirMacEdcaParamSetIE edcaParams;
93 tSirMacQosCapabilityIE qosCapability;
94
95 tSirCountryInformation countryInfoParam;
96 tSirMacWpaInfo wpa;
97 tSirMacRsnInfo rsn;
98
99 tSirMacErpInfo erpIEInfo;
100
101 tSirPropIEStruct propIEinfo;
102 tDot11fIEPowerConstraints localPowerConstraint;
103 tDot11fIETPCReport tpcReport;
104 tDot11fIEChanSwitchAnn channelSwitchIE;
105 tDot11fIEExtChanSwitchAnn extChannelSwitchIE;
106 tSirMacAddr bssid;
107 tDot11fIEQuiet quietIE;
108 tDot11fIEHTCaps HTCaps;
109 tDot11fIEHTInfo HTInfo;
110#ifdef WLAN_FEATURE_P2P
111 tDot11fIEP2PProbeRes P2PProbeRes;
112#endif
113#ifdef WLAN_FEATURE_VOWIFI_11R
114 tANI_U8 mdie[SIR_MDIE_SIZE];
115#endif
116#ifdef FEATURE_WLAN_CCX
117 tDot11fIECCXTxmitPower ccxTxPwr;
118 tDot11fIEQBSSLoad QBSSLoad;
119#endif
120 tANI_U8 ssidPresent;
121 tANI_U8 suppRatesPresent;
122 tANI_U8 extendedRatesPresent;
123 tANI_U8 cfPresent;
124 tANI_U8 dsParamsPresent;
125 tANI_U8 timPresent;
126
127 tANI_U8 edcaPresent;
128 tANI_U8 qosCapabilityPresent;
129 tANI_U8 wmeEdcaPresent;
130 tANI_U8 wmeInfoPresent;
131 tANI_U8 wsmCapablePresent;
132
133 tANI_U8 countryInfoPresent;
134 tANI_U8 wpaPresent;
135 tANI_U8 rsnPresent;
136 tANI_U8 erpPresent;
137 tANI_U8 channelSwitchPresent;
138 tANI_U8 extChannelSwitchPresent;
139 tANI_U8 quietIEPresent;
140 tANI_U8 tpcReportPresent;
141 tANI_U8 powerConstraintPresent;
142
143#ifdef WLAN_FEATURE_VOWIFI_11R
144 tANI_U8 mdiePresent;
145#endif
146
Jeff Johnsone7245742012-09-05 17:12:55 -0700147#ifdef WLAN_FEATURE_11AC
148 tDot11fIEVHTCaps VHTCaps;
149 tDot11fIEVHTOperation VHTOperation;
150 tDot11fIEVHTExtBssLoad VHTExtBssLoad;
Mohit Khanna4a70d262012-09-11 16:30:12 -0700151 tDot11fIEOperatingMode OperatingMode;
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700152 tANI_U8 WiderBWChanSwitchAnnPresent;
153 tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
Jeff Johnsone7245742012-09-05 17:12:55 -0700154#endif
155
Jeff Johnson295189b2012-06-20 16:38:30 -0700156} tSirProbeRespBeacon, *tpSirProbeRespBeacon;
157
158// probe Request structure
159typedef struct sSirProbeReq
160{
161 tSirMacSSid ssId;
162 tSirMacRateSet supportedRates;
163 tSirMacRateSet extendedRates;
164 tDot11fIEWscProbeReq probeReqWscIeInfo;
165 tDot11fIEHTCaps HTCaps;
166 tANI_U8 ssidPresent;
167 tANI_U8 suppRatesPresent;
168 tANI_U8 extendedRatesPresent;
169 tANI_U8 wscIePresent;
170 tANI_U8 p2pIePresent;
Jeff Johnsone7245742012-09-05 17:12:55 -0700171#ifdef WLAN_FEATURE_11AC
172 tDot11fIEVHTCaps VHTCaps;
173#endif
174
Jeff Johnson295189b2012-06-20 16:38:30 -0700175
176} tSirProbeReq, *tpSirProbeReq;
177
178/// Association Request structure (one day to be replaced by
179/// tDot11fAssocRequest)
180typedef struct sSirAssocReq
181{
182
183 tSirMacCapabilityInfo capabilityInfo;
184 tANI_U16 listenInterval;
185 tSirMacAddr currentApAddr; /* only in reassoc frames */
186 tSirMacSSid ssId;
187 tSirMacRateSet supportedRates;
188 tSirMacRateSet extendedRates;
189
190 tSirAddtsReqInfo addtsReq;
191 tSirMacQosCapabilityStaIE qosCapability;
192
193 tSirMacWpaInfo wpa;
194 tSirMacRsnInfo rsn;
195 tSirAddie addIE;
196
197 tSirPropIEStruct propIEinfo;
198 tSirMacPowerCapabilityIE powerCapability;
199 tSirMacSupportedChannelIE supportedChannels;
200 tDot11fIEHTCaps HTCaps;
Jeff Johnson295189b2012-06-20 16:38:30 -0700201 tDot11fIEWMMInfoStation WMMInfoStation;
Jeff Johnson295189b2012-06-20 16:38:30 -0700202 /// This is set if the frame is a reassoc request:
203 tANI_U8 reassocRequest;
204 tANI_U8 ssidPresent;
205 tANI_U8 suppRatesPresent;
206 tANI_U8 extendedRatesPresent;
207
208 tANI_U8 wmeInfoPresent;
209 tANI_U8 qosCapabilityPresent;
210 tANI_U8 addtsPresent;
211 tANI_U8 wsmCapablePresent;
212
213 tANI_U8 wpaPresent;
214 tANI_U8 rsnPresent;
215 tANI_U8 addIEPresent;
216
217 tANI_U8 powerCapabilityPresent;
218 tANI_U8 supportedChannelsPresent;
Jeff Johnson295189b2012-06-20 16:38:30 -0700219 // keeing copy of assoction request received, this is
220 // required for indicating the frame to upper layers
221 tANI_U32 assocReqFrameLength;
222 tANI_U8* assocReqFrame;
Jeff Johnsone7245742012-09-05 17:12:55 -0700223#ifdef WLAN_FEATURE_11AC
224 tDot11fIEVHTCaps VHTCaps;
Mohit Khanna7d5aeb22012-09-11 16:21:57 -0700225 tDot11fIEOperatingMode operMode;
Jeff Johnsone7245742012-09-05 17:12:55 -0700226#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700227} tSirAssocReq, *tpSirAssocReq;
228
229
230/// Association Response structure (one day to be replaced by
231/// tDot11fAssocRequest)
232typedef struct sSirAssocRsp
233{
234
235 tSirMacCapabilityInfo capabilityInfo;
236 tANI_U16 aid;
237 tANI_U16 statusCode;
238 tSirMacRateSet supportedRates;
239 tSirMacRateSet extendedRates;
240 tSirPropIEStruct propIEinfo;
241 tSirMacEdcaParamSetIE edca;
242 tSirAddtsRspInfo addtsRsp;
243 tDot11fIEHTCaps HTCaps;
244 tDot11fIEHTInfo HTInfo;
245#if defined WLAN_FEATURE_VOWIFI_11R
246 tDot11fIEFTInfo FTInfo;
247 tANI_U8 mdie[SIR_MDIE_SIZE];
248 tANI_U8 num_RICData;
249 tDot11fIERICDataDesc RICData[2];
250#endif
251
252#ifdef FEATURE_WLAN_CCX
253 tANI_U8 num_tspecs;
254 tDot11fIEWMMTSPEC TSPECInfo[SIR_CCX_MAX_TSPEC_IES];
255 tSirMacCCXTSMIE tsmIE;
256#endif
257
258 tANI_U8 suppRatesPresent;
259 tANI_U8 extendedRatesPresent;
260
261 tANI_U8 edcaPresent;
262 tANI_U8 wmeEdcaPresent;
263 tANI_U8 addtsPresent;
264 tANI_U8 wsmCapablePresent;
265#if defined WLAN_FEATURE_VOWIFI_11R
266 tANI_U8 ftinfoPresent;
267 tANI_U8 mdiePresent;
268 tANI_U8 ricPresent;
269#endif
270#ifdef FEATURE_WLAN_CCX
271 tANI_U8 tspecPresent;
272 tANI_U8 tsmPresent;
273#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700274#ifdef WLAN_FEATURE_11AC
275 tDot11fIEVHTCaps VHTCaps;
276 tDot11fIEVHTOperation VHTOperation;
277#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700278} tSirAssocRsp, *tpSirAssocRsp;
279
280tANI_U8
281sirIsPropCapabilityEnabled(struct sAniSirGlobal *pMac, tANI_U32 bitnum);
282
283tSirRetStatus
284sirGetCfgPropCaps(struct sAniSirGlobal *, tANI_U16 *);
285
286void dot11fLog(tpAniSirGlobal pMac, int nSev, const char *lpszFormat, ...);
287
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800288#define CFG_GET_INT(nStatus, pMac, nItem, cfg ) do { \
289 (nStatus) = wlan_cfgGetInt( (pMac), (nItem), & (cfg) ); \
290 if ( eSIR_SUCCESS != (nStatus) ) \
291 { \
292 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
293 #nItem " from CFG (%d).\n"), \
294 (nStatus) ); \
295 return nStatus; \
296 } \
297 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700298
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800299#define CFG_GET_INT_NO_STATUS(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 " \
304 #nItem " from CFG (%d).\n"), \
305 (nStatus) ); \
306 return; \
307 } \
308 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700309
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800310#define CFG_GET_STR(nStatus, pMac, nItem, cfg, nCfg, nMaxCfg) do { \
311 (nCfg) = (nMaxCfg); \
312 (nStatus) = wlan_cfgGetStr( (pMac), (nItem), (cfg), & (nCfg) ); \
313 if ( eSIR_SUCCESS != (nStatus) ) \
314 { \
315 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
316 #nItem " from CFG (%d).\n"), \
317 (nStatus) ); \
318 return nStatus; \
319 } \
320 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700321
Madan Mohan Koyyalamudic0d1b3f2012-11-13 10:41:07 -0800322#define CFG_GET_STR_NO_STATUS(nStatus, pMac, nItem, cfg, nCfg, \
323 nMaxCfg) do { \
324 (nCfg) = (nMaxCfg); \
325 (nStatus) = wlan_cfgGetStr( (pMac), (nItem), (cfg), & (nCfg) ); \
326 if ( eSIR_SUCCESS != (nStatus) ) \
327 { \
328 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
329 #nItem " from CFG (%d).\n"), \
330 (nStatus) ); \
331 return; \
332 } \
333 } while (0)
Jeff Johnson295189b2012-06-20 16:38:30 -0700334
335void swapBitField16(tANI_U16 in, tANI_U16 *out);
336
337// Currently implemented as "shims" between callers & the new framesc-
338// generated code:
339
340tSirRetStatus
341sirConvertProbeReqFrame2Struct(struct sAniSirGlobal *pMac,
342 tANI_U8 *frame,
343 tANI_U32 len,
344 tpSirProbeReq probe);
345
346tSirRetStatus
347sirConvertProbeFrame2Struct(struct sAniSirGlobal *pMac, tANI_U8 *frame,
348 tANI_U32 len,
349 tpSirProbeRespBeacon probe);
350
351tSirRetStatus
352sirConvertAssocReqFrame2Struct(struct sAniSirGlobal *pMac,
353 tANI_U8 * frame,
354 tANI_U32 len,
355 tpSirAssocReq assoc);
356
357tSirRetStatus
358sirConvertAssocRespFrame2Struct(struct sAniSirGlobal *pMac,
359 tANI_U8 * frame,
360 tANI_U32 len,
361 tpSirAssocRsp assoc);
362
363tSirRetStatus
364sirConvertReassocReqFrame2Struct(struct sAniSirGlobal *pMac,
365 tANI_U8 * frame,
366 tANI_U32 len,
367 tpSirAssocReq assoc);
368
369tSirRetStatus
370sirParseBeaconIE(struct sAniSirGlobal *pMac,
371 tpSirProbeRespBeacon pBeaconStruct,
372 tANI_U8 *pPayload,
373 tANI_U32 payloadLength);
374
375tSirRetStatus
376sirConvertBeaconFrame2Struct(struct sAniSirGlobal *pMac,
377 tANI_U8 *pBeaconFrame,
378 tpSirProbeRespBeacon pBeaconStruct);
379
380tSirRetStatus
381sirConvertAuthFrame2Struct(struct sAniSirGlobal *pMac,
382 tANI_U8 * frame,
383 tANI_U32 len,
384 tpSirMacAuthFrameBody auth);
385
386tSirRetStatus
387sirConvertAddtsReq2Struct(struct sAniSirGlobal *pMac,
388 tANI_U8 *frame,
389 tANI_U32 len,
390 tSirAddtsReqInfo *addTs);
391
392tSirRetStatus
393sirConvertAddtsRsp2Struct(struct sAniSirGlobal *pMac,
394 tANI_U8 *frame,
395 tANI_U32 len,
396 tSirAddtsRspInfo *addts);
397
398tSirRetStatus
399sirConvertDeltsReq2Struct(struct sAniSirGlobal *pMac,
400 tANI_U8 *frame,
401 tANI_U32 len,
402 tSirDeltsReqInfo *delTs);
403
404#ifdef ANI_SUPPORT_11H
405tSirRetStatus
406sirConvertTpcReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *,
407 tpSirMacTpcReqActionFrame, tANI_U32);
408
409tSirRetStatus
410sirConvertMeasReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *,
411 tpSirMacMeasReqActionFrame, tANI_U32);
412#endif
413
414
415/**
416 * \brief Populated a tDot11fFfCapabilities
417 *
418 * \sa PopulatedDot11fCapabilities2
419 *
420 *
421 * \param pMac Pointer to the global MAC datastructure
422 *
423 * \param pDot11f Address of a tDot11fFfCapabilities to be filled in
424 *
425 *
426 * \note If SIR_MAC_PROP_CAPABILITY_11EQOS is enabled, we'll clear the QOS
427 * bit in pDot11f
428 *
429 *
430 */
431
432tSirRetStatus
433PopulateDot11fCapabilities(tpAniSirGlobal pMac,
434 tDot11fFfCapabilities *pDot11f,
435 tpPESession psessionEntry);
436
437/**
438 * \brief Populated a tDot11fFfCapabilities
439 *
440 * \sa PopulatedDot11fCapabilities2
441 *
442 *
443 * \param pMac Pointer to the global MAC datastructure
444 *
445 * \param pDot11f Address of a tDot11fFfCapabilities to be filled in
446 *
447 * \param pSta Pointer to a tDphHashNode representing a peer
448 *
449 *
450 * \note If SIR_MAC_PROP_CAPABILITY_11EQOS is enabled on our peer, we'll
451 * clear the QOS bit in pDot11f
452 *
453 *
454 */
455
456struct sDphHashNode;
457
458tSirRetStatus
459PopulateDot11fCapabilities2(tpAniSirGlobal pMac,
460 tDot11fFfCapabilities *pDot11f,
461 struct sDphHashNode *pSta,
462 tpPESession psessionEntry);
463
464/// Populate a tDot11fIEChanSwitchAnn
465void
466PopulateDot11fChanSwitchAnn(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700467 tDot11fIEChanSwitchAnn *pDot11f,
468 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700469
470/// Populate a tDot11fIEChanSwitchAnn
471void
472PopulateDot11fExtChanSwitchAnn(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700473 tDot11fIEExtChanSwitchAnn *pDot11f,
474 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700475
476/// Populate a tDot11fIECountry
477tSirRetStatus
478PopulateDot11fCountry(tpAniSirGlobal pMac,
479 tDot11fIECountry *pDot11f, tpPESession psessionEntry);
480
481/// Populated a PopulateDot11fDSParams
482tSirRetStatus
483PopulateDot11fDSParams(tpAniSirGlobal pMac,
484 tDot11fIEDSParams *pDot11f, tANI_U8 channel,
485 tpPESession psessionEntry);
486
487
488/// Populated a tDot11fIEEDCAParamSet
489void
490PopulateDot11fEDCAParamSet(tpAniSirGlobal pMac,
491 tDot11fIEEDCAParamSet *pDot11f,
492 tpPESession psessionEntry);
493
Jeff Johnson295189b2012-06-20 16:38:30 -0700494tSirRetStatus
495PopulateDot11fERPInfo(tpAniSirGlobal pMac,
496 tDot11fIEERPInfo *pDot11f, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700497
498tSirRetStatus
499PopulateDot11fExtSuppRates(tpAniSirGlobal pMac,
500 tANI_U8 nChannelNum, tDot11fIEExtSuppRates *pDot11f,
501 tpPESession psessionEntry);
502
503#if defined WLAN_FEATURE_VOWIFI
504tSirRetStatus
505PopulateDot11fBeaconReport(tpAniSirGlobal pMac,
506 tDot11fIEMeasurementReport *pDot11f,
507 tSirMacBeaconReport *pBeaconReport );
508#endif
509
510/**
511 * \brief Populate a tDot11fIEExtSuppRates
512 *
513 *
514 * \param pMac Pointer to the global MAC datastructure
515 *
516 * \param nChannelNum Channel on which the enclosing frame will be going out
517 *
518 * \param pDot11f Address of a tDot11fIEExtSuppRates struct to be filled in.
519 *
520 *
521 * This method is a NOP if the channel is greater than 14.
522 *
523 *
524 */
525
526tSirRetStatus
527PopulateDot11fExtSuppRates1(tpAniSirGlobal pMac,
528 tANI_U8 nChannelNum,
529 tDot11fIEExtSuppRates *pDot11f);
530
531tSirRetStatus
532PopulateDot11fHCF(tpAniSirGlobal pMac,
533 tANI_U32 capEnable,
534 tDot11fIEHCF *pDot11f);
535
536tSirRetStatus
537PopulateDot11fHTCaps(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700538 tpPESession psessionEntry,
539 tDot11fIEHTCaps *pDot11f);
Jeff Johnson295189b2012-06-20 16:38:30 -0700540
Jeff Johnson295189b2012-06-20 16:38:30 -0700541tSirRetStatus
542PopulateDot11fHTInfo(tpAniSirGlobal pMac,
543 tDot11fIEHTInfo *pDot11f,
544 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700545
546void PopulateDot11fIBSSParams(tpAniSirGlobal pMac,
547 tDot11fIEIBSSParams *pDot11f, tpPESession psessionEntry);
548
549#ifdef ANI_SUPPORT_11H
550tSirRetStatus
551PopulateDot11fMeasurementReport0(tpAniSirGlobal pMac,
552 tpSirMacMeasReqActionFrame pReq,
553 tDot11fIEMeasurementReport *pDot11f);
554
555/// Populate a tDot11fIEMeasurementReport when the report type is CCA
556tSirRetStatus
557PopulateDot11fMeasurementReport1(tpAniSirGlobal pMac,
558 tpSirMacMeasReqActionFrame pReq,
559 tDot11fIEMeasurementReport *pDot11f);
560
561/// Populate a tDot11fIEMeasurementReport when the report type is RPI Hist
562tSirRetStatus
563PopulateDot11fMeasurementReport2(tpAniSirGlobal pMac,
564 tpSirMacMeasReqActionFrame pReq,
565 tDot11fIEMeasurementReport *pDot11f);
566#endif //ANI_SUPPORT_11H
567
568/// Populate a tDot11fIEPowerCaps
569void
570PopulateDot11fPowerCaps(tpAniSirGlobal pMac,
571 tDot11fIEPowerCaps *pCaps,
572 tANI_U8 nAssocType,tpPESession psessionEntry);
573
574/// Populate a tDot11fIEPowerConstraints
575tSirRetStatus
576PopulateDot11fPowerConstraints(tpAniSirGlobal pMac,
577 tDot11fIEPowerConstraints *pDot11f);
578
579tSirRetStatus
580PopulateDot11fPropCapability(tpAniSirGlobal pMac,
581 tANI_U32 capEnable,
582 tDot11fIEPropCapability *pDot11f);
583
584void
585PopulateDot11fPropChannSwitchAnn(tpAniSirGlobal pMac,
586 tANI_U32 capEnable,
587 tDot11fIEPropChannSwitchAnn *pDot11f);
588
589void
590PopulateDot11fPropEDCAParams(tpAniSirGlobal pMac,
591 tANI_U16 caps,
592 tDot11fIEPropEDCAParams *pDot11f);
593
594tSirRetStatus
595PopulateDot11fPropSuppRates(tpAniSirGlobal pMac,
596 tANI_U32 capEnable,
597 tDot11fIEPropSuppRates *pDot11f);
598
599void
600PopulateDot11fQOSCapsAp(tpAniSirGlobal pMac,
601 tDot11fIEQOSCapsAp *pDot11f, tpPESession psessionEntry);
602
603void
604PopulateDot11fQOSCapsStation(tpAniSirGlobal pMac,
605 tDot11fIEQOSCapsStation *pDot11f);
606
607tSirRetStatus
608PopulateDot11fRSN(tpAniSirGlobal pMac,
609 tpSirRSNie pRsnIe,
610 tDot11fIERSN *pDot11f);
611
612tSirRetStatus
613PopulateDot11fRSNOpaque( tpAniSirGlobal pMac,
614 tpSirRSNie pRsnIe,
615 tDot11fIERSNOpaque *pDot11f );
616
617#if defined(FEATURE_WLAN_WAPI)
618
619tSirRetStatus
620PopulateDot11fWAPI(tpAniSirGlobal pMac,
621 tpSirRSNie pRsnIe,
622 tDot11fIEWAPI *pDot11f);
623
624tSirRetStatus PopulateDot11fWAPIOpaque( tpAniSirGlobal pMac,
625 tpSirRSNie pRsnIe,
626 tDot11fIEWAPIOpaque *pDot11f );
627
628#endif //defined(FEATURE_WLAN_WAPI)
629
630/// Populate a tDot11fIESSID given a tSirMacSSid
631void
632PopulateDot11fSSID(tpAniSirGlobal pMac,
633 tSirMacSSid *pInternal,
634 tDot11fIESSID *pDot11f);
635
636/// Populate a tDot11fIESSID from CFG
637tSirRetStatus
638PopulateDot11fSSID2(tpAniSirGlobal pMac,
639 tDot11fIESSID *pDot11f);
640
641
642/**
643 * \brief Populate a tDot11fIESchedule
644 *
645 * \sa PopulateDot11fWMMSchedule
646 *
647 *
648 * \param pSchedule Address of a tSirMacScheduleIE struct
649 *
650 * \param pDot11f Address of a tDot11fIESchedule to be filled in
651 *
652 *
653 */
654
655void
656PopulateDot11fSchedule(tSirMacScheduleIE *pSchedule,
657 tDot11fIESchedule *pDot11f);
658
659void
660PopulateDot11fSuppChannels(tpAniSirGlobal pMac,
661 tDot11fIESuppChannels *pDot11f,
662 tANI_U8 nAssocType,tpPESession psessionEntry);
663
664/**
665 * \brief Populated a tDot11fIESuppRates
666 *
667 *
668 * \param pMac Pointer to the global MAC datastructure
669 *
670 * \param nChannelNum Channel the enclosing frame will be going out on; see
671 * below
672 *
673 * \param pDot11f Address of a tDot11fIESuppRates struct to be filled in.
674 *
675 *
676 * If nChannelNum is greater than 13, the supported rates will be
677 * WNI_CFG_SUPPORTED_RATES_11B. If it is less than or equal to 13, the
678 * supported rates will be WNI_CFG_SUPPORTED_RATES_11A. If nChannelNum is
679 * set to the sentinel value POPULATE_DOT11F_RATES_OPERATIONAL, the struct
680 * will be populated with WNI_CFG_OPERATIONAL_RATE_SET.
681 *
682 *
683 */
684
685#define POPULATE_DOT11F_RATES_OPERATIONAL ( 0xff )
686
687tSirRetStatus
688PopulateDot11fSuppRates(tpAniSirGlobal pMac,
689 tANI_U8 nChannelNum,
690 tDot11fIESuppRates *pDot11f,tpPESession);
691
692
693tSirRetStatus PopulateDot11fTPCReport(tpAniSirGlobal pMac,
694 tDot11fIETPCReport *pDot11f,
695 tpPESession psessionEntry);
696
697/// Populate a tDot11FfTSInfo
698void PopulateDot11fTSInfo(tSirMacTSInfo *pInfo,
699 tDot11fFfTSInfo *pDot11f);
700
701
702void PopulateDot11fWMM(tpAniSirGlobal pMac,
703 tDot11fIEWMMInfoAp *pInfo,
704 tDot11fIEWMMParams *pParams,
705 tDot11fIEWMMCaps *pCaps,
706 tpPESession psessionEntry);
707
708void PopulateDot11fWMMCaps(tDot11fIEWMMCaps *pCaps);
709
710#ifdef FEATURE_WLAN_CCX
711void PopulateDot11TSRSIE(tpAniSirGlobal pMac,
712 tSirMacCCXTSRSIE *pOld,
713 tDot11fIECCXTrafStrmRateSet *pDot11f,
714 tANI_U8 rate_length);
715void PopulateDot11fReAssocTspec(tpAniSirGlobal pMac, tDot11fReAssocRequest *pReassoc, tpPESession psessionEntry);
716#endif
717
718void PopulateDot11fWMMInfoAp(tpAniSirGlobal pMac,
719 tDot11fIEWMMInfoAp *pInfo,
720 tpPESession psessionEntry);
721
722void PopulateDot11fWMMInfoStation(tpAniSirGlobal pMac,
723 tDot11fIEWMMInfoStation *pInfo);
724
Jeff Johnson295189b2012-06-20 16:38:30 -0700725void PopulateDot11fWMMParams(tpAniSirGlobal pMac,
726 tDot11fIEWMMParams *pParams,
727 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700728
729/**
730 * \brief Populate a tDot11fIEWMMSchedule
731 *
732 * \sa PopulatedDot11fSchedule
733 *
734 *
735 * \param pSchedule Address of a tSirMacScheduleIE struct
736 *
737 * \param pDot11f Address of a tDot11fIEWMMSchedule to be filled in
738 *
739 *
740 */
741
742void
743PopulateDot11fWMMSchedule(tSirMacScheduleIE *pSchedule,
744 tDot11fIEWMMSchedule *pDot11f);
745
746tSirRetStatus
747PopulateDot11fWPA(tpAniSirGlobal pMac,
748 tpSirRSNie pRsnIe,
749 tDot11fIEWPA *pDot11f);
750
751tSirRetStatus
752PopulateDot11fWPAOpaque( tpAniSirGlobal pMac,
753 tpSirRSNie pRsnIe,
754 tDot11fIEWPAOpaque *pDot11f );
755
756void
757PopulateDot11fTSPEC(tSirMacTspecIE *pOld,
758 tDot11fIETSPEC *pDot11f);
759
760void
761PopulateDot11fWMMTSPEC(tSirMacTspecIE *pOld,
762 tDot11fIEWMMTSPEC *pDot11f);
763
764tSirRetStatus
765PopulateDot11fTCLAS(tpAniSirGlobal pMac,
766 tSirTclasInfo *pOld,
767 tDot11fIETCLAS *pDot11f);
768
769tSirRetStatus
770PopulateDot11fWMMTCLAS(tpAniSirGlobal pMac,
771 tSirTclasInfo *pOld,
772 tDot11fIEWMMTCLAS *pDot11f);
773
774#if ( WNI_POLARIS_FW_PRODUCT == AP )
775
776tSirRetStatus
777PopulateDot11fCFParams(tpAniSirGlobal pMac,
778 tDot11fFfCapabilities *pCaps,
779 tDot11fIECFParams *pDot11f);
780
781void
782PopulateDot11fQuiet(tpAniSirGlobal pMac,
783 tDot11fIEQuiet *pDot11f);
784
785tSirRetStatus
786PopulateDot11fAPName(tpAniSirGlobal pMac,
787 tANI_U32 capEnable,
788 tDot11fIEAPName *pDot11f);
789
790void
791PopulateDot11fPropQuietBSS(tpAniSirGlobal pMac,
792 tANI_U32 capsEnable,
793 tDot11fIEPropQuietBSS *pDot11f);
794
795void
796PopulateDot11fTrigStaBkScan(tpAniSirGlobal pMac,
797 tANI_U32 capsEnable,
798 tDot11fIETriggerStaBgScan *pDot11f);
799
800#if (WNI_POLARIS_FW_PACKAGE == ADVANCED)
801
802tSirRetStatus
803PopulateDot11fWDS(tpAniSirGlobal pMac,
804 tANI_U32 capEnable,
805 tDot11fIEWDS *pDot11f );
806
807#endif // WNI_POLARIS_FW_PACKAGE == ADVANCED
808
809#endif // WNI_POLARIS_FW_PRODUCT == AP
810
811tSirRetStatus PopulateDot11fWsc(tpAniSirGlobal pMac,
812 tDot11fIEWscBeacon *pDot11f);
813
814tSirRetStatus PopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac,
815 tDot11fIEWscBeacon *pDot11f);
816
817tSirRetStatus DePopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac,
818 tDot11fIEWscBeacon *pDot11f);
819
Jeff Johnson295189b2012-06-20 16:38:30 -0700820tSirRetStatus PopulateDot11fProbeResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscProbeRes *pDot11f, tpPESession psessionEntry);
821tSirRetStatus PopulateDot11fAssocResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscAssocRes *pDot11f, tpPESession psessionEntry);
822tSirRetStatus PopulateDot11fBeaconWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscBeacon *pDot11f, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700823
824tSirRetStatus PopulateDot11fWscInProbeRes(tpAniSirGlobal pMac,
825 tDot11fIEWscProbeRes *pDot11f);
826
827tSirRetStatus PopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac,
828 tDot11fIEWscProbeRes *pDot11f);
829
830tSirRetStatus DePopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac,
831 tDot11fIEWscProbeRes *pDot11f);
832
833
834tSirRetStatus PopulateDot11fAssocResWscIE(tpAniSirGlobal pMac,
835 tDot11fIEWscAssocRes *pDot11f,
836 tpSirAssocReq pRcvdAssocReq);
837
838#ifdef WLAN_FEATURE_P2P
839tSirRetStatus PopulateDot11AssocResP2PIE(tpAniSirGlobal pMac,
840 tDot11fIEP2PAssocRes *pDot11f,
841 tpSirAssocReq pRcvdAssocReq);
842#endif
843
844tSirRetStatus PopulateDot11fWscInAssocRes(tpAniSirGlobal pMac,
845 tDot11fIEWscAssocRes *pDot11f);
846
847
848#if defined WLAN_FEATURE_VOWIFI
849tSirRetStatus PopulateDot11fWFATPC( tpAniSirGlobal pMac,
850 tDot11fIEWFATPC *pDot11f, tANI_U8 txPower, tANI_U8 linkMargin );
851
852tSirRetStatus PopulateDot11fRRMIe( tpAniSirGlobal pMac,
853 tDot11fIERRMEnabledCap *pDot11f,
854 tpPESession psessionEntry );
855#endif
856
857#if defined WLAN_FEATURE_VOWIFI_11R
858void PopulateMDIE( tpAniSirGlobal pMac,
859 tDot11fIEMobilityDomain *pDot11f, tANI_U8 mdie[] );
860void PopulateFTInfo( tpAniSirGlobal pMac,
861 tDot11fIEFTInfo *pDot11f );
862#endif
863
864void PopulateDot11fAssocRspRates ( tpAniSirGlobal pMac, tDot11fIESuppRates *pSupp,
865 tDot11fIEExtSuppRates *pExt, tANI_U16 *_11bRates, tANI_U16 *_11aRates );
866
867int FindIELocation( tpAniSirGlobal pMac,
868 tpSirRSNie pRsnIe,
869 tANI_U8 EID);
870#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700871
872#ifdef WLAN_FEATURE_11AC
873tSirRetStatus
874PopulateDot11fVHTCaps(tpAniSirGlobal pMac, tDot11fIEVHTCaps *pDot11f);
875
876tSirRetStatus
877PopulateDot11fVHTOperation(tpAniSirGlobal pMac, tDot11fIEVHTOperation *pDot11f);
878
879tSirRetStatus
880PopulateDot11fVHTExtBssLoad(tpAniSirGlobal pMac, tDot11fIEVHTExtBssLoad *pDot11f);
881
Mohit Khanna4a70d262012-09-11 16:30:12 -0700882tSirRetStatus
883PopulateDot11fExtCap(tpAniSirGlobal pMac, tDot11fIEExtCap * pDot11f);
884
885tSirRetStatus
886PopulateDot11fOperatingMode(tpAniSirGlobal pMac, tDot11fIEOperatingMode *pDot11f, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700887
888void
889PopulateDot11fWiderBWChanSwitchAnn(tpAniSirGlobal pMac,
890 tDot11fIEWiderBWChanSwitchAnn *pDot11f,
891 tpPESession psessionEntry);
Jeff Johnsone7245742012-09-05 17:12:55 -0700892#endif