wlan_bearer/wlanldd/wlan_common/umac_common/inc/umac_types.h
changeset 0 c40eb8fe8501
child 7 0abc8c98be24
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-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 the License "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:   UMAC type definitions. 
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 28 %
       
    20 */
       
    21 
       
    22 #ifndef UMACTYPES_H
       
    23 #define UMACTYPES_H
       
    24 
       
    25 #include "am_platform_libraries.h"
       
    26 #include "pack.h"
       
    27 #include <wlanosaplatform.h>
       
    28 
       
    29 /// Indication data type
       
    30 typedef enum _TIndication
       
    31     {
       
    32 	EMediaDisconnect,
       
    33     EOsPowerStandby,
       
    34     EHWFailed,
       
    35     EConsecutiveBeaconsLost,
       
    36     EConsecutiveTxFailures,
       
    37     EConsecutivePwrModeSetFailures,
       
    38     EBSSRegained,
       
    39     EWepDecryptFailure,
       
    40     EPairwiseKeyMicFailure,
       
    41     EGroupKeyMicFailure,
       
    42     ERcpiTrigger,
       
    43     EScanCompleted,
       
    44     ESignalLossPrediction,
       
    45     EApTestOpportunity,
       
    46     EVoiceCallOn,
       
    47     EVoiceCallOff,
       
    48     EPsModeError
       
    49     } TIndication;
       
    50 
       
    51 
       
    52 /**
       
    53 * Maximum length of an SSID in BYTES
       
    54 */
       
    55 const TUint8 KMaxSSIDLength = 32;
       
    56 
       
    57 /**
       
    58 * Length of a MAC address
       
    59 */
       
    60 const TUint8 KMacAddressLength = 6;
       
    61 
       
    62 /**
       
    63 * 802.11 WEP key ID values
       
    64 */
       
    65 enum T802Dot11WepKeyId
       
    66     {
       
    67     E802Dot11WepKeyId0 = 0,
       
    68     E802Dot11WepKeyId1 = 1,
       
    69     E802Dot11WepKeyId2 = 2,
       
    70     E802Dot11WepKeyId3 = 3,
       
    71     // defined as an upper bound
       
    72     E802Dot11WepKeyIdMax = 4
       
    73     };
       
    74 
       
    75 /** Tx queues. They have a 1:1 mapping with QoS Access Categories */
       
    76 
       
    77 enum TQueueId
       
    78     {
       
    79     ELegacy,
       
    80     EBackGround,
       
    81     EVideo,
       
    82     EVoice,
       
    83     EQueueIdMax     // defined as upper bound
       
    84     };
       
    85 
       
    86 /**
       
    87  * WHA transmit queue state
       
    88  */
       
    89 enum TTxQueueState
       
    90     {
       
    91     ETxQueueFull,
       
    92     ETxQueueNotFull
       
    93     };
       
    94 
       
    95 /**
       
    96 * MAC address
       
    97 */
       
    98 #pragma pack( 1 )
       
    99 struct TMacAddress
       
   100     {
       
   101     /** the MAC address */
       
   102     TUint8 iMacAddress[KMacAddressLength];
       
   103     } __PACKED; // 6 bytes
       
   104 
       
   105 // pop the pragma pack stack to return to normal alignment of structures
       
   106 #pragma pack( ) 
       
   107 
       
   108 /**
       
   109 * Broadcast MAC Address.
       
   110 */
       
   111 const TMacAddress KBroadcastMacAddr = {{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }};
       
   112 
       
   113 /**
       
   114 * MAC address that is all zeros
       
   115 */
       
   116 const TMacAddress KZeroMacAddr = {{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }};
       
   117 
       
   118 /** IP v4 address */
       
   119 typedef TUint32 TIpv4Address;
       
   120 
       
   121 /** Length of OUI field in SNAP header */
       
   122 const TUint8 KOuiLength = 3;    
       
   123     
       
   124 /** SNAP header */
       
   125 #pragma pack( 1 )
       
   126 typedef struct _TSnapHeader
       
   127     {
       
   128     /** destination service access point */
       
   129     TUint8 iDSAP;
       
   130     /** source service access point */
       
   131     TUint8 iSSAP;
       
   132     /** control field */
       
   133     TUint8 iControl;
       
   134     /** organizationally unique identifier */
       
   135     TUint8 iOUI[KOuiLength];    // 3
       
   136     } TSnapHeader; // 6 bytes
       
   137 #pragma pack()
       
   138 
       
   139 /**
       
   140  * state of all WHA transmit queues
       
   141  */
       
   142 typedef TTxQueueState TWhaTxQueueState[EQueueIdMax];
       
   143 
       
   144 
       
   145 // returns aDest
       
   146 extern TAny* os_memcpy( 
       
   147     TAny* aDest, 
       
   148     const TAny* aSrc, 
       
   149     TUint32 aLengthinBytes );
       
   150 
       
   151 // return 0 if equal
       
   152 extern TInt os_memcmp( 
       
   153     const TAny* aLhs, 
       
   154     const TAny* aRhs, 
       
   155     TUint aNumOfBytes );
       
   156 
       
   157 extern TAny* os_memset( 
       
   158     void* aDest, 
       
   159     TInt aValue, 
       
   160     TUint aCount );
       
   161 
       
   162 
       
   163 /** internal UMAC events bitmask type */
       
   164 typedef TUint32 TInternalEvent;
       
   165 
       
   166 /** internal UMAC event requiring us to update the AC parameters to 
       
   167  *  WHA layer 
       
   168  */
       
   169 const TUint32 KAcParamUpdate = ( 1 << 0 );
       
   170 /** internal UMAC event requiring us to change the dot11 power mgmt mode */
       
   171 const TUint32 KPowerMgmtTransition = ( 1 << 1 );
       
   172 /** internal UMAC default timer timeout event */
       
   173 const TUint32 KTimeout = ( 1 << 2 );
       
   174 /** internal UMAC Voice Call Entry timer timeout event */
       
   175 const TUint32 KVoiceCallEntryTimerTimeout = ( 1 << 3 );
       
   176 /** internal UMAC Null timer timeout event */
       
   177 const TUint32 KNullTimerTimeout = ( 1 << 4 );
       
   178 /** internal UMAC No Voice timer timeout event */
       
   179 const TUint32 KNoVoiceTimerTimeout = ( 1 << 5 );
       
   180 /** internal UMAC Keep Alive timer timeout event */
       
   181 const TUint32 KKeepAliveTimerTimeout = ( 1 << 6 );
       
   182 /** internal UMAC Active to Light PS timer timeout event */
       
   183 const TUint32 KActiveToLightPsTimerTimeout = ( 1 << 7 );
       
   184 /** internal UMAC Light PS to Active timer timeout event */
       
   185 const TUint32 KLightPsToActiveTimerTimeout = ( 1 << 8 );
       
   186 /** internal UMAC Light PS to Deep PS timer timeout event */
       
   187 const TUint32 KLightPsToDeepPsTimerTimeout = ( 1 << 9 );
       
   188 /** internal UMAC event requiring us to set the cts to self MIB */
       
   189 const TUint32 KSetCtsToSelf = ( 1 << 10 );
       
   190 /** internal UMAC event requiring us to set the RCPI trigger level MIB */
       
   191 const TUint32 KSetRcpiTriggerLevel = ( 1 << 11 );
       
   192 /** internal UMAC event requiring us to set the HT BSS Operation MIB */
       
   193 const TUint32 KSetHtBssOperation = ( 1 << 12 );
       
   194 
       
   195 
       
   196 /** internal WLAN LDD timer type */
       
   197 enum TWlanTimer
       
   198     {
       
   199     EWlanDefaultTimer,
       
   200     EWlanVoiceCallEntryTimer,
       
   201     EWlanNullTimer,
       
   202     EWlanNoVoiceTimer,
       
   203     EWlanKeepAliveTimer,    
       
   204     EWlanActiveToLightPsTimer,
       
   205     EWlanLightPsToActiveTimer,
       
   206     EWlanLightPsToDeepPsTimer
       
   207     };
       
   208 
       
   209 #endif // UMACTYPES_H