wlan_plat/wlan_hal_api/inc/wha_types.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Part of WLAN HAL API
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 28 %
       
    20 */
       
    21 
       
    22 #ifndef WHA_TYPES_H
       
    23 #define WHA_TYPES_H
       
    24 
       
    25 #include <whanamespace.h>
       
    26 
       
    27 NAMESPACE_BEGIN_WHA
       
    28 
       
    29 typedef TUint16 TMib;
       
    30 const TMib KMibDot11StationId                   = 0x1001;
       
    31 const TMib KMibDot11MaxReceiveLifetime          = 0x1002;
       
    32 const TMib KMibDot11SlotTime                    = 0x1003;
       
    33 const TMib KMibDot11GroupAddressesTable         = 0x1004;
       
    34 const TMib KMibDot11WepDefaultKeyId             = 0x1005;
       
    35 const TMib KMibDot11CurrentTxPowerLevel         = 0x1006;
       
    36 const TMib KMibDot11RTSThreshold                = 0x1007;
       
    37 const TMib KMibCtsToSelf                        = 0x1101;
       
    38 const TMib KMibArpIpAddressTable                = 0x1102;
       
    39 const TMib KMibTemplateFrame                    = 0x1103;
       
    40 const TMib KMibRxFilter                         = 0x1104;
       
    41 const TMib KMibBeaconFilterIeTable              = 0x1105;
       
    42 const TMib KMibBeaconFilterEnable               = 0x1106;
       
    43 const TMib KMibSleepMode                        = 0x1107;
       
    44 const TMib KMibWlanWakeUpInterval               = 0x1108;
       
    45 const TMib KMibBeaconLostCount                  = 0x1109;
       
    46 const TMib KMibRcpiThreshold                    = 0x110A;
       
    47 const TMib KMibStatisticsTable                  = 0x110B;
       
    48 const TMib KMibIbssPsConfig                     = 0x110C; /** deprecated */
       
    49 const TMib KMibTxRatePolicy                     = 0x110D;
       
    50 const TMib KMibCountersTable                    = 0x110E;
       
    51 const TMib KMibDot11Preamble                    = 0x110F;
       
    52 const TMib KMibEtherTypeFilter                  = 0x1110;
       
    53 const TMib KMibBroadcastUdpFilter               = 0x1111;
       
    54 
       
    55 const TMib KMibHtCapabilities                   = 0x2000;
       
    56 const TMib KMibHtBssOperation                   = 0x2001;
       
    57 const TMib KMibHtSecondaryBeacon                = 0x2002;
       
    58 const TMib KMibHtBlockAckConfigure              = 0x2003;
       
    59 const TMib KMibTxAutoRatePolicy                 = 0x2004;
       
    60 
       
    61 
       
    62 typedef TInt32  TPowerLevel; 
       
    63 typedef TUint8  TRcpi;
       
    64 typedef TUint8  TBand;
       
    65 typedef TUint32 TChannelNumber;
       
    66 typedef TUint32 TPltType;
       
    67 typedef TUint32 TRate; 
       
    68 typedef TUint32 TPacketId;
       
    69 
       
    70 typedef TUint8  TPsMode;
       
    71 typedef TUint32 TIbssPsMode; /** deprecated */
       
    72 typedef TUint8  TPrivacyKeyId;
       
    73 typedef TUint32 TTemplateType;
       
    74 typedef TUint32 TSleepMode;
       
    75 typedef TUint8  TWlanWakeUpInterval;
       
    76 typedef TUint32 TIpv4Address;
       
    77 typedef TUint32 TStatus;
       
    78 typedef TUint8  TSlotTime;
       
    79 
       
    80 typedef TUint8  THtSecChannelOffset;
       
    81 typedef TUint8  THtChannelWidth;
       
    82 typedef TUint8  THtPcoPhase;
       
    83 
       
    84 const   TUint8  KHtMcsSetLength = 10;
       
    85 typedef TUint8  THtMcsSet[KHtMcsSetLength];
       
    86 
       
    87 typedef TUint8  THtProtection;
       
    88 typedef TUint8  THtPpduFormat;
       
    89 typedef TUint8  THtRxStbc;
       
    90 typedef TUint8  THtMaxAmsdu;
       
    91 typedef TUint8  THtMaxAmpdu;
       
    92 typedef TUint8  THtAmpduSpacing;
       
    93 typedef TUint8  THtPcoTransTime;
       
    94 typedef TUint8  THtSecBeacon;
       
    95 typedef TUint8  THtMcsFeedback;
       
    96 typedef TUint8  TPreambleType;
       
    97 typedef TUint32 THtCapabilities;
       
    98 typedef TUint8  TFilterMode;
       
    99 
       
   100 const TBand KBand2dot4GHzMask   = ( 1 << 0 );
       
   101 const TBand KBand4dot9GHzMask   = ( 1 << 1 );
       
   102 const TBand KBand5GHzMask       = ( 1 << 2 );
       
   103 
       
   104 /**
       
   105 * 802.11 WEP key ID values
       
   106 */
       
   107 const TPrivacyKeyId KPrivacyKeyId0      = 0;
       
   108 const TPrivacyKeyId KPrivacyKeyId1      = 1;
       
   109 const TPrivacyKeyId KPrivacyKeyId2      = 2;
       
   110 const TPrivacyKeyId KPrivacyKeyId3      = 3;    
       
   111 const TPrivacyKeyId KPrivacyKeyIdMax    = 4; // defined as an upper bound
       
   112 
       
   113 enum TQueueId
       
   114     {
       
   115     ELegacy,
       
   116     EBackGround,
       
   117     EVideo,
       
   118     EVoice,
       
   119     EHcca,          /** deprecated */
       
   120     EQueueIdMax     // defined as upper bound
       
   121     };
       
   122 
       
   123 const TUint32 KSlotTime20  = 20;
       
   124 const TUint32 KSlotTime9   = 9;
       
   125 
       
   126 
       
   127 const TUint KBeaconStorageSize = 256;
       
   128 const TUint KProbeRequestStorageSize = KBeaconStorageSize;
       
   129 const TUint KProbeResponseStorageSize = KBeaconStorageSize;
       
   130 
       
   131 const TTemplateType KBeaconTemplate         = 0;
       
   132 const TTemplateType KProbeRequestTemplate   = 1;
       
   133 const TTemplateType KNullDataTemplate       = 2;
       
   134 const TTemplateType KProbeResponseTemplate  = 3;
       
   135 const TTemplateType KQosNullDataTemplate    = 4;
       
   136 const TTemplateType KPSPollTemplate         = 5;
       
   137 
       
   138 const TSleepMode KAwakeMode     = 0;
       
   139 const TSleepMode KPowerDownMode = 1;
       
   140 const TSleepMode KLowPowerMode  = 2;
       
   141 
       
   142 const TWlanWakeUpInterval KWakeUpIntervalAllBeacons     = 0;
       
   143 const TWlanWakeUpInterval KWakeUpIntervalAllDtims       = 1;
       
   144 const TWlanWakeUpInterval KWakeUpIntervalEveryNthBeacon = 2;
       
   145 const TWlanWakeUpInterval KWakeUpIntervalEveryNthDtim   = 3;
       
   146 
       
   147 const TIbssPsMode KIbssStandardPsMode = 0; /** deprecated */
       
   148 const TIbssPsMode KIbssEnhancedPsMode = 1; /** deprecated */
       
   149 
       
   150 const THtSecChannelOffset KNoSecCh          = 0;
       
   151 const THtSecChannelOffset KSecChAbovePrimCh = 1;
       
   152 const THtSecChannelOffset KSecChBelowPrimCh = 3;
       
   153 
       
   154 const THtChannelWidth KHtChWidthOnly20MHz  = 0;
       
   155 const THtChannelWidth KHtChWidth40And20MHz = 1;
       
   156 
       
   157 const THtPcoPhase KHtPcoPhase20MHz = 0;
       
   158 const THtPcoPhase KHtPcoPhase40MHz = 1;
       
   159 
       
   160 const THtProtection KHtOperationMode0 = 0;
       
   161 const THtProtection KHtOperationMode1 = 1;
       
   162 const THtProtection KHtOperationMode2 = 2;
       
   163 const THtProtection KHtOperationMode3 = 3;
       
   164 
       
   165 const THtPpduFormat KHtPpduFormatNonHt      = 0;
       
   166 const THtPpduFormat KHtPpduFormatMixed      = 1;
       
   167 const THtPpduFormat KHtPpduFormatGreenfield = 2;
       
   168 
       
   169 const THtRxStbc KHtRxStbcNotSupported        = 0;
       
   170 const THtRxStbc KHtRxStbcFor1Stream          = 1;
       
   171 const THtRxStbc KHtRxStbcFor1And2Streams     = 2;
       
   172 const THtRxStbc KHtRxStbcFor1And2And3Streams = 3;
       
   173 
       
   174 const THtMaxAmsdu KHtMaxAmsdu3839Octets = 0;
       
   175 const THtMaxAmsdu KHtMaxAmsdu7935Octets = 1;
       
   176 
       
   177 const THtMaxAmpdu KHtMaxAmpdu8191Octets  = 0;
       
   178 const THtMaxAmpdu KHtMaxAmpdu16383Octets = 1;
       
   179 const THtMaxAmpdu KHtMaxAmpdu32767Octets = 2;
       
   180 const THtMaxAmpdu KHtMaxAmpdu65535Octets = 3;
       
   181 
       
   182 const THtAmpduSpacing KHtAmpduSpacingNoRestriction  = 0;
       
   183 const THtAmpduSpacing KHtAmpduSpacingQuarter_us     = 1;
       
   184 const THtAmpduSpacing KHtAmpduSpacingHalf_us        = 2;
       
   185 const THtAmpduSpacing KHtAmpduSpacingOne_us         = 3;
       
   186 const THtAmpduSpacing KHtAmpduSpacingTwo_us         = 4;
       
   187 const THtAmpduSpacing KHtAmpduSpacingFour_us        = 5;
       
   188 const THtAmpduSpacing KHtAmpduSpacingEight_us       = 6;
       
   189 const THtAmpduSpacing KHtAmpduSpacingSixteen_us     = 7;
       
   190 
       
   191 const THtPcoTransTime KHtPcoTransTimeNone  = 0;
       
   192 const THtPcoTransTime KHtPcoTransTime400us = 1;
       
   193 const THtPcoTransTime KHtPcoTransTime1_5ms = 2;
       
   194 const THtPcoTransTime KHtPcoTransTime5ms   = 3;
       
   195 
       
   196 const THtSecBeacon KHtSecBeaconRxPrimaryOnly   = 0;
       
   197 const THtSecBeacon KHtSecBeaconRxEither        = 1;
       
   198 const THtSecBeacon KHtSecBeaconRxSecondaryOnly = 2;
       
   199 
       
   200 const THtMcsFeedback KHtMcsFeedbackNone                    = 0;
       
   201 const THtMcsFeedback KHtMcsFeedbackUnsolicitedOnly         = 2;
       
   202 const THtMcsFeedback KHtMcsFeedbackUnsolicitedAndSolicited = 3;
       
   203 
       
   204 const TPreambleType KLongPreamble  = 0;
       
   205 const TPreambleType KShortPreamble = 1;
       
   206 
       
   207 const THtCapabilities KLdpcRx               = ( 1 <<  0 );
       
   208 const THtCapabilities K40MhzChannel         = ( 1 <<  1 );
       
   209 const THtCapabilities KGreenfieldFormat     = ( 1 <<  2 );
       
   210 const THtCapabilities KShortGiFor20Mhz      = ( 1 <<  3 );
       
   211 const THtCapabilities KShortGiFor40Mhz      = ( 1 <<  4 );
       
   212 const THtCapabilities KStbcTx               = ( 1 <<  5 );
       
   213 const THtCapabilities KDelayedBlockAck      = ( 1 <<  6 );
       
   214 const THtCapabilities KDsssCckIn40Mhz       = ( 1 <<  7 );
       
   215 const THtCapabilities KPsmp                 = ( 1 <<  8 );
       
   216 const THtCapabilities KLsigTxopProtection   = ( 1 <<  9 );
       
   217 const THtCapabilities KPco                  = ( 1 << 10 );
       
   218 const THtCapabilities KHtcField             = ( 1 << 11 );
       
   219 const THtCapabilities KReverseDirectionResp = ( 1 << 12 );
       
   220 
       
   221 const TFilterMode KFilteringDisabled = 0;
       
   222 const TFilterMode KFilterIn          = 1;
       
   223 const TFilterMode KFilterOut         = 2;
       
   224 
       
   225 typedef TIpv4Address TIpV4Addr;  /** deprecated */
       
   226 
       
   227 const TIpv4Address KZeroIpV4Addr = 0x00000000;
       
   228 
       
   229 /**
       
   230 * rate definition masks
       
   231 */
       
   232 const TRate KRate1Mbits       = 0x00000001;
       
   233 const TRate KRate2Mbits       = 0x00000002;
       
   234 const TRate KRate5_5Mbits     = 0x00000004;
       
   235 const TRate KRate6Mbits       = 0x00000008;
       
   236 const TRate KRate9Mbits       = 0x00000010;
       
   237 const TRate KRate11Mbits      = 0x00000020;
       
   238 const TRate KRate12Mbits      = 0x00000040;
       
   239 const TRate KRate18Mbits      = 0x00000080;
       
   240 const TRate KRate22Mbits      = 0x00000100;
       
   241 const TRate KRate24Mbits      = 0x00000200;
       
   242 const TRate KRate33Mbits      = 0x00000400;
       
   243 const TRate KRate36Mbits      = 0x00000800;
       
   244 const TRate KRate48Mbits      = 0x00001000;
       
   245 const TRate KRate54Mbits      = 0x00002000;
       
   246 
       
   247 const TRate KDot11gRates      =
       
   248     KRate1Mbits | KRate2Mbits | KRate5_5Mbits | KRate6Mbits | KRate9Mbits |
       
   249     KRate11Mbits | KRate12Mbits | KRate18Mbits | KRate22Mbits | KRate24Mbits |
       
   250     KRate33Mbits | KRate36Mbits | KRate48Mbits | KRate54Mbits;
       
   251 
       
   252 const TRate KDot11bRates  =
       
   253     KRate1Mbits | KRate2Mbits | KRate5_5Mbits | KRate11Mbits;
       
   254 
       
   255 const TRate KMaxDot11bRate = KRate11Mbits;
       
   256 
       
   257 /**
       
   258 * bitmasks for ReceivePacket aFlags member
       
   259 */
       
   260 const TUint32 KEncryptNone      = 0;
       
   261 const TUint32 KEncryptWapi      = (1 << 15);
       
   262 const TUint32 KEncryptWep       = (1 << 16);
       
   263 const TUint32 KEncryptTkip      = (1 << 17);
       
   264 const TUint32 KEncryptAes       = (3 << 16);
       
   265 const TUint32 KMoreFrames       = (1 << 18);
       
   266 const TUint32 KDuringMeasure    = (1 << 19); /** deprecated */
       
   267 const TUint32 KHtPacket         = (1 << 20);
       
   268 const TUint32 KPartOfAmpdu      = (1 << 21);
       
   269 const TUint32 KStbc             = (1 << 22);
       
   270 
       
   271 struct STxPowerRange
       
   272     {
       
   273     TPowerLevel     iMinPowerLevel;
       
   274     TPowerLevel     iMaxPowerLevel;
       
   275     TUint32         iStepping;
       
   276     };
       
   277 
       
   278 struct SHtCapabilities
       
   279     {
       
   280     THtCapabilities iHTCapabilitiesBitMask;
       
   281     TUint16         iRxMaxDataRate;
       
   282     THtChannelWidth iChannelWidth;
       
   283     THtRxStbc       iRxStbc;
       
   284     THtMaxAmsdu     iMaxAmsdu;
       
   285     THtMaxAmpdu     iMaxAmpdu;
       
   286     THtAmpduSpacing iAmpduSpacing;
       
   287     THtMcsSet       iRxMcs;
       
   288     THtMcsSet       iTxMcs;
       
   289     THtPcoTransTime iPcoTransTime;
       
   290     THtMcsFeedback  iMcsFeedback;
       
   291     };
       
   292 
       
   293 struct SSettings
       
   294     {
       
   295     static const TUint KNumOfBandsSupported = 3;
       
   296 
       
   297     TUint8      iNumOfSSIDs;    
       
   298     TUint8      iRxBufAlignment; /** deprecated */
       
   299     TUint16     iNumOfBytesForSsid;
       
   300     TRate       iRates;
       
   301     TBand       iBand;
       
   302     TUint8      iRxoffset;
       
   303     TUint8      iNumOfGroupTableEntrys;
       
   304     TUint8      iNumOfTxRateClasses;
       
   305     TUint8      iTxFrameTrailerSpace;
       
   306     TUint8      iTxFrameHeaderSpace;
       
   307     TUint16     iFlagsMask; /** deprecated */
       
   308     STxPowerRange iTxPowerRange[KNumOfBandsSupported];
       
   309 
       
   310     enum { KMaxReceiveLifeTime  = ( 1 << 0 ) };
       
   311     enum { KIbssPsConfig        = ( 1 << 1 ) }; /** deprecated */
       
   312     enum { KTruncate            = ( 1 << 2 ) };
       
   313     enum { KPreambleOverride    = ( 1 << 3 ) };
       
   314     enum { KPowerLevelParam     = ( 1 << 4 ) };
       
   315     enum { KExpiryTimeParam     = ( 1 << 5 ) };
       
   316     enum { KProbe4Join          = ( 1 << 6 ) };
       
   317     enum { KMaxLifeTime         = ( 1 << 7 ) };
       
   318     enum { KTxNoAckPolicy       = ( 1 << 8 ) };
       
   319     enum { KBlockAckPolicy      = ( 1 << 9 ) }; /** deprecated */
       
   320     enum { KDot11SlotTime       = ( 1 << 10 ) };
       
   321     enum { KWmmSa               = ( 1 << 11 ) }; /** deprecated */
       
   322     enum { KSapsd               = ( 1 << 12 ) }; /** deprecated */
       
   323     enum { KRadioMeasurements   = ( 1 << 13 ) }; /** deprecated */
       
   324     enum { KLegacyPsPoll        = ( 1 << 14 ) }; /** deprecated */
       
   325     enum { KWep16ByteKey        = ( 1 << 15 ) }; /** deprecated */
       
   326     enum { KMoreDataAck         = ( 1 << 16 ) };
       
   327     enum { KScanChannelTimes    = ( 1 << 17 ) };
       
   328     enum { KAutonomousRateAdapt = ( 1 << 18 ) };
       
   329     enum { KNoSecHdrAndTrailer  = ( 1 << 19 ) };
       
   330     enum { KHtOperation         = ( 1 << 20 ) };
       
   331     enum { KWapi                = ( 1 << 21 ) };
       
   332     enum { KDsParamSetIeInProbe = ( 1 << 22 ) };
       
   333     enum { KEtherTypeFilter     = ( 1 << 23 ) };
       
   334     enum { KBroadcastUdpFilter  = ( 1 << 24 ) };
       
   335     enum { KMultipleRxBuffers   = ( 1 << 25 ) };
       
   336 
       
   337     TUint32         iCapability;
       
   338     SHtCapabilities iHtCapabilities;
       
   339     };
       
   340 
       
   341 struct SConfigureDataBase
       
   342     {   
       
   343     // currently this is the only one defined
       
   344     TUint32 iDot11MaxTransmitMsduLifeTime;     
       
   345     };
       
   346 
       
   347 // frequencies for 2.4 GHz band in units of KHz
       
   348 const TUint32 K2dot4ChannelFrequencies[] = 
       
   349     {
       
   350     2412000, // Channel 1
       
   351     2417000, // Channel 2
       
   352     2422000, // Channel 3
       
   353     2427000, // Channel 4
       
   354     2432000, // Channel 5
       
   355     2437000, // Channel 6
       
   356     2442000, // Channel 7
       
   357     2447000, // Channel 8
       
   358     2452000, // Channel 9
       
   359     2457000, // Channel 10
       
   360     2462000, // Channel 11
       
   361     2467000, // Channel 12
       
   362     2472000, // Channel 13
       
   363     2484000  // Channel 14
       
   364     };
       
   365     
       
   366 struct SChannelLoadParams /** deprecated */
       
   367     {
       
   368     };
       
   369 
       
   370 struct SNoiseHistogramParams /** deprecated */
       
   371     {
       
   372     };
       
   373 
       
   374 struct SBeaconParams /** deprecated */
       
   375     {
       
   376     enum { KPassive         = 0 };
       
   377     enum { KPassivePilot    = 1 };
       
   378     enum { KActive          = 2 };
       
   379     enum { KStaSelected     = 3 };
       
   380     enum { KBeaconTable     = 4 };
       
   381 
       
   382     TUint32                  iScanMode;
       
   383     };
       
   384 
       
   385 union UMeasurementSpecific /** deprecated */
       
   386     {
       
   387     SBeaconParams           iBeaconParams;
       
   388     SChannelLoadParams      iChannelLoadParams;
       
   389     SNoiseHistogramParams   iNoiseHistogramParams;
       
   390     };
       
   391 
       
   392 struct SParameterSet /** deprecated */
       
   393     {
       
   394     enum { KMeasTypeBasic           = 0 };
       
   395     enum { KMeasTypeChannelLoad     = 1 };
       
   396     enum { KMeasTypeNoiseHistogram  = 2 };
       
   397     enum { KMeasTypeBeacon          = 3 };
       
   398     enum { KMeasTypeFrame           = 4 };
       
   399 
       
   400     TUint32                 iType; 
       
   401     TUint32                 iDuration;
       
   402     TUint32                 iReserved;
       
   403     UMeasurementSpecific    iMeasurementSpecific;
       
   404     };
       
   405 
       
   406 struct SChannels
       
   407     {
       
   408     TChannelNumber  iChannel;
       
   409     TUint32         iMinChannelTime;
       
   410     TUint32         iMaxChannelTime;
       
   411     TPowerLevel     iTxPowerLevel;
       
   412     };
       
   413 
       
   414 struct SSSID
       
   415     {
       
   416     enum { KMaxSSIDLength = 32 };
       
   417 
       
   418     TUint32 iSSIDLength;
       
   419     TUint8  iSSID[KMaxSSIDLength];
       
   420     };
       
   421 
       
   422 enum TScanType
       
   423     {
       
   424     EFgScan,
       
   425     EBgScan,
       
   426     EForcedBgScan
       
   427     };
       
   428 
       
   429 enum TOperationMode
       
   430     {
       
   431     EIBSS,
       
   432     EBSS
       
   433     };
       
   434 
       
   435 #pragma pack(1)
       
   436 struct TMacAddress
       
   437     {
       
   438     enum { KMacAddressLength = 6 };
       
   439 
       
   440     /** the MAC address */
       
   441     TUint8 iMacAddress[KMacAddressLength];
       
   442     }; // 6 bytes
       
   443 #pragma pack()    
       
   444 
       
   445 /**
       
   446 * Broadcast MAC Address.
       
   447 */
       
   448 const TMacAddress KBroadcastMacAddr = 
       
   449     {
       
   450         { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
       
   451     };
       
   452 
       
   453 /**
       
   454 * MAC address that is all zeros
       
   455 */
       
   456 const TMacAddress KZeroMacAddr = 
       
   457     {
       
   458         { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
       
   459     };
       
   460 
       
   461 struct SWepPairwiseKey
       
   462     {    
       
   463     enum { KHeaderSize = sizeof( TMacAddress ) + ( 2 * sizeof( TUint8 ) ) };
       
   464 
       
   465     TMacAddress     iMacAddr;
       
   466     TUint8          iReserved;
       
   467     TUint8          iKeyLengthInBytes;
       
   468     TUint8          iKey[1];
       
   469     };
       
   470 
       
   471 struct SWepGroupKey
       
   472     {
       
   473     enum { KHeaderSize = sizeof( TPrivacyKeyId ) + ( 3 * sizeof( TUint8 ) ) };
       
   474     
       
   475     TPrivacyKeyId   iKeyId;
       
   476     TUint8          iKeyLengthInBytes;
       
   477     TUint8          iReserved[2];
       
   478     TUint8          iKey[1];
       
   479     };
       
   480 
       
   481 /**
       
   482 * Length of TKIP key in bytes;
       
   483 */
       
   484 const TUint32 KTKIPKeyLength = 16;
       
   485 /**
       
   486 * Length of MIC in BYTEs
       
   487 */
       
   488 const TUint32 KMicLength = 8;
       
   489 
       
   490 struct STkipPairwiseKey
       
   491     {
       
   492     TMacAddress     iMacAddr;
       
   493     TUint8          iReserved[2];
       
   494     TUint8          iTkipKey[KTKIPKeyLength];
       
   495     TUint8          iRxMicKey[KMicLength];
       
   496     TUint8          iTxMicKey[KMicLength];
       
   497     TPrivacyKeyId   iKeyId;
       
   498     TUint8          iReserved2[3];
       
   499     };
       
   500 
       
   501 /**
       
   502 * Length of receive sequence counter in bytes
       
   503 */
       
   504 const TUint32 KRxSequenceCounterLength = 8;
       
   505 
       
   506 struct STkipGroupKey
       
   507     {
       
   508     TUint8          iTkipKey[KTKIPKeyLength];
       
   509     TUint8          iRxMicKey[KMicLength];
       
   510     TPrivacyKeyId   iKeyId;
       
   511     TUint8          iReserved[3];
       
   512     TUint8          iRxSequenceCounter[KRxSequenceCounterLength];
       
   513     };
       
   514 
       
   515 /**
       
   516 * Length of AES key in bytes;
       
   517 */
       
   518 const TUint32 KAesKeyLength = 16;
       
   519 
       
   520 struct SAesPairwiseKey
       
   521     {
       
   522     TMacAddress     iMacAddr;
       
   523     TUint8          iReserved[2];
       
   524     TUint8          iAesKey[KAesKeyLength];
       
   525     };
       
   526 
       
   527 struct SAesGroupKey
       
   528     {
       
   529     TUint8          iAesKey[KAesKeyLength];
       
   530     TPrivacyKeyId   iKeyId;
       
   531     TUint8          iReserved[3];
       
   532     TUint8          iRxSequenceCounter[KRxSequenceCounterLength];
       
   533     };
       
   534 
       
   535 /**
       
   536 * Length of WAPI encryption key in bytes;
       
   537 */
       
   538 const TUint32 KWapiKeyLength = 16;
       
   539 /**
       
   540 * Length of WAPI MIC key in bytes
       
   541 */
       
   542 const TUint32 KWapiMicKeyLength = 16;
       
   543 
       
   544 struct SWapiPairwiseKey
       
   545     {
       
   546     TMacAddress     iMacAddr;
       
   547     TPrivacyKeyId   iKeyId;
       
   548     TUint8          iReserved[1];
       
   549     TUint8          iWapiKey[KWapiKeyLength];
       
   550     TUint8          iMicKey[KWapiMicKeyLength];
       
   551     };
       
   552 
       
   553 struct SWapiGroupKey
       
   554     {
       
   555     TUint8          iWapiKey[KWapiKeyLength];
       
   556     TUint8          iMicKey[KWapiMicKeyLength];
       
   557     TPrivacyKeyId   iKeyId;
       
   558     TUint8          iReserved[3];
       
   559     };
       
   560 
       
   561 enum TPreamble
       
   562     {
       
   563     ELongPreamble,
       
   564     EShortPreamble
       
   565     };
       
   566 
       
   567 const TPsMode KPsDisable = 0;
       
   568 const TPsMode KPsEnable = 1;
       
   569 
       
   570 
       
   571 enum TParameterSet
       
   572     {
       
   573     EParameterSetPlaceHolder
       
   574     };
       
   575 
       
   576 enum TKeyType
       
   577     {
       
   578     EWepGroupKey,
       
   579     EWepPairWiseKey,
       
   580     ETkipGroupKey,    
       
   581     ETkipPairWiseKey,      
       
   582     EAesGroupKey,    
       
   583     EAesPairWiseKey,      
       
   584     EWapiGroupKey,
       
   585     EWapiPairWiseKey,
       
   586     EKeyNone        // defined as an empty type
       
   587     };
       
   588 
       
   589 enum TPsScheme
       
   590     {
       
   591     ERegularPs,
       
   592     EUapsd,
       
   593     ELegacyPs, /** deprecated */
       
   594     ESapsd     /** deprecated */
       
   595     };
       
   596 
       
   597 struct SSAPSDConfig /** deprecated */
       
   598     {
       
   599     TUint32 iServiceStartTime;  // Lower order of TSF
       
   600     TUint32 iServiceInterval;   // In microseconds
       
   601     };
       
   602 
       
   603 enum TAckPolicy
       
   604     {
       
   605     ENormal,
       
   606     ENoaAck,
       
   607     EBlockAck /** deprecated */
       
   608     };
       
   609 
       
   610 const TStatus KSuccess                  = 0;
       
   611 const TStatus KFailed                   = 1;
       
   612 const TStatus KDecryptFailure           = 2;
       
   613 const TStatus KMicFailure               = 3;
       
   614 const TStatus KSuccessXfer              = 4;
       
   615 const TStatus KPending                  = 5;
       
   616 const TStatus KQueueFull                = 6;
       
   617 const TStatus KErrorRetryExceeded       = 7;
       
   618 const TStatus KErrorLifetimeExceeded    = 8;
       
   619 const TStatus KErrorNoLink              = 9;
       
   620 const TStatus KErrorMacNotResponding    = 10;
       
   621 const TStatus KSuccessQueueFull         = 11;
       
   622 
       
   623 
       
   624 enum TCommandId
       
   625     {
       
   626     EInitializeResponse,
       
   627     EConfigureResponse,
       
   628     EReleaseResponse,
       
   629     EPLtResponse,
       
   630     EResetResponse,
       
   631     EMeasureCommandResponse,   /** deprecated */
       
   632     EStopMeasureResponse,      /** deprecated */
       
   633     EScanCommandResponse,
       
   634     EStopScanResponse,
       
   635     EJoinResponse,
       
   636     ESetPsModeCommandResponse,
       
   637     ESetBssParametersResponse,
       
   638     EReadMIBResponse,
       
   639     EWriteMIBResponse,
       
   640     EAddKeyResponse,
       
   641     ERemoveKeyResponse,
       
   642     EConfigureQueueResponse,
       
   643     EConfigureACResponse,
       
   644     };
       
   645 
       
   646 enum TCompleteCommandId
       
   647     {
       
   648     EMeasureComplete, /** deprecated */
       
   649     EScanComplete,
       
   650     ESetPsModeComplete
       
   651     };
       
   652 
       
   653 struct SJoinResponse
       
   654     {
       
   655     TPowerLevel iMinPowerLevel;
       
   656     TPowerLevel iMaxPowerLevel;
       
   657     };
       
   658 
       
   659 struct SReadMibResponse
       
   660     {
       
   661     TMib        iMib;
       
   662     TUint16     iLength;
       
   663     const void* iData;
       
   664     };
       
   665 
       
   666 union UCommandResponseParams
       
   667     {
       
   668     SJoinResponse           iJoinResponse;
       
   669     SReadMibResponse        iReadMibResponse;
       
   670     };
       
   671 
       
   672 struct SChannelLoadResult /** deprecated */
       
   673     {
       
   674     TUint32 iCCABusyFraction;  
       
   675     };
       
   676 
       
   677 struct SNoiseHistogramResult /** deprecated */
       
   678     {
       
   679     enum { KResultSize = 8 };
       
   680 
       
   681     TUint8 iRPIDensity[KResultSize];
       
   682     };
       
   683 
       
   684 struct SFrameReport /** deprecated */
       
   685     {
       
   686     TMacAddress iTransmitAddress;
       
   687     TUint8      iReserved1[2];
       
   688     TMacAddress iBssId;
       
   689     TUint8      iReserved2[2];
       
   690     TPowerLevel iRxSignalPower;
       
   691     TUint32     iNumOfFrames;
       
   692     };
       
   693 
       
   694 struct SFrameResultReport /** deprecated */
       
   695     {
       
   696     TUint32         iNumberOfResults;
       
   697     SFrameReport    iFrameReport[1];
       
   698     };
       
   699 
       
   700 union UMeasurementSpecificResult /** deprecated */
       
   701     {
       
   702     SChannelLoadResult      iChannelLoadResult;
       
   703     SNoiseHistogramResult   iNoiseHistogramResult;
       
   704     SFrameResultReport      iFrameResultReport;
       
   705     };
       
   706 
       
   707 struct SResultSet /** deprecated */
       
   708     {
       
   709     TUint32 iType;
       
   710     TStatus iStatus;
       
   711 
       
   712     UMeasurementSpecificResult  iMeasurementSpecificResult;
       
   713     };
       
   714 
       
   715 struct SMeasureComplete /** deprecated */
       
   716     {
       
   717     TPsMode     iDot11PowerManagementMode;
       
   718     TUint8      iNumberOfMeasurementTypes;
       
   719     TUint8      iReserved[2];
       
   720     SResultSet  iResultSet[1];
       
   721     };
       
   722 
       
   723 struct SScanComplete
       
   724     {
       
   725     TPsMode iDot11PowerManagementMode;
       
   726     TUint8  iReserved[3];
       
   727     };
       
   728 
       
   729 struct SSetPsModeComplete
       
   730     {
       
   731     TPsMode iDot11PowerManagementMode;
       
   732     TUint8  iReserved[3];
       
   733     };
       
   734 
       
   735 union UCommandCompletionParams
       
   736     {
       
   737     SMeasureComplete        iMeasureComplete;
       
   738     SScanComplete           iScanComplete;
       
   739     SSetPsModeComplete      iSetPsModeComplete;
       
   740     };
       
   741 
       
   742 enum TIndicationId
       
   743     {
       
   744     EError,
       
   745     EBssLost,
       
   746     EBSSRegained,
       
   747     ERadar, /** deprecated */
       
   748     ERcpi,
       
   749     EPsModeError
       
   750     };
       
   751 
       
   752 struct SError
       
   753     {
       
   754     TStatus iStatus;
       
   755     };
       
   756 
       
   757 enum TMicKeyType
       
   758     {
       
   759     EPairWise,
       
   760     EGroup
       
   761     };
       
   762 
       
   763 struct SRcpi
       
   764     {
       
   765     TRcpi   iRcpi;
       
   766     TUint8  iReserved[3];
       
   767     };
       
   768 
       
   769 union UIndicationParams
       
   770     {
       
   771     SError          iError;
       
   772     SRcpi           iRcpi;
       
   773     };
       
   774 
       
   775 NAMESPACE_END_WHA
       
   776 
       
   777 #endif // WHA_TYPES_H
       
   778