blob: 29dd5ace8ba1a4d231637ed6d1af6f9f30e37464 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -07003 *
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;
Mohit Khanna7d5aeb22012-09-11 16:21:57 -0700206 tDot11fIEOperatingMode operMode;
Jeff Johnsone7245742012-09-05 17:12:55 -0700207#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700208} tSirAssocReq, *tpSirAssocReq;
209
210
211/// Association Response structure (one day to be replaced by
212/// tDot11fAssocRequest)
213typedef struct sSirAssocRsp
214{
215
216 tSirMacCapabilityInfo capabilityInfo;
217 tANI_U16 aid;
218 tANI_U16 statusCode;
219 tSirMacRateSet supportedRates;
220 tSirMacRateSet extendedRates;
221 tSirPropIEStruct propIEinfo;
222 tSirMacEdcaParamSetIE edca;
223 tSirAddtsRspInfo addtsRsp;
224 tDot11fIEHTCaps HTCaps;
225 tDot11fIEHTInfo HTInfo;
226#if defined WLAN_FEATURE_VOWIFI_11R
227 tDot11fIEFTInfo FTInfo;
228 tANI_U8 mdie[SIR_MDIE_SIZE];
229 tANI_U8 num_RICData;
230 tDot11fIERICDataDesc RICData[2];
231#endif
232
233#ifdef FEATURE_WLAN_CCX
234 tANI_U8 num_tspecs;
235 tDot11fIEWMMTSPEC TSPECInfo[SIR_CCX_MAX_TSPEC_IES];
236 tSirMacCCXTSMIE tsmIE;
237#endif
238
239 tANI_U8 suppRatesPresent;
240 tANI_U8 extendedRatesPresent;
241
242 tANI_U8 edcaPresent;
243 tANI_U8 wmeEdcaPresent;
244 tANI_U8 addtsPresent;
245 tANI_U8 wsmCapablePresent;
246#if defined WLAN_FEATURE_VOWIFI_11R
247 tANI_U8 ftinfoPresent;
248 tANI_U8 mdiePresent;
249 tANI_U8 ricPresent;
250#endif
251#ifdef FEATURE_WLAN_CCX
252 tANI_U8 tspecPresent;
253 tANI_U8 tsmPresent;
254#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700255#ifdef WLAN_FEATURE_11AC
256 tDot11fIEVHTCaps VHTCaps;
257 tDot11fIEVHTOperation VHTOperation;
258#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700259} tSirAssocRsp, *tpSirAssocRsp;
260
261tANI_U8
262sirIsPropCapabilityEnabled(struct sAniSirGlobal *pMac, tANI_U32 bitnum);
263
264tSirRetStatus
265sirGetCfgPropCaps(struct sAniSirGlobal *, tANI_U16 *);
266
267void dot11fLog(tpAniSirGlobal pMac, int nSev, const char *lpszFormat, ...);
268
269#define CFG_GET_INT(nStatus, pMac, nItem, cfg ) \
270 (nStatus) = wlan_cfgGetInt( (pMac), (nItem), & (cfg) ); \
271 if ( eSIR_SUCCESS != (nStatus) ) \
272 { \
273 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
274 #nItem " from CFG (%d).\n"), \
275 (nStatus) ); \
276 return nStatus; \
277 }
278
279#define CFG_GET_INT_NO_STATUS(nStatus, pMac, nItem, cfg ) \
280 (nStatus) = wlan_cfgGetInt( (pMac), (nItem), & (cfg) ); \
281 if ( eSIR_SUCCESS != (nStatus) ) \
282 { \
283 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
284 #nItem " from CFG (%d).\n"), \
285 (nStatus) ); \
286 return; \
287 }
288
289#define CFG_GET_STR(nStatus, pMac, nItem, cfg, nCfg, nMaxCfg) \
290 (nCfg) = (nMaxCfg); \
291 (nStatus) = wlan_cfgGetStr( (pMac), (nItem), (cfg), & (nCfg) ); \
292 if ( eSIR_SUCCESS != (nStatus) ) \
293 { \
294 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
295 #nItem " from CFG (%d).\n"), \
296 (nStatus) ); \
297 return nStatus; \
298 }
299
300#define CFG_GET_STR_NO_STATUS(nStatus, pMac, nItem, cfg, nCfg, \
301 nMaxCfg) \
302 (nCfg) = (nMaxCfg); \
303 (nStatus) = wlan_cfgGetStr( (pMac), (nItem), (cfg), & (nCfg) ); \
304 if ( eSIR_SUCCESS != (nStatus) ) \
305 { \
306 dot11fLog( (pMac), LOGP, FL("Failed to retrieve " \
307 #nItem " from CFG (%d).\n"), \
308 (nStatus) ); \
309 return; \
310 }
311
312void swapBitField16(tANI_U16 in, tANI_U16 *out);
313
314// Currently implemented as "shims" between callers & the new framesc-
315// generated code:
316
317tSirRetStatus
318sirConvertProbeReqFrame2Struct(struct sAniSirGlobal *pMac,
319 tANI_U8 *frame,
320 tANI_U32 len,
321 tpSirProbeReq probe);
322
323tSirRetStatus
324sirConvertProbeFrame2Struct(struct sAniSirGlobal *pMac, tANI_U8 *frame,
325 tANI_U32 len,
326 tpSirProbeRespBeacon probe);
327
328tSirRetStatus
329sirConvertAssocReqFrame2Struct(struct sAniSirGlobal *pMac,
330 tANI_U8 * frame,
331 tANI_U32 len,
332 tpSirAssocReq assoc);
333
334tSirRetStatus
335sirConvertAssocRespFrame2Struct(struct sAniSirGlobal *pMac,
336 tANI_U8 * frame,
337 tANI_U32 len,
338 tpSirAssocRsp assoc);
339
340tSirRetStatus
341sirConvertReassocReqFrame2Struct(struct sAniSirGlobal *pMac,
342 tANI_U8 * frame,
343 tANI_U32 len,
344 tpSirAssocReq assoc);
345
346tSirRetStatus
347sirParseBeaconIE(struct sAniSirGlobal *pMac,
348 tpSirProbeRespBeacon pBeaconStruct,
349 tANI_U8 *pPayload,
350 tANI_U32 payloadLength);
351
352tSirRetStatus
353sirConvertBeaconFrame2Struct(struct sAniSirGlobal *pMac,
354 tANI_U8 *pBeaconFrame,
355 tpSirProbeRespBeacon pBeaconStruct);
356
357tSirRetStatus
358sirConvertAuthFrame2Struct(struct sAniSirGlobal *pMac,
359 tANI_U8 * frame,
360 tANI_U32 len,
361 tpSirMacAuthFrameBody auth);
362
363tSirRetStatus
364sirConvertAddtsReq2Struct(struct sAniSirGlobal *pMac,
365 tANI_U8 *frame,
366 tANI_U32 len,
367 tSirAddtsReqInfo *addTs);
368
369tSirRetStatus
370sirConvertAddtsRsp2Struct(struct sAniSirGlobal *pMac,
371 tANI_U8 *frame,
372 tANI_U32 len,
373 tSirAddtsRspInfo *addts);
374
375tSirRetStatus
376sirConvertDeltsReq2Struct(struct sAniSirGlobal *pMac,
377 tANI_U8 *frame,
378 tANI_U32 len,
379 tSirDeltsReqInfo *delTs);
380
381#ifdef ANI_SUPPORT_11H
382tSirRetStatus
383sirConvertTpcReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *,
384 tpSirMacTpcReqActionFrame, tANI_U32);
385
386tSirRetStatus
387sirConvertMeasReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *,
388 tpSirMacMeasReqActionFrame, tANI_U32);
389#endif
390
391
392/**
393 * \brief Populated a tDot11fFfCapabilities
394 *
395 * \sa PopulatedDot11fCapabilities2
396 *
397 *
398 * \param pMac Pointer to the global MAC datastructure
399 *
400 * \param pDot11f Address of a tDot11fFfCapabilities to be filled in
401 *
402 *
403 * \note If SIR_MAC_PROP_CAPABILITY_11EQOS is enabled, we'll clear the QOS
404 * bit in pDot11f
405 *
406 *
407 */
408
409tSirRetStatus
410PopulateDot11fCapabilities(tpAniSirGlobal pMac,
411 tDot11fFfCapabilities *pDot11f,
412 tpPESession psessionEntry);
413
414/**
415 * \brief Populated a tDot11fFfCapabilities
416 *
417 * \sa PopulatedDot11fCapabilities2
418 *
419 *
420 * \param pMac Pointer to the global MAC datastructure
421 *
422 * \param pDot11f Address of a tDot11fFfCapabilities to be filled in
423 *
424 * \param pSta Pointer to a tDphHashNode representing a peer
425 *
426 *
427 * \note If SIR_MAC_PROP_CAPABILITY_11EQOS is enabled on our peer, we'll
428 * clear the QOS bit in pDot11f
429 *
430 *
431 */
432
433struct sDphHashNode;
434
435tSirRetStatus
436PopulateDot11fCapabilities2(tpAniSirGlobal pMac,
437 tDot11fFfCapabilities *pDot11f,
438 struct sDphHashNode *pSta,
439 tpPESession psessionEntry);
440
441/// Populate a tDot11fIEChanSwitchAnn
442void
443PopulateDot11fChanSwitchAnn(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700444 tDot11fIEChanSwitchAnn *pDot11f,
445 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700446
447/// Populate a tDot11fIEChanSwitchAnn
448void
449PopulateDot11fExtChanSwitchAnn(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700450 tDot11fIEExtChanSwitchAnn *pDot11f,
451 tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700452
453/// Populate a tDot11fIECountry
454tSirRetStatus
455PopulateDot11fCountry(tpAniSirGlobal pMac,
456 tDot11fIECountry *pDot11f, tpPESession psessionEntry);
457
458/// Populated a PopulateDot11fDSParams
459tSirRetStatus
460PopulateDot11fDSParams(tpAniSirGlobal pMac,
461 tDot11fIEDSParams *pDot11f, tANI_U8 channel,
462 tpPESession psessionEntry);
463
464
465/// Populated a tDot11fIEEDCAParamSet
466void
467PopulateDot11fEDCAParamSet(tpAniSirGlobal pMac,
468 tDot11fIEEDCAParamSet *pDot11f,
469 tpPESession psessionEntry);
470
471#ifdef WLAN_SOFTAP_FEATURE
472tSirRetStatus
473PopulateDot11fERPInfo(tpAniSirGlobal pMac,
474 tDot11fIEERPInfo *pDot11f, tpPESession psessionEntry);
475#else
476tSirRetStatus
477PopulateDot11fERPInfo(tpAniSirGlobal pMac,
478 tDot11fIEERPInfo *pDot11f);
479#endif
480
481tSirRetStatus
482PopulateDot11fExtSuppRates(tpAniSirGlobal pMac,
483 tANI_U8 nChannelNum, tDot11fIEExtSuppRates *pDot11f,
484 tpPESession psessionEntry);
485
486#if defined WLAN_FEATURE_VOWIFI
487tSirRetStatus
488PopulateDot11fBeaconReport(tpAniSirGlobal pMac,
489 tDot11fIEMeasurementReport *pDot11f,
490 tSirMacBeaconReport *pBeaconReport );
491#endif
492
493/**
494 * \brief Populate a tDot11fIEExtSuppRates
495 *
496 *
497 * \param pMac Pointer to the global MAC datastructure
498 *
499 * \param nChannelNum Channel on which the enclosing frame will be going out
500 *
501 * \param pDot11f Address of a tDot11fIEExtSuppRates struct to be filled in.
502 *
503 *
504 * This method is a NOP if the channel is greater than 14.
505 *
506 *
507 */
508
509tSirRetStatus
510PopulateDot11fExtSuppRates1(tpAniSirGlobal pMac,
511 tANI_U8 nChannelNum,
512 tDot11fIEExtSuppRates *pDot11f);
513
514tSirRetStatus
515PopulateDot11fHCF(tpAniSirGlobal pMac,
516 tANI_U32 capEnable,
517 tDot11fIEHCF *pDot11f);
518
519tSirRetStatus
520PopulateDot11fHTCaps(tpAniSirGlobal pMac,
Jeff Johnsone7245742012-09-05 17:12:55 -0700521 tpPESession psessionEntry,
522 tDot11fIEHTCaps *pDot11f);
Jeff Johnson295189b2012-06-20 16:38:30 -0700523
524#ifdef WLAN_SOFTAP_FEATURE
525tSirRetStatus
526PopulateDot11fHTInfo(tpAniSirGlobal pMac,
527 tDot11fIEHTInfo *pDot11f,
528 tpPESession psessionEntry);
529#else
530tSirRetStatus
531PopulateDot11fHTInfo(tpAniSirGlobal pMac,
532 tDot11fIEHTInfo *pDot11f);
533#endif
534
535void PopulateDot11fIBSSParams(tpAniSirGlobal pMac,
536 tDot11fIEIBSSParams *pDot11f, tpPESession psessionEntry);
537
538#ifdef ANI_SUPPORT_11H
539tSirRetStatus
540PopulateDot11fMeasurementReport0(tpAniSirGlobal pMac,
541 tpSirMacMeasReqActionFrame pReq,
542 tDot11fIEMeasurementReport *pDot11f);
543
544/// Populate a tDot11fIEMeasurementReport when the report type is CCA
545tSirRetStatus
546PopulateDot11fMeasurementReport1(tpAniSirGlobal pMac,
547 tpSirMacMeasReqActionFrame pReq,
548 tDot11fIEMeasurementReport *pDot11f);
549
550/// Populate a tDot11fIEMeasurementReport when the report type is RPI Hist
551tSirRetStatus
552PopulateDot11fMeasurementReport2(tpAniSirGlobal pMac,
553 tpSirMacMeasReqActionFrame pReq,
554 tDot11fIEMeasurementReport *pDot11f);
555#endif //ANI_SUPPORT_11H
556
557/// Populate a tDot11fIEPowerCaps
558void
559PopulateDot11fPowerCaps(tpAniSirGlobal pMac,
560 tDot11fIEPowerCaps *pCaps,
561 tANI_U8 nAssocType,tpPESession psessionEntry);
562
563/// Populate a tDot11fIEPowerConstraints
564tSirRetStatus
565PopulateDot11fPowerConstraints(tpAniSirGlobal pMac,
566 tDot11fIEPowerConstraints *pDot11f);
567
568tSirRetStatus
569PopulateDot11fPropCapability(tpAniSirGlobal pMac,
570 tANI_U32 capEnable,
571 tDot11fIEPropCapability *pDot11f);
572
573void
574PopulateDot11fPropChannSwitchAnn(tpAniSirGlobal pMac,
575 tANI_U32 capEnable,
576 tDot11fIEPropChannSwitchAnn *pDot11f);
577
578void
579PopulateDot11fPropEDCAParams(tpAniSirGlobal pMac,
580 tANI_U16 caps,
581 tDot11fIEPropEDCAParams *pDot11f);
582
583tSirRetStatus
584PopulateDot11fPropSuppRates(tpAniSirGlobal pMac,
585 tANI_U32 capEnable,
586 tDot11fIEPropSuppRates *pDot11f);
587
588void
589PopulateDot11fQOSCapsAp(tpAniSirGlobal pMac,
590 tDot11fIEQOSCapsAp *pDot11f, tpPESession psessionEntry);
591
592void
593PopulateDot11fQOSCapsStation(tpAniSirGlobal pMac,
594 tDot11fIEQOSCapsStation *pDot11f);
595
596tSirRetStatus
597PopulateDot11fRSN(tpAniSirGlobal pMac,
598 tpSirRSNie pRsnIe,
599 tDot11fIERSN *pDot11f);
600
601tSirRetStatus
602PopulateDot11fRSNOpaque( tpAniSirGlobal pMac,
603 tpSirRSNie pRsnIe,
604 tDot11fIERSNOpaque *pDot11f );
605
606#if defined(FEATURE_WLAN_WAPI)
607
608tSirRetStatus
609PopulateDot11fWAPI(tpAniSirGlobal pMac,
610 tpSirRSNie pRsnIe,
611 tDot11fIEWAPI *pDot11f);
612
613tSirRetStatus PopulateDot11fWAPIOpaque( tpAniSirGlobal pMac,
614 tpSirRSNie pRsnIe,
615 tDot11fIEWAPIOpaque *pDot11f );
616
617#endif //defined(FEATURE_WLAN_WAPI)
618
619/// Populate a tDot11fIESSID given a tSirMacSSid
620void
621PopulateDot11fSSID(tpAniSirGlobal pMac,
622 tSirMacSSid *pInternal,
623 tDot11fIESSID *pDot11f);
624
625/// Populate a tDot11fIESSID from CFG
626tSirRetStatus
627PopulateDot11fSSID2(tpAniSirGlobal pMac,
628 tDot11fIESSID *pDot11f);
629
630
631/**
632 * \brief Populate a tDot11fIESchedule
633 *
634 * \sa PopulateDot11fWMMSchedule
635 *
636 *
637 * \param pSchedule Address of a tSirMacScheduleIE struct
638 *
639 * \param pDot11f Address of a tDot11fIESchedule to be filled in
640 *
641 *
642 */
643
644void
645PopulateDot11fSchedule(tSirMacScheduleIE *pSchedule,
646 tDot11fIESchedule *pDot11f);
647
648void
649PopulateDot11fSuppChannels(tpAniSirGlobal pMac,
650 tDot11fIESuppChannels *pDot11f,
651 tANI_U8 nAssocType,tpPESession psessionEntry);
652
653/**
654 * \brief Populated a tDot11fIESuppRates
655 *
656 *
657 * \param pMac Pointer to the global MAC datastructure
658 *
659 * \param nChannelNum Channel the enclosing frame will be going out on; see
660 * below
661 *
662 * \param pDot11f Address of a tDot11fIESuppRates struct to be filled in.
663 *
664 *
665 * If nChannelNum is greater than 13, the supported rates will be
666 * WNI_CFG_SUPPORTED_RATES_11B. If it is less than or equal to 13, the
667 * supported rates will be WNI_CFG_SUPPORTED_RATES_11A. If nChannelNum is
668 * set to the sentinel value POPULATE_DOT11F_RATES_OPERATIONAL, the struct
669 * will be populated with WNI_CFG_OPERATIONAL_RATE_SET.
670 *
671 *
672 */
673
674#define POPULATE_DOT11F_RATES_OPERATIONAL ( 0xff )
675
676tSirRetStatus
677PopulateDot11fSuppRates(tpAniSirGlobal pMac,
678 tANI_U8 nChannelNum,
679 tDot11fIESuppRates *pDot11f,tpPESession);
680
681
682tSirRetStatus PopulateDot11fTPCReport(tpAniSirGlobal pMac,
683 tDot11fIETPCReport *pDot11f,
684 tpPESession psessionEntry);
685
686/// Populate a tDot11FfTSInfo
687void PopulateDot11fTSInfo(tSirMacTSInfo *pInfo,
688 tDot11fFfTSInfo *pDot11f);
689
690
691void PopulateDot11fWMM(tpAniSirGlobal pMac,
692 tDot11fIEWMMInfoAp *pInfo,
693 tDot11fIEWMMParams *pParams,
694 tDot11fIEWMMCaps *pCaps,
695 tpPESession psessionEntry);
696
697void PopulateDot11fWMMCaps(tDot11fIEWMMCaps *pCaps);
698
699#ifdef FEATURE_WLAN_CCX
700void PopulateDot11TSRSIE(tpAniSirGlobal pMac,
701 tSirMacCCXTSRSIE *pOld,
702 tDot11fIECCXTrafStrmRateSet *pDot11f,
703 tANI_U8 rate_length);
704void PopulateDot11fReAssocTspec(tpAniSirGlobal pMac, tDot11fReAssocRequest *pReassoc, tpPESession psessionEntry);
705#endif
706
707void PopulateDot11fWMMInfoAp(tpAniSirGlobal pMac,
708 tDot11fIEWMMInfoAp *pInfo,
709 tpPESession psessionEntry);
710
711void PopulateDot11fWMMInfoStation(tpAniSirGlobal pMac,
712 tDot11fIEWMMInfoStation *pInfo);
713
714#ifdef WLAN_SOFTAP_FEATURE
715void PopulateDot11fWMMParams(tpAniSirGlobal pMac,
716 tDot11fIEWMMParams *pParams,
717 tpPESession psessionEntry);
718#else
719void PopulateDot11fWMMParams(tpAniSirGlobal pMac,
720 tDot11fIEWMMParams *pParams);
721#endif
722
723/**
724 * \brief Populate a tDot11fIEWMMSchedule
725 *
726 * \sa PopulatedDot11fSchedule
727 *
728 *
729 * \param pSchedule Address of a tSirMacScheduleIE struct
730 *
731 * \param pDot11f Address of a tDot11fIEWMMSchedule to be filled in
732 *
733 *
734 */
735
736void
737PopulateDot11fWMMSchedule(tSirMacScheduleIE *pSchedule,
738 tDot11fIEWMMSchedule *pDot11f);
739
740tSirRetStatus
741PopulateDot11fWPA(tpAniSirGlobal pMac,
742 tpSirRSNie pRsnIe,
743 tDot11fIEWPA *pDot11f);
744
745tSirRetStatus
746PopulateDot11fWPAOpaque( tpAniSirGlobal pMac,
747 tpSirRSNie pRsnIe,
748 tDot11fIEWPAOpaque *pDot11f );
749
750void
751PopulateDot11fTSPEC(tSirMacTspecIE *pOld,
752 tDot11fIETSPEC *pDot11f);
753
754void
755PopulateDot11fWMMTSPEC(tSirMacTspecIE *pOld,
756 tDot11fIEWMMTSPEC *pDot11f);
757
758tSirRetStatus
759PopulateDot11fTCLAS(tpAniSirGlobal pMac,
760 tSirTclasInfo *pOld,
761 tDot11fIETCLAS *pDot11f);
762
763tSirRetStatus
764PopulateDot11fWMMTCLAS(tpAniSirGlobal pMac,
765 tSirTclasInfo *pOld,
766 tDot11fIEWMMTCLAS *pDot11f);
767
768#if ( WNI_POLARIS_FW_PRODUCT == AP )
769
770tSirRetStatus
771PopulateDot11fCFParams(tpAniSirGlobal pMac,
772 tDot11fFfCapabilities *pCaps,
773 tDot11fIECFParams *pDot11f);
774
775void
776PopulateDot11fQuiet(tpAniSirGlobal pMac,
777 tDot11fIEQuiet *pDot11f);
778
779tSirRetStatus
780PopulateDot11fAPName(tpAniSirGlobal pMac,
781 tANI_U32 capEnable,
782 tDot11fIEAPName *pDot11f);
783
784void
785PopulateDot11fPropQuietBSS(tpAniSirGlobal pMac,
786 tANI_U32 capsEnable,
787 tDot11fIEPropQuietBSS *pDot11f);
788
789void
790PopulateDot11fTrigStaBkScan(tpAniSirGlobal pMac,
791 tANI_U32 capsEnable,
792 tDot11fIETriggerStaBgScan *pDot11f);
793
794#if (WNI_POLARIS_FW_PACKAGE == ADVANCED)
795
796tSirRetStatus
797PopulateDot11fWDS(tpAniSirGlobal pMac,
798 tANI_U32 capEnable,
799 tDot11fIEWDS *pDot11f );
800
801#endif // WNI_POLARIS_FW_PACKAGE == ADVANCED
802
803#endif // WNI_POLARIS_FW_PRODUCT == AP
804
805tSirRetStatus PopulateDot11fWsc(tpAniSirGlobal pMac,
806 tDot11fIEWscBeacon *pDot11f);
807
808tSirRetStatus PopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac,
809 tDot11fIEWscBeacon *pDot11f);
810
811tSirRetStatus DePopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac,
812 tDot11fIEWscBeacon *pDot11f);
813
814#ifdef WLAN_SOFTAP_FEATURE
815tSirRetStatus PopulateDot11fProbeResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscProbeRes *pDot11f, tpPESession psessionEntry);
816tSirRetStatus PopulateDot11fAssocResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscAssocRes *pDot11f, tpPESession psessionEntry);
817tSirRetStatus PopulateDot11fBeaconWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscBeacon *pDot11f, tpPESession psessionEntry);
818#endif
819
820tSirRetStatus PopulateDot11fWscInProbeRes(tpAniSirGlobal pMac,
821 tDot11fIEWscProbeRes *pDot11f);
822
823tSirRetStatus PopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac,
824 tDot11fIEWscProbeRes *pDot11f);
825
826tSirRetStatus DePopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac,
827 tDot11fIEWscProbeRes *pDot11f);
828
829
830tSirRetStatus PopulateDot11fAssocResWscIE(tpAniSirGlobal pMac,
831 tDot11fIEWscAssocRes *pDot11f,
832 tpSirAssocReq pRcvdAssocReq);
833
834#ifdef WLAN_FEATURE_P2P
835tSirRetStatus PopulateDot11AssocResP2PIE(tpAniSirGlobal pMac,
836 tDot11fIEP2PAssocRes *pDot11f,
837 tpSirAssocReq pRcvdAssocReq);
838#endif
839
840tSirRetStatus PopulateDot11fWscInAssocRes(tpAniSirGlobal pMac,
841 tDot11fIEWscAssocRes *pDot11f);
842
843
844#if defined WLAN_FEATURE_VOWIFI
845tSirRetStatus PopulateDot11fWFATPC( tpAniSirGlobal pMac,
846 tDot11fIEWFATPC *pDot11f, tANI_U8 txPower, tANI_U8 linkMargin );
847
848tSirRetStatus PopulateDot11fRRMIe( tpAniSirGlobal pMac,
849 tDot11fIERRMEnabledCap *pDot11f,
850 tpPESession psessionEntry );
851#endif
852
853#if defined WLAN_FEATURE_VOWIFI_11R
854void PopulateMDIE( tpAniSirGlobal pMac,
855 tDot11fIEMobilityDomain *pDot11f, tANI_U8 mdie[] );
856void PopulateFTInfo( tpAniSirGlobal pMac,
857 tDot11fIEFTInfo *pDot11f );
858#endif
859
860void PopulateDot11fAssocRspRates ( tpAniSirGlobal pMac, tDot11fIESuppRates *pSupp,
861 tDot11fIEExtSuppRates *pExt, tANI_U16 *_11bRates, tANI_U16 *_11aRates );
862
863int FindIELocation( tpAniSirGlobal pMac,
864 tpSirRSNie pRsnIe,
865 tANI_U8 EID);
866#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700867
868#ifdef WLAN_FEATURE_11AC
869tSirRetStatus
870PopulateDot11fVHTCaps(tpAniSirGlobal pMac, tDot11fIEVHTCaps *pDot11f);
871
872tSirRetStatus
873PopulateDot11fVHTOperation(tpAniSirGlobal pMac, tDot11fIEVHTOperation *pDot11f);
874
875tSirRetStatus
876PopulateDot11fVHTExtBssLoad(tpAniSirGlobal pMac, tDot11fIEVHTExtBssLoad *pDot11f);
877
878#endif