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