Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 46 | typedef 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 |
| 60 | typedef 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 Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 127 | #ifdef WLAN_FEATURE_11AC |
| 128 | tDot11fIEVHTCaps VHTCaps; |
| 129 | tDot11fIEVHTOperation VHTOperation; |
| 130 | tDot11fIEVHTExtBssLoad VHTExtBssLoad; |
| 131 | #endif |
| 132 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 133 | } tSirProbeRespBeacon, *tpSirProbeRespBeacon; |
| 134 | |
| 135 | // probe Request structure |
| 136 | typedef 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 Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 148 | #ifdef WLAN_FEATURE_11AC |
| 149 | tDot11fIEVHTCaps VHTCaps; |
| 150 | #endif |
| 151 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 152 | |
| 153 | } tSirProbeReq, *tpSirProbeReq; |
| 154 | |
| 155 | /// Association Request structure (one day to be replaced by |
| 156 | /// tDot11fAssocRequest) |
| 157 | typedef 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 Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 204 | #ifdef WLAN_FEATURE_11AC |
| 205 | tDot11fIEVHTCaps VHTCaps; |
| 206 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 207 | } tSirAssocReq, *tpSirAssocReq; |
| 208 | |
| 209 | |
| 210 | /// Association Response structure (one day to be replaced by |
| 211 | /// tDot11fAssocRequest) |
| 212 | typedef 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 Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 254 | #ifdef WLAN_FEATURE_11AC |
| 255 | tDot11fIEVHTCaps VHTCaps; |
| 256 | tDot11fIEVHTOperation VHTOperation; |
| 257 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 258 | } tSirAssocRsp, *tpSirAssocRsp; |
| 259 | |
| 260 | tANI_U8 |
| 261 | sirIsPropCapabilityEnabled(struct sAniSirGlobal *pMac, tANI_U32 bitnum); |
| 262 | |
| 263 | tSirRetStatus |
| 264 | sirGetCfgPropCaps(struct sAniSirGlobal *, tANI_U16 *); |
| 265 | |
| 266 | void 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 | |
| 311 | void swapBitField16(tANI_U16 in, tANI_U16 *out); |
| 312 | |
| 313 | // Currently implemented as "shims" between callers & the new framesc- |
| 314 | // generated code: |
| 315 | |
| 316 | tSirRetStatus |
| 317 | sirConvertProbeReqFrame2Struct(struct sAniSirGlobal *pMac, |
| 318 | tANI_U8 *frame, |
| 319 | tANI_U32 len, |
| 320 | tpSirProbeReq probe); |
| 321 | |
| 322 | tSirRetStatus |
| 323 | sirConvertProbeFrame2Struct(struct sAniSirGlobal *pMac, tANI_U8 *frame, |
| 324 | tANI_U32 len, |
| 325 | tpSirProbeRespBeacon probe); |
| 326 | |
| 327 | tSirRetStatus |
| 328 | sirConvertAssocReqFrame2Struct(struct sAniSirGlobal *pMac, |
| 329 | tANI_U8 * frame, |
| 330 | tANI_U32 len, |
| 331 | tpSirAssocReq assoc); |
| 332 | |
| 333 | tSirRetStatus |
| 334 | sirConvertAssocRespFrame2Struct(struct sAniSirGlobal *pMac, |
| 335 | tANI_U8 * frame, |
| 336 | tANI_U32 len, |
| 337 | tpSirAssocRsp assoc); |
| 338 | |
| 339 | tSirRetStatus |
| 340 | sirConvertReassocReqFrame2Struct(struct sAniSirGlobal *pMac, |
| 341 | tANI_U8 * frame, |
| 342 | tANI_U32 len, |
| 343 | tpSirAssocReq assoc); |
| 344 | |
| 345 | tSirRetStatus |
| 346 | sirParseBeaconIE(struct sAniSirGlobal *pMac, |
| 347 | tpSirProbeRespBeacon pBeaconStruct, |
| 348 | tANI_U8 *pPayload, |
| 349 | tANI_U32 payloadLength); |
| 350 | |
| 351 | tSirRetStatus |
| 352 | sirConvertBeaconFrame2Struct(struct sAniSirGlobal *pMac, |
| 353 | tANI_U8 *pBeaconFrame, |
| 354 | tpSirProbeRespBeacon pBeaconStruct); |
| 355 | |
| 356 | tSirRetStatus |
| 357 | sirConvertAuthFrame2Struct(struct sAniSirGlobal *pMac, |
| 358 | tANI_U8 * frame, |
| 359 | tANI_U32 len, |
| 360 | tpSirMacAuthFrameBody auth); |
| 361 | |
| 362 | tSirRetStatus |
| 363 | sirConvertAddtsReq2Struct(struct sAniSirGlobal *pMac, |
| 364 | tANI_U8 *frame, |
| 365 | tANI_U32 len, |
| 366 | tSirAddtsReqInfo *addTs); |
| 367 | |
| 368 | tSirRetStatus |
| 369 | sirConvertAddtsRsp2Struct(struct sAniSirGlobal *pMac, |
| 370 | tANI_U8 *frame, |
| 371 | tANI_U32 len, |
| 372 | tSirAddtsRspInfo *addts); |
| 373 | |
| 374 | tSirRetStatus |
| 375 | sirConvertDeltsReq2Struct(struct sAniSirGlobal *pMac, |
| 376 | tANI_U8 *frame, |
| 377 | tANI_U32 len, |
| 378 | tSirDeltsReqInfo *delTs); |
| 379 | |
| 380 | #ifdef ANI_SUPPORT_11H |
| 381 | tSirRetStatus |
| 382 | sirConvertTpcReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *, |
| 383 | tpSirMacTpcReqActionFrame, tANI_U32); |
| 384 | |
| 385 | tSirRetStatus |
| 386 | sirConvertMeasReqFrame2Struct(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 | |
| 408 | tSirRetStatus |
| 409 | PopulateDot11fCapabilities(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 | |
| 432 | struct sDphHashNode; |
| 433 | |
| 434 | tSirRetStatus |
| 435 | PopulateDot11fCapabilities2(tpAniSirGlobal pMac, |
| 436 | tDot11fFfCapabilities *pDot11f, |
| 437 | struct sDphHashNode *pSta, |
| 438 | tpPESession psessionEntry); |
| 439 | |
| 440 | /// Populate a tDot11fIEChanSwitchAnn |
| 441 | void |
| 442 | PopulateDot11fChanSwitchAnn(tpAniSirGlobal pMac, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 443 | tDot11fIEChanSwitchAnn *pDot11f, |
| 444 | tpPESession psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 445 | |
| 446 | /// Populate a tDot11fIEChanSwitchAnn |
| 447 | void |
| 448 | PopulateDot11fExtChanSwitchAnn(tpAniSirGlobal pMac, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 449 | tDot11fIEExtChanSwitchAnn *pDot11f, |
| 450 | tpPESession psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 451 | |
| 452 | /// Populate a tDot11fIECountry |
| 453 | tSirRetStatus |
| 454 | PopulateDot11fCountry(tpAniSirGlobal pMac, |
| 455 | tDot11fIECountry *pDot11f, tpPESession psessionEntry); |
| 456 | |
| 457 | /// Populated a PopulateDot11fDSParams |
| 458 | tSirRetStatus |
| 459 | PopulateDot11fDSParams(tpAniSirGlobal pMac, |
| 460 | tDot11fIEDSParams *pDot11f, tANI_U8 channel, |
| 461 | tpPESession psessionEntry); |
| 462 | |
| 463 | |
| 464 | /// Populated a tDot11fIEEDCAParamSet |
| 465 | void |
| 466 | PopulateDot11fEDCAParamSet(tpAniSirGlobal pMac, |
| 467 | tDot11fIEEDCAParamSet *pDot11f, |
| 468 | tpPESession psessionEntry); |
| 469 | |
| 470 | #ifdef WLAN_SOFTAP_FEATURE |
| 471 | tSirRetStatus |
| 472 | PopulateDot11fERPInfo(tpAniSirGlobal pMac, |
| 473 | tDot11fIEERPInfo *pDot11f, tpPESession psessionEntry); |
| 474 | #else |
| 475 | tSirRetStatus |
| 476 | PopulateDot11fERPInfo(tpAniSirGlobal pMac, |
| 477 | tDot11fIEERPInfo *pDot11f); |
| 478 | #endif |
| 479 | |
| 480 | tSirRetStatus |
| 481 | PopulateDot11fExtSuppRates(tpAniSirGlobal pMac, |
| 482 | tANI_U8 nChannelNum, tDot11fIEExtSuppRates *pDot11f, |
| 483 | tpPESession psessionEntry); |
| 484 | |
| 485 | #if defined WLAN_FEATURE_VOWIFI |
| 486 | tSirRetStatus |
| 487 | PopulateDot11fBeaconReport(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 | |
| 508 | tSirRetStatus |
| 509 | PopulateDot11fExtSuppRates1(tpAniSirGlobal pMac, |
| 510 | tANI_U8 nChannelNum, |
| 511 | tDot11fIEExtSuppRates *pDot11f); |
| 512 | |
| 513 | tSirRetStatus |
| 514 | PopulateDot11fHCF(tpAniSirGlobal pMac, |
| 515 | tANI_U32 capEnable, |
| 516 | tDot11fIEHCF *pDot11f); |
| 517 | |
| 518 | tSirRetStatus |
| 519 | PopulateDot11fHTCaps(tpAniSirGlobal pMac, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 520 | tpPESession psessionEntry, |
| 521 | tDot11fIEHTCaps *pDot11f); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 522 | |
| 523 | #ifdef WLAN_SOFTAP_FEATURE |
| 524 | tSirRetStatus |
| 525 | PopulateDot11fHTInfo(tpAniSirGlobal pMac, |
| 526 | tDot11fIEHTInfo *pDot11f, |
| 527 | tpPESession psessionEntry); |
| 528 | #else |
| 529 | tSirRetStatus |
| 530 | PopulateDot11fHTInfo(tpAniSirGlobal pMac, |
| 531 | tDot11fIEHTInfo *pDot11f); |
| 532 | #endif |
| 533 | |
| 534 | void PopulateDot11fIBSSParams(tpAniSirGlobal pMac, |
| 535 | tDot11fIEIBSSParams *pDot11f, tpPESession psessionEntry); |
| 536 | |
| 537 | #ifdef ANI_SUPPORT_11H |
| 538 | tSirRetStatus |
| 539 | PopulateDot11fMeasurementReport0(tpAniSirGlobal pMac, |
| 540 | tpSirMacMeasReqActionFrame pReq, |
| 541 | tDot11fIEMeasurementReport *pDot11f); |
| 542 | |
| 543 | /// Populate a tDot11fIEMeasurementReport when the report type is CCA |
| 544 | tSirRetStatus |
| 545 | PopulateDot11fMeasurementReport1(tpAniSirGlobal pMac, |
| 546 | tpSirMacMeasReqActionFrame pReq, |
| 547 | tDot11fIEMeasurementReport *pDot11f); |
| 548 | |
| 549 | /// Populate a tDot11fIEMeasurementReport when the report type is RPI Hist |
| 550 | tSirRetStatus |
| 551 | PopulateDot11fMeasurementReport2(tpAniSirGlobal pMac, |
| 552 | tpSirMacMeasReqActionFrame pReq, |
| 553 | tDot11fIEMeasurementReport *pDot11f); |
| 554 | #endif //ANI_SUPPORT_11H |
| 555 | |
| 556 | /// Populate a tDot11fIEPowerCaps |
| 557 | void |
| 558 | PopulateDot11fPowerCaps(tpAniSirGlobal pMac, |
| 559 | tDot11fIEPowerCaps *pCaps, |
| 560 | tANI_U8 nAssocType,tpPESession psessionEntry); |
| 561 | |
| 562 | /// Populate a tDot11fIEPowerConstraints |
| 563 | tSirRetStatus |
| 564 | PopulateDot11fPowerConstraints(tpAniSirGlobal pMac, |
| 565 | tDot11fIEPowerConstraints *pDot11f); |
| 566 | |
| 567 | tSirRetStatus |
| 568 | PopulateDot11fPropCapability(tpAniSirGlobal pMac, |
| 569 | tANI_U32 capEnable, |
| 570 | tDot11fIEPropCapability *pDot11f); |
| 571 | |
| 572 | void |
| 573 | PopulateDot11fPropChannSwitchAnn(tpAniSirGlobal pMac, |
| 574 | tANI_U32 capEnable, |
| 575 | tDot11fIEPropChannSwitchAnn *pDot11f); |
| 576 | |
| 577 | void |
| 578 | PopulateDot11fPropEDCAParams(tpAniSirGlobal pMac, |
| 579 | tANI_U16 caps, |
| 580 | tDot11fIEPropEDCAParams *pDot11f); |
| 581 | |
| 582 | tSirRetStatus |
| 583 | PopulateDot11fPropSuppRates(tpAniSirGlobal pMac, |
| 584 | tANI_U32 capEnable, |
| 585 | tDot11fIEPropSuppRates *pDot11f); |
| 586 | |
| 587 | void |
| 588 | PopulateDot11fQOSCapsAp(tpAniSirGlobal pMac, |
| 589 | tDot11fIEQOSCapsAp *pDot11f, tpPESession psessionEntry); |
| 590 | |
| 591 | void |
| 592 | PopulateDot11fQOSCapsStation(tpAniSirGlobal pMac, |
| 593 | tDot11fIEQOSCapsStation *pDot11f); |
| 594 | |
| 595 | tSirRetStatus |
| 596 | PopulateDot11fRSN(tpAniSirGlobal pMac, |
| 597 | tpSirRSNie pRsnIe, |
| 598 | tDot11fIERSN *pDot11f); |
| 599 | |
| 600 | tSirRetStatus |
| 601 | PopulateDot11fRSNOpaque( tpAniSirGlobal pMac, |
| 602 | tpSirRSNie pRsnIe, |
| 603 | tDot11fIERSNOpaque *pDot11f ); |
| 604 | |
| 605 | #if defined(FEATURE_WLAN_WAPI) |
| 606 | |
| 607 | tSirRetStatus |
| 608 | PopulateDot11fWAPI(tpAniSirGlobal pMac, |
| 609 | tpSirRSNie pRsnIe, |
| 610 | tDot11fIEWAPI *pDot11f); |
| 611 | |
| 612 | tSirRetStatus PopulateDot11fWAPIOpaque( tpAniSirGlobal pMac, |
| 613 | tpSirRSNie pRsnIe, |
| 614 | tDot11fIEWAPIOpaque *pDot11f ); |
| 615 | |
| 616 | #endif //defined(FEATURE_WLAN_WAPI) |
| 617 | |
| 618 | /// Populate a tDot11fIESSID given a tSirMacSSid |
| 619 | void |
| 620 | PopulateDot11fSSID(tpAniSirGlobal pMac, |
| 621 | tSirMacSSid *pInternal, |
| 622 | tDot11fIESSID *pDot11f); |
| 623 | |
| 624 | /// Populate a tDot11fIESSID from CFG |
| 625 | tSirRetStatus |
| 626 | PopulateDot11fSSID2(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 | |
| 643 | void |
| 644 | PopulateDot11fSchedule(tSirMacScheduleIE *pSchedule, |
| 645 | tDot11fIESchedule *pDot11f); |
| 646 | |
| 647 | void |
| 648 | PopulateDot11fSuppChannels(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 | |
| 675 | tSirRetStatus |
| 676 | PopulateDot11fSuppRates(tpAniSirGlobal pMac, |
| 677 | tANI_U8 nChannelNum, |
| 678 | tDot11fIESuppRates *pDot11f,tpPESession); |
| 679 | |
| 680 | |
| 681 | tSirRetStatus PopulateDot11fTPCReport(tpAniSirGlobal pMac, |
| 682 | tDot11fIETPCReport *pDot11f, |
| 683 | tpPESession psessionEntry); |
| 684 | |
| 685 | /// Populate a tDot11FfTSInfo |
| 686 | void PopulateDot11fTSInfo(tSirMacTSInfo *pInfo, |
| 687 | tDot11fFfTSInfo *pDot11f); |
| 688 | |
| 689 | |
| 690 | void PopulateDot11fWMM(tpAniSirGlobal pMac, |
| 691 | tDot11fIEWMMInfoAp *pInfo, |
| 692 | tDot11fIEWMMParams *pParams, |
| 693 | tDot11fIEWMMCaps *pCaps, |
| 694 | tpPESession psessionEntry); |
| 695 | |
| 696 | void PopulateDot11fWMMCaps(tDot11fIEWMMCaps *pCaps); |
| 697 | |
| 698 | #ifdef FEATURE_WLAN_CCX |
| 699 | void PopulateDot11TSRSIE(tpAniSirGlobal pMac, |
| 700 | tSirMacCCXTSRSIE *pOld, |
| 701 | tDot11fIECCXTrafStrmRateSet *pDot11f, |
| 702 | tANI_U8 rate_length); |
| 703 | void PopulateDot11fReAssocTspec(tpAniSirGlobal pMac, tDot11fReAssocRequest *pReassoc, tpPESession psessionEntry); |
| 704 | #endif |
| 705 | |
| 706 | void PopulateDot11fWMMInfoAp(tpAniSirGlobal pMac, |
| 707 | tDot11fIEWMMInfoAp *pInfo, |
| 708 | tpPESession psessionEntry); |
| 709 | |
| 710 | void PopulateDot11fWMMInfoStation(tpAniSirGlobal pMac, |
| 711 | tDot11fIEWMMInfoStation *pInfo); |
| 712 | |
| 713 | #ifdef WLAN_SOFTAP_FEATURE |
| 714 | void PopulateDot11fWMMParams(tpAniSirGlobal pMac, |
| 715 | tDot11fIEWMMParams *pParams, |
| 716 | tpPESession psessionEntry); |
| 717 | #else |
| 718 | void 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 | |
| 735 | void |
| 736 | PopulateDot11fWMMSchedule(tSirMacScheduleIE *pSchedule, |
| 737 | tDot11fIEWMMSchedule *pDot11f); |
| 738 | |
| 739 | tSirRetStatus |
| 740 | PopulateDot11fWPA(tpAniSirGlobal pMac, |
| 741 | tpSirRSNie pRsnIe, |
| 742 | tDot11fIEWPA *pDot11f); |
| 743 | |
| 744 | tSirRetStatus |
| 745 | PopulateDot11fWPAOpaque( tpAniSirGlobal pMac, |
| 746 | tpSirRSNie pRsnIe, |
| 747 | tDot11fIEWPAOpaque *pDot11f ); |
| 748 | |
| 749 | void |
| 750 | PopulateDot11fTSPEC(tSirMacTspecIE *pOld, |
| 751 | tDot11fIETSPEC *pDot11f); |
| 752 | |
| 753 | void |
| 754 | PopulateDot11fWMMTSPEC(tSirMacTspecIE *pOld, |
| 755 | tDot11fIEWMMTSPEC *pDot11f); |
| 756 | |
| 757 | tSirRetStatus |
| 758 | PopulateDot11fTCLAS(tpAniSirGlobal pMac, |
| 759 | tSirTclasInfo *pOld, |
| 760 | tDot11fIETCLAS *pDot11f); |
| 761 | |
| 762 | tSirRetStatus |
| 763 | PopulateDot11fWMMTCLAS(tpAniSirGlobal pMac, |
| 764 | tSirTclasInfo *pOld, |
| 765 | tDot11fIEWMMTCLAS *pDot11f); |
| 766 | |
| 767 | #if ( WNI_POLARIS_FW_PRODUCT == AP ) |
| 768 | |
| 769 | tSirRetStatus |
| 770 | PopulateDot11fCFParams(tpAniSirGlobal pMac, |
| 771 | tDot11fFfCapabilities *pCaps, |
| 772 | tDot11fIECFParams *pDot11f); |
| 773 | |
| 774 | void |
| 775 | PopulateDot11fQuiet(tpAniSirGlobal pMac, |
| 776 | tDot11fIEQuiet *pDot11f); |
| 777 | |
| 778 | tSirRetStatus |
| 779 | PopulateDot11fAPName(tpAniSirGlobal pMac, |
| 780 | tANI_U32 capEnable, |
| 781 | tDot11fIEAPName *pDot11f); |
| 782 | |
| 783 | void |
| 784 | PopulateDot11fPropQuietBSS(tpAniSirGlobal pMac, |
| 785 | tANI_U32 capsEnable, |
| 786 | tDot11fIEPropQuietBSS *pDot11f); |
| 787 | |
| 788 | void |
| 789 | PopulateDot11fTrigStaBkScan(tpAniSirGlobal pMac, |
| 790 | tANI_U32 capsEnable, |
| 791 | tDot11fIETriggerStaBgScan *pDot11f); |
| 792 | |
| 793 | #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) |
| 794 | |
| 795 | tSirRetStatus |
| 796 | PopulateDot11fWDS(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 | |
| 804 | tSirRetStatus PopulateDot11fWsc(tpAniSirGlobal pMac, |
| 805 | tDot11fIEWscBeacon *pDot11f); |
| 806 | |
| 807 | tSirRetStatus PopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac, |
| 808 | tDot11fIEWscBeacon *pDot11f); |
| 809 | |
| 810 | tSirRetStatus DePopulateDot11fWscRegistrarInfo(tpAniSirGlobal pMac, |
| 811 | tDot11fIEWscBeacon *pDot11f); |
| 812 | |
| 813 | #ifdef WLAN_SOFTAP_FEATURE |
| 814 | tSirRetStatus PopulateDot11fProbeResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscProbeRes *pDot11f, tpPESession psessionEntry); |
| 815 | tSirRetStatus PopulateDot11fAssocResWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscAssocRes *pDot11f, tpPESession psessionEntry); |
| 816 | tSirRetStatus PopulateDot11fBeaconWPSIEs(tpAniSirGlobal pMac, tDot11fIEWscBeacon *pDot11f, tpPESession psessionEntry); |
| 817 | #endif |
| 818 | |
| 819 | tSirRetStatus PopulateDot11fWscInProbeRes(tpAniSirGlobal pMac, |
| 820 | tDot11fIEWscProbeRes *pDot11f); |
| 821 | |
| 822 | tSirRetStatus PopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac, |
| 823 | tDot11fIEWscProbeRes *pDot11f); |
| 824 | |
| 825 | tSirRetStatus DePopulateDot11fWscRegistrarInfoInProbeRes(tpAniSirGlobal pMac, |
| 826 | tDot11fIEWscProbeRes *pDot11f); |
| 827 | |
| 828 | |
| 829 | tSirRetStatus PopulateDot11fAssocResWscIE(tpAniSirGlobal pMac, |
| 830 | tDot11fIEWscAssocRes *pDot11f, |
| 831 | tpSirAssocReq pRcvdAssocReq); |
| 832 | |
| 833 | #ifdef WLAN_FEATURE_P2P |
| 834 | tSirRetStatus PopulateDot11AssocResP2PIE(tpAniSirGlobal pMac, |
| 835 | tDot11fIEP2PAssocRes *pDot11f, |
| 836 | tpSirAssocReq pRcvdAssocReq); |
| 837 | #endif |
| 838 | |
| 839 | tSirRetStatus PopulateDot11fWscInAssocRes(tpAniSirGlobal pMac, |
| 840 | tDot11fIEWscAssocRes *pDot11f); |
| 841 | |
| 842 | |
| 843 | #if defined WLAN_FEATURE_VOWIFI |
| 844 | tSirRetStatus PopulateDot11fWFATPC( tpAniSirGlobal pMac, |
| 845 | tDot11fIEWFATPC *pDot11f, tANI_U8 txPower, tANI_U8 linkMargin ); |
| 846 | |
| 847 | tSirRetStatus PopulateDot11fRRMIe( tpAniSirGlobal pMac, |
| 848 | tDot11fIERRMEnabledCap *pDot11f, |
| 849 | tpPESession psessionEntry ); |
| 850 | #endif |
| 851 | |
| 852 | #if defined WLAN_FEATURE_VOWIFI_11R |
| 853 | void PopulateMDIE( tpAniSirGlobal pMac, |
| 854 | tDot11fIEMobilityDomain *pDot11f, tANI_U8 mdie[] ); |
| 855 | void PopulateFTInfo( tpAniSirGlobal pMac, |
| 856 | tDot11fIEFTInfo *pDot11f ); |
| 857 | #endif |
| 858 | |
| 859 | void PopulateDot11fAssocRspRates ( tpAniSirGlobal pMac, tDot11fIESuppRates *pSupp, |
| 860 | tDot11fIEExtSuppRates *pExt, tANI_U16 *_11bRates, tANI_U16 *_11aRates ); |
| 861 | |
| 862 | int FindIELocation( tpAniSirGlobal pMac, |
| 863 | tpSirRSNie pRsnIe, |
| 864 | tANI_U8 EID); |
| 865 | #endif |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 866 | |
| 867 | #ifdef WLAN_FEATURE_11AC |
| 868 | tSirRetStatus |
| 869 | PopulateDot11fVHTCaps(tpAniSirGlobal pMac, tDot11fIEVHTCaps *pDot11f); |
| 870 | |
| 871 | tSirRetStatus |
| 872 | PopulateDot11fVHTOperation(tpAniSirGlobal pMac, tDot11fIEVHTOperation *pDot11f); |
| 873 | |
| 874 | tSirRetStatus |
| 875 | PopulateDot11fVHTExtBssLoad(tpAniSirGlobal pMac, tDot11fIEVHTExtBssLoad *pDot11f); |
| 876 | |
| 877 | #endif |