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