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