wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacMacState.h
changeset 0 c40eb8fe8501
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:   Declaration of the WlanMacState class
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 53 %
       
    20 */
       
    21 
       
    22 #ifndef WLANMACSTATE_H
       
    23 #define WLANMACSTATE_H
       
    24 
       
    25 #include "802dot11.h"
       
    26 
       
    27 #include "UmacUserEvent.h"
       
    28 #include "UmacWsaEvent.h"
       
    29 #include "umacpacketschedulerclient.h"
       
    30 #include "umacdfcclient.h"
       
    31 #include "umacnullsender.h"
       
    32 
       
    33 class WlanContextImpl;
       
    34 class WlanDot11State;
       
    35 class WlanWsaCommand;
       
    36 class WlanWsaComplexCommand;
       
    37 
       
    38 /**
       
    39 * Interface layer for state machine context
       
    40 * Has the default implementation of event handling
       
    41 */
       
    42 class WlanMacState : 
       
    43     public MWlanUserEvent,
       
    44     public MWlanWsaEvent,
       
    45     public MWlanPacketSchedulerClient,
       
    46     public MWlanDfcClient,
       
    47     public MWlanNullSender
       
    48     {
       
    49 public:
       
    50 
       
    51     /**
       
    52     * Configure AC (Access Category) parameters to WHA (adaptation) layer
       
    53     * 
       
    54     * @param aCtxImpl statemachine context
       
    55     */
       
    56     virtual TBool ConfigureAcParams( 
       
    57         WlanContextImpl& aCtxImpl );                        
       
    58 
       
    59     /**
       
    60     * ?member_description.
       
    61     * @since Series 60 3.1
       
    62     * @param aCtxImpl global statemachine context
       
    63     */
       
    64     virtual TBool SetCtsToSelfMib( WlanContextImpl& aCtxImpl );
       
    65 
       
    66     /**
       
    67     * Updates the RCPI Trigger Level MIB
       
    68     *
       
    69     * @since Series 60 3.1
       
    70     * @param aCtxImpl Global statemachine context
       
    71     * @param aRcpiTrigger the value to assign to the MIB
       
    72     * @param aCompleteManagementRequest ETrue if this request came from the
       
    73     *                                   WLAN Mgmt client and that request
       
    74     *                                   needs to be completed.
       
    75     *                                   EFalse otherwise.
       
    76     * @return ETrue if state transition occurred, EFalse otherwise
       
    77     */
       
    78     virtual TBool SetRcpiTriggerLevelMib(
       
    79         WlanContextImpl& aCtxImpl,
       
    80         TUint32 aRcpiTrigger,
       
    81         TBool aCompleteManagementRequest );
       
    82 
       
    83     /**
       
    84     * Informs lower layer about the dynamic HT configuration
       
    85     * of the target/current network
       
    86     * @param aCtxImpl statemachine context
       
    87     * @return ETrue if a state change occurred
       
    88     *         EFalse otherwise
       
    89     */
       
    90     virtual TBool ConfigureHtBssOperation( WlanContextImpl& aCtxImpl );
       
    91 
       
    92     /**
       
    93     * Changes dot11 power management mode between active and PS mode
       
    94     * 
       
    95     * @param aCtxImpl statemachine context
       
    96     * @return ETrue if state change occurred, EFalse otherwise
       
    97     */
       
    98     virtual TBool ChangePowerMgmtMode( 
       
    99         WlanContextImpl& aCtxImpl );                        
       
   100 
       
   101 
       
   102    // Methods from base classes
       
   103 
       
   104     /**
       
   105     * Connect (authenticate and associate) to a BSS.
       
   106     *
       
   107     * @since S60 3.1
       
   108     * @param aCtxImpl statemachine context
       
   109     * @param aSSID Name of the network
       
   110     * @param aBSSID BSSID of the access point
       
   111     * @param aAuthAlgorithmNbr Authentication algorithm number to be used
       
   112     * @param aEncryptionStatus Used encryption level
       
   113     * @param aIsInfra ETrue when connecting to infrastructure network
       
   114     * @param aScanResponseFrameBodyLength length of the scan response frame body
       
   115     * @param aScanResponseFrameBody scan response frame body
       
   116     * @param aIeData The IE(s) to be included into the (re-)association request.
       
   117     *              NULL, if none to be included
       
   118     * @param aIeDataLength Length of the IE(s) to be included into the 
       
   119     *                    (re-)association request
       
   120     * @return ETrue if a state transition occurred
       
   121     *         EFalse otherwise
       
   122     */
       
   123     virtual TBool Connect(
       
   124         WlanContextImpl& aCtxImpl,
       
   125         const TSSID& aSSID,                 
       
   126         const TMacAddress& aBSSID,          
       
   127         TUint16 aAuthAlgorithmNbr,      
       
   128         TEncryptionStatus aEncryptionStatus,
       
   129         TBool aIsInfra,
       
   130         TUint16 aScanResponseFrameBodyLength,
       
   131         const TUint8* aScanResponseFrameBody,
       
   132         const TUint8* aIeData,
       
   133         TUint16 aIeDataLength );
       
   134 
       
   135     /**
       
   136     * Add TKIP key
       
   137     * @param aCtxImpl statemachine context
       
   138     * @param aData data blob that holds TKIP parameters
       
   139     * @param aLength length of the data blob
       
   140     * @param aKeyIndex value for key id filed of WEP IV
       
   141     * @return KErrNotSupported
       
   142     */
       
   143     virtual TBool AddTkIPKey( 
       
   144         WlanContextImpl& aCtxImpl,
       
   145         const TUint8* aData, 
       
   146         TUint32 aLength,
       
   147         T802Dot11WepKeyId aKeyIndex,
       
   148         const TMacAddress& aMacAddr );
       
   149 
       
   150     /**
       
   151     * Add multicast TKIP key.
       
   152     * @param aCtxImpl statemachine context
       
   153     * @param aKeyIndex  Value for the key id field of WEP IV.
       
   154     * @param aLength    Length of the TKIP parameters.
       
   155     * @param aData      TKIP parameters.
       
   156     * @return KErrNotSupported
       
   157     */
       
   158     virtual TBool AddMulticastTKIPKey( 
       
   159         WlanContextImpl& aCtxImpl,
       
   160         T802Dot11WepKeyId aKeyIndex,
       
   161         TUint32 aLength,
       
   162         const TUint8* aData );
       
   163 
       
   164     /**
       
   165     * Add (or replace) a pairwise AES key.
       
   166     *
       
   167     * @param aCtxImpl statemachine context
       
   168     * @param aLength Length of the AES parameters.
       
   169     * @param aData AES parameters.
       
   170     * @return ETrue if state transition occurred, EFalse otherwise
       
   171     */
       
   172     virtual TBool AddAesKey( 
       
   173         WlanContextImpl& aCtxImpl,
       
   174         const TUint8* aData, 
       
   175         TUint32 aLength,
       
   176         const TMacAddress& aMacAddr );
       
   177 
       
   178     /**
       
   179     * Add (or replace) an AES group key.
       
   180     *
       
   181     * @param aCtxImpl statemachine context
       
   182     * @param aKeyIndex Value for the key id field of WEP IV.
       
   183     * @param aLength Length of the AES parameters.
       
   184     * @param aData AES parameters.
       
   185     * @return ETrue if state transition occurred, EFalse otherwise
       
   186     */
       
   187     virtual TBool AddMulticastAesKey( 
       
   188         WlanContextImpl& aCtxImpl,
       
   189         T802Dot11WepKeyId aKeyIndex,
       
   190         TUint32 aLength,
       
   191         const TUint8* aData );
       
   192 
       
   193     /**
       
   194     * Add (or replace) a multicast WAPI key.
       
   195     *
       
   196     * @param aCtxImpl statemachine context
       
   197     * @param aKeyIndex  Value for the key id field of WEP IV.
       
   198     * @param aLength    Length of the WAPI parameters.
       
   199     * @param aData      WAPI parameters.
       
   200     * @return ETrue if state transition occurred, EFalse otherwise
       
   201     */
       
   202     virtual TBool AddMulticastWapiKey( 
       
   203         WlanContextImpl& aCtxImpl,
       
   204         T802Dot11WepKeyId aKeyIndex,
       
   205         TUint32 aLength,
       
   206         const TUint8* aData );
       
   207 
       
   208     /**
       
   209     * From MWlanUserEvent
       
   210     * Add (or replace) a pairwise WAPI key.
       
   211     *
       
   212     * @param aCtxImpl statemachine context
       
   213     * @param aData data blob that holds WAPI parameters
       
   214     * @param aLength length of the data blob
       
   215     * @param aKeyIndex value for key id field of WEP IV
       
   216     * @param aMacAddr MAC address of the peer station
       
   217     * @return ETrue if state transition occurred, EFalse otherwise
       
   218     */
       
   219     virtual TBool AddUnicastWapiKey( 
       
   220         WlanContextImpl& aCtxImpl,
       
   221         const TUint8* aData, 
       
   222         TUint32 aLength,
       
   223         T802Dot11WepKeyId aKeyIndex,
       
   224         const TMacAddress& aMacAddr );
       
   225 
       
   226     /**
       
   227     * Start an own IBSS network if there doesn't already 
       
   228     * exist a network that has the same name.
       
   229     * @param aCtxImpl statemachine context
       
   230     * @param aSSID name of the network
       
   231     * @param aBeaconInterval Beacon period in TUs (kusec). range:[1, 1024]
       
   232     * @param aAtim ATIM window (NOT USED)
       
   233     * @param aChannel Used channel (1-14). 
       
   234     *        Has to be legal in the current region.
       
   235     * @param aEncryptionStatus Used encryption level
       
   236     * @return KErrNone = command completed successfully, 
       
   237     * any other = failure
       
   238     */        
       
   239     virtual TBool StartIBSS(
       
   240         WlanContextImpl& aCtxImpl,
       
   241         const TSSID& aSSID,                 
       
   242         TUint32 aBeaconInterval,            
       
   243         TUint32 aAtim,                      
       
   244         TUint32 aChannel,                   
       
   245         TEncryptionStatus aEncryptionStatus );      
       
   246 
       
   247     /**
       
   248 
       
   249     * Scan all available networks. 
       
   250     * This SW module decides is background scan or foreground scan used
       
   251     * @param aCtxImpl statemachine context
       
   252     * @param aMode passive or active scan see #TScanMode
       
   253     * @param aSSID Network that APs are scanned. Can be broadcast SSID.
       
   254     * @param aScanRate Rate that is used in active scanning see #TRate
       
   255     * @param aMinChannelTime min. time to listen beacons/probe responses on 
       
   256     *                        a channel
       
   257     * @param aMaxChannelTime max. time to listen beacons/probe responses on 
       
   258     *                        a channel
       
   259     * @param aSplitScan if ETrue, use split scan
       
   260     * @return KErrNone = command completed successfully, 
       
   261     * any other = failure
       
   262     */
       
   263     virtual TBool Scan(
       
   264         WlanContextImpl& aCtxImpl,
       
   265         TScanMode aMode,                    
       
   266         const TSSID& aSSID,                 
       
   267         TRate aScanRate, 
       
   268         SChannels& aChannels,
       
   269         TUint32 aMinChannelTime,            
       
   270         TUint32 aMaxChannelTime,
       
   271         TBool aSplitScan );               
       
   272 
       
   273     /**
       
   274     * Stop a previously started scan process. 
       
   275     *
       
   276     * @since S60 3.2
       
   277     * @param aCtxImpl global statemachine context
       
   278     * @return ETrue if a state transition occurred
       
   279     *         EFalse otherwise
       
   280     */
       
   281     virtual TBool StopScan( WlanContextImpl& aCtxImpl );
       
   282 
       
   283     /**
       
   284     * Scan all available networks. 
       
   285     * This SW module decides is background scan or foreground scan used
       
   286     * @param aCtxImpl statemachine context
       
   287     * @param aMode passive or active scan see #TScanMode
       
   288     * @param aSSID Network that APs are scanned. Can be broadcast SSID.
       
   289     * @param aScanRate Rate that is used in active scanning 
       
   290     * @param aMinChannelTime min. time to listen beacons/probe responses on 
       
   291     *                        a channel
       
   292     * @param aMaxChannelTime max. time to listen beacons/probe responses on 
       
   293     *                        a channel
       
   294     * @param aSplitScan if ETrue, use split scan
       
   295     * @return KErrNone = command completed successfully, 
       
   296     * any other = failure
       
   297     */
       
   298     virtual TBool RealScan(
       
   299         WlanContextImpl& aCtxImpl,
       
   300         TScanMode aMode,                    
       
   301         const TSSID& aSSID,                 
       
   302         TUint32 aScanRate,                    
       
   303         SChannels& aChannels,
       
   304         TUint32 aMinChannelTime,            
       
   305         TUint32 aMaxChannelTime,
       
   306         TBool aSplitScan );               
       
   307     
       
   308     /**
       
   309     * Disconnect STA from current network.
       
   310     * @param aCtxImpl statemachine context
       
   311     * @return KErrNone = command completed successfully, 
       
   312     * any other = failure
       
   313     */
       
   314     virtual TBool Disconnect(WlanContextImpl& aCtxImpl);
       
   315 
       
   316     /**
       
   317     * Set 802.11 power mgmt mode in infrastructure networks.
       
   318     * @param aCtxImpl statemachine context
       
   319     * @param aPowerMode desired power mode
       
   320     * @param aDisableDynamicPowerModeManagement If ETrue, disables the dynamic
       
   321     *        power mode management handling. Relevant only when aPowerMode
       
   322     *        is EPowerModePs
       
   323     * @param aWakeupModeInLightPs WLAN wake-up mode in Light PS mode
       
   324     * @param aListenIntervalInLightPs specifies the value of N for wake-up
       
   325     *        modes 2 and 3 in Light PS mode. 
       
   326     * @param aWakeupModeInDeepPs WLAN wake-up mode in Deep PS mode
       
   327     * @param aListenIntervalInDeepPs specifies the value of N for wake-up 
       
   328     *        modes 2 and 3 in Deep PS mode
       
   329     * @return ETrue if a state transition occurred
       
   330     *         EFalse otherwise
       
   331     */
       
   332     virtual TBool SetPowerMode(
       
   333         WlanContextImpl& aCtxImpl,
       
   334         TPowerMode aPowerMode,
       
   335         TBool aDisableDynamicPowerModeManagement,
       
   336         TWlanWakeUpInterval aWakeupModeInLightPs, 
       
   337         TUint8 aListenIntervalInLightPs,
       
   338         TWlanWakeUpInterval aWakeupModeInDeepPs,
       
   339         TUint8 aListenIntervalInDeepPs );
       
   340 
       
   341     /**
       
   342     * Set trigger level for RCPI trigger. 
       
   343     * @param aCtxImpl statemachine context
       
   344     * @param aRcpiTrigger RCPI trigger level to be set
       
   345     * @return KErrNone = command completed successfully, 
       
   346     * any other = failure
       
   347     */
       
   348     virtual TBool SetRcpiTriggerLevel(
       
   349         WlanContextImpl& aCtxImpl,
       
   350         TUint32 aRcpiTrigger);               
       
   351 
       
   352     /**
       
   353     * Set transmission power level. 
       
   354     * This has to be legal at the current region.
       
   355     * @param aCtxImpl statemachine context
       
   356     * @param aLevel Transmission power level in mW.
       
   357     * @return KErrNone command completed successfully 
       
   358     * any other = failure
       
   359     */
       
   360     virtual TBool SetTxPowerLevel(
       
   361         WlanContextImpl& aCtxImpl,
       
   362         TUint32 aLevel);                
       
   363 
       
   364     /**
       
   365     * Set inital WLAN specific parameters. 
       
   366     * See 802Dot11DefaultValues.h for detaills
       
   367     * @param aCtxImpl statemachine context
       
   368     * @param aRTSThreshold 
       
   369     * @param aMaxTxMSDULifetime 
       
   370     * @param aVoiceCallEntryTimeout when we are not in Voice over WLAN Call
       
   371     *        state and we transmit at least aVoiceCallEntryTxThreshold
       
   372     *        Voice priority frames during the time period (microseconds)
       
   373     *        denoted by this parameter, we enter Voice over WLAN Call state
       
   374     * @param aVoiceCallEntryTxThreshold Threshold value for the number of 
       
   375     *        Voice priority Tx frames to enter Voice over WLAN Call state    
       
   376     * @param aVoiceNullTimeout NULL frame sending interval during a Voice over 
       
   377     *        WLAN call in U-APSD power save mode
       
   378     * @param aNoVoiceTimeout after this long time of no Voice priority data 
       
   379     *        Tx, exit Voice over WLAN call state
       
   380     * @param aKeepAliveTimeout Keep Alive frame sending interval in 
       
   381     *        infrastructure mode
       
   382     * @param aSpRcpiIndicationLevel If this RCPI level is predicted to be
       
   383     *        reached within the time specified by aSpTimeToCountPrediction,
       
   384     *        a signal loss prediction indication is sent. 
       
   385     * @param aSpTimeToCountPrediction Specifies the time (in microseconds)
       
   386     *        how far into the future signal prediction is done.
       
   387     * @param aSpMinIndicationInterval The minimum time difference (in 
       
   388     *        microseconds) between two signal loss prediction indications.
       
   389     * @return KErrNone command completed successfully 
       
   390     * any other = failure
       
   391     */        
       
   392     virtual TBool Configure(
       
   393         WlanContextImpl& aCtxImpl,
       
   394         TUint32 aRTSThreshold,              
       
   395         TUint32 aMaxTxMSDULifetime,
       
   396         TUint32 aVoiceCallEntryTimeout,
       
   397         TUint32 aVoiceCallEntryTxThreshold,
       
   398         TUint32 aVoiceNullTimeout,
       
   399         TUint32 aNoVoiceTimeout,
       
   400         TUint32 aKeepAliveTimeout,
       
   401         TUint32 aSpRcpiIndicationLevel,
       
   402         TUint32 aSpTimeToCountPrediction,
       
   403         TUint32 aSpMinIndicationInterval );  
       
   404     
       
   405     /**
       
   406      * From MWlanUserEvent
       
   407      * Add/set (or replace) a broadcast WEP key
       
   408      *
       
   409      * @since S60 3.1
       
   410      * @param aCtxImpl statemachine context
       
   411      * @param aKeyIndex Index of the key in the default key table 
       
   412      * @param aKeyLength Length of the key in BYTES
       
   413      * @param aKey The WEP key
       
   414      * @param aMac MAC address associated with the key
       
   415      * @return ETrue if state transition occurred, EFalse otherwise
       
   416      */
       
   417     virtual TBool AddBroadcastWepKey(
       
   418         WlanContextImpl& aCtxImpl,
       
   419         TUint32 aKeyIndex,     
       
   420         TBool aUseAsDefaulKey,    
       
   421         TUint32 aKeyLength,                      
       
   422         const TUint8 aKey[KMaxWEPKeyLength],
       
   423         const TMacAddress& aMac );   
       
   424     
       
   425     /**
       
   426     * Add (or replace) a unicast WEP key.
       
   427     * @param aCtxImpl statemachine context
       
   428     * @param aMacAddr MAC address to which the WEP key corresponds to
       
   429     * @param aKeyLength Length of the key in BYTES
       
   430     * @param aKey The WEP key
       
   431     * @return KErrNone command completed successfully 
       
   432     * any other = failure
       
   433     */
       
   434     virtual TBool AddUnicastWepKey(
       
   435         WlanContextImpl& aCtxImpl,
       
   436         const TMacAddress& aMacAddr,
       
   437         TUint32 aKeyLength,                      
       
   438         const TUint8 aKey[KMaxWEPKeyLength]);   
       
   439 
       
   440     /**
       
   441     * Disable user data from/to protcol stack 
       
   442     * (802.1x: block data during authentication).
       
   443     * @param aCtxImpl statemachine context
       
   444     * @return KErrNone command completed successfully 
       
   445     * any other = failure
       
   446     */
       
   447     virtual TBool DisableUserData(
       
   448         WlanContextImpl& aCtxImpl );
       
   449 
       
   450     /**
       
   451     * Enable user data from/to protcol stack 
       
   452     * (802.1x: pass data through after succesfull authentication)
       
   453     * @param aCtxImpl statemachine context
       
   454     * @return KErrNone command completed successfully 
       
   455     */
       
   456     virtual TBool EnableUserData(
       
   457         WlanContextImpl& aCtxImpl );
       
   458 
       
   459     /**
       
   460     * Gets last RCPI value
       
   461     * @param aCtxImpl statemachine context
       
   462     * @return KErrNone command completed successfully 
       
   463     * any other = failure
       
   464     */
       
   465     virtual TBool GetLastRcpi(
       
   466         WlanContextImpl& aCtxImpl );       
       
   467     
       
   468     /**
       
   469     * Adds a multicast MAC address and starts to filter (Rx) multicast 
       
   470     * traffic sent to any other MAC addresses than those that have been 
       
   471     * specified using this method
       
   472     * @param aCtxImpl statemachine context
       
   473     * @param aMacAddr The address to be added
       
   474     * @return 
       
   475     */
       
   476     virtual TBool AddMulticastAddr(
       
   477         WlanContextImpl& aCtxImpl,
       
   478         const TMacAddress& aMacAddr );        
       
   479 
       
   480     /**
       
   481     * Removes a multicast MAC address from multicast (Rx) filtering
       
   482     * configuration. So any packet that we receive and which has been sent
       
   483     * to the multicast address in question is not accepted any more (i.e. 
       
   484     * it is filtered).
       
   485     * However, if there are no addresses left in the multicast (Rx) filtering
       
   486     * configuration after this remove, the multicast filtering is disabled
       
   487     * and all (otherwise acceptable) multicast packets are accepted again.
       
   488     * @param aCtxImpl statemachine context
       
   489     * @param aMacAddr The address to be removed
       
   490     * @return ETrue if a state change occurred in the state machine 
       
   491     *         EFalse otherwise
       
   492     */
       
   493     virtual TBool RemoveMulticastAddr(
       
   494         WlanContextImpl& aCtxImpl,
       
   495         TBool aRemoveAll,
       
   496         const TMacAddress& aMacAddr );
       
   497 
       
   498     /**
       
   499      * Configures the parameters which define when BSS lost is indicated.
       
   500      * The indication is sent when either one of the specified thresholds
       
   501      * is exceeded.
       
   502      *
       
   503      * @since S60 v3.1
       
   504      * @param aCtxImpl statemachine context
       
   505      * @param aBeaconLostCount beacon lost count threshold
       
   506      * @aFailedTxPacketCount failed Tx packet count threshold
       
   507      * @return ETrue if a state change occurred
       
   508      *         EFalse otherwise
       
   509      */
       
   510     virtual TBool ConfigureBssLost( 
       
   511         WlanContextImpl& aCtxImpl,
       
   512         TUint32 aBeaconLostCount,
       
   513         TUint8 aFailedTxPacketCount );
       
   514 
       
   515     /**
       
   516     * Sets the Tx rate adaptation algorithm parameters
       
   517     *
       
   518     * @since S60 3.1
       
   519     * @param aCtxImpl statemachine context
       
   520     * @param aMinStepUpCheckpoint minimum and initial rate increase 
       
   521     *        checkpoint in units of frames
       
   522     *        Range: [aStepDownCheckpoint,aMaxStepUpCheckpoint]
       
   523     * @param aMaxStepUpCheckpoint maximum rate increase checkpoint in units 
       
   524     *        of frames
       
   525     *        Range: [aStepDownCheckpoint,UCHAR_MAX]
       
   526     * @param aStepUpCheckpointFactor StepUpCheckpoint is multiplied with this
       
   527     *        value if sending a probe frame fails
       
   528     *        Range: [1,aMaxStepUpCheckpoint]
       
   529     * @param aStepDownCheckpoint after this many frames the need to decrease
       
   530     *        the rate is checked
       
   531     *        Range: [2,UCHAR_MAX]
       
   532     * @param aMinStepUpThreshold minimum and initial StepUpThreshold 
       
   533     *        percentage
       
   534     *        Range: [1,aMaxStepUpThreshold]
       
   535     * @param aMaxStepUpThreshold maximum StepUpThreshold percentage
       
   536     *        Range: [1,100]
       
   537     * @param aStepUpThresholdIncrement StepUpThreshold is incremented by this
       
   538     *        value if sending a probe frame fails
       
   539     *        Range: [0,aMaxStepUpThreshold]
       
   540     * @param aStepDownThreshold if the percentage of frames which failed to
       
   541     *        be transmitted at the originally requested rate is at least 
       
   542     *        aStepDownThreshold at the aStepDownCheckpoint, the rate will
       
   543     *        be decreased
       
   544     *        Range: [1,100]
       
   545     * @param aDisableProbeHandling if EFalse, the rate adaptation algorithm
       
   546     *        handles the first frame transmitted after a rate increase in a
       
   547     *        special way. Otherwise the special handling is disabled
       
   548     * @return ETrue if a state change occurred
       
   549     *         EFalse otherwise
       
   550     */
       
   551     virtual TBool SetTxRateAdaptParams( 
       
   552         WlanContextImpl& aCtxImpl,
       
   553         TUint8 aMinStepUpCheckpoint,
       
   554         TUint8 aMaxStepUpCheckpoint,
       
   555         TUint8 aStepUpCheckpointFactor,
       
   556         TUint8 aStepDownCheckpoint,
       
   557         TUint8 aMinStepUpThreshold,
       
   558         TUint8 aMaxStepUpThreshold,
       
   559         TUint8 aStepUpThresholdIncrement,
       
   560         TUint8 aStepDownThreshold,
       
   561         TBool aDisableProbeHandling );
       
   562 
       
   563     /**
       
   564      * Configures Tx rate policy objects, sets the policy object to use for 
       
   565      * every Tx Queue / QoS AC, and also sets the Initial Max Tx Rate to be 
       
   566      * used for the configured policy objects
       
   567      *
       
   568      * @since S60 v3.1
       
   569      * @param aCtxImpl statemachine context
       
   570      * @param aRatePolicy rate policy (policy objects)
       
   571      * @param aQueue2RateClass Tx queue (AC) to rate policy object mapping
       
   572      * @param aInitialMaxTxRate4RateClass initial max Tx rate for the
       
   573      *        policy objects
       
   574      * @param aAutoRatePolicy auto rate policy
       
   575      * @param aHtMcsPolicy HT MCS policy 
       
   576      * @return ETrue if a state change occurred
       
   577      *         EFalse otherwise
       
   578      */
       
   579     virtual TBool ConfigureTxRatePolicies( 
       
   580         WlanContextImpl& aCtxImpl,
       
   581         const TTxRatePolicy& aRatePolicy,
       
   582         const TQueue2RateClass& aQueue2RateClass,
       
   583         const TInitialMaxTxRate4RateClass& aInitialMaxTxRate4RateClass,
       
   584         const TTxAutoRatePolicy& aAutoRatePolicy,
       
   585         const THtMcsPolicy& aHtMcsPolicy );
       
   586 
       
   587     /**
       
   588     * Sets the dynamic power mode transition algorithm parameters
       
   589     *
       
   590     * @since S60 3.1
       
   591     * @param aCtxImpl statemachine context
       
   592     * @param aToLightPsTimeout time interval in microseconds after which 
       
   593     *        transition from Active mode to Light PS mode is considered
       
   594     * @param aToLightPsFrameThreshold frame count threshold used when 
       
   595     *        considering transition from Active to Light PS mode
       
   596     * @param aToActiveTimeout time interval in microseconds after which the 
       
   597     *        frame counter used when considering transition from Light PS 
       
   598     *        to Active mode is reset
       
   599     * @param aToActiveFrameThreshold frame count threshold used when 
       
   600     *        considering transition from Light PS to Active mode
       
   601     * @param aToDeepPsTimeout time interval in microseconds after which 
       
   602     *        transition from Light PS mode to Deep PS mode is considered
       
   603     * @param aToDeepPsFrameThreshold frame count threshold used when 
       
   604     *        considering transition from Light PS to Deep PS mode
       
   605     * @param aUapsdRxFrameLengthThreshold received frame 
       
   606     *        payload length (in bytes) threshold in U-APSD network for
       
   607     *        Best Effort Access Category
       
   608     * @return ETrue if a state change occurred
       
   609     *         EFalse otherwise
       
   610     */
       
   611     virtual TBool SetPowerModeManagementParameters(
       
   612         WlanContextImpl& aCtxImpl,
       
   613         TUint32 aToLightPsTimeout,
       
   614         TUint16 aToLightPsFrameThreshold,
       
   615         TUint32 aToActiveTimeout,
       
   616         TUint16 aToActiveFrameThreshold,
       
   617         TUint32 aToDeepPsTimeout,
       
   618         TUint16 aToDeepPsFrameThreshold,
       
   619         TUint16 aUapsdRxFrameLengthThreshold );
       
   620     
       
   621     /**
       
   622     * Configures dynamic power mode management traffic override
       
   623     *
       
   624     * The settings here become effective once using the PS mode has been 
       
   625     * allowed by WLAN Mgmt Client.
       
   626     * When a setting below is ETrue, any amount of Rx or Tx traffic via
       
   627     * the AC in question won't cause a change from PS to CAM mode once PS
       
   628     * mode has been entered, and traffic via that AC won't make us to 
       
   629     * stay in CAM either.
       
   630     * Every AC has a separate setting for U-APSD and legacy PS.
       
   631     * The U-APSD setting is used if U-APSD is used for the AC in question.
       
   632     * Otherwise the corresponding legacy setting is used.
       
   633     *    
       
   634     * @since S60 3.2
       
   635     * @param aCtxImpl statemachine context
       
   636     * @param aStayInPsDespiteUapsdVoiceTraffic U-APSD Voice AC setting
       
   637     * @param aStayInPsDespiteUapsdVideoTraffic U-APSD Video AC setting
       
   638     * @param aStayInPsDespiteUapsdBestEffortTraffic U-APSD Best Effort AC 
       
   639     *                                               setting
       
   640     * @param aStayInPsDespiteUapsdBackgroundTraffic U-APSD Background AC 
       
   641     *                                               setting
       
   642     * @param aStayInPsDespiteLegacyVoiceTraffic legacy Voice AC setting
       
   643     * @param aStayInPsDespiteLegacyVideoTraffic legacy Video AC setting
       
   644     * @param aStayInPsDespiteLegacyBestEffortTraffic legacy Best Effort AC 
       
   645     *                                                setting
       
   646     * @param aStayInPsDespiteLegacyBackgroundTraffic legacy Background AC 
       
   647     *                                                setting
       
   648     * @return ETrue if a state change occurred
       
   649     *         EFalse otherwise
       
   650     */
       
   651     virtual TBool ConfigurePwrModeMgmtTrafficOverride( 
       
   652         WlanContextImpl& aCtxImpl,
       
   653         TBool aStayInPsDespiteUapsdVoiceTraffic,
       
   654         TBool aStayInPsDespiteUapsdVideoTraffic,
       
   655         TBool aStayInPsDespiteUapsdBestEffortTraffic, 
       
   656         TBool aStayInPsDespiteUapsdBackgroundTraffic,
       
   657         TBool aStayInPsDespiteLegacyVoiceTraffic,
       
   658         TBool aStayInPsDespiteLegacyVideoTraffic,
       
   659         TBool aStayInPsDespiteLegacyBestEffortTraffic,
       
   660         TBool aStayInPsDespiteLegacyBackgroundTraffic );
       
   661 
       
   662     /**
       
   663      * Gets data frame Rx & Tx statistics
       
   664      *
       
   665      * @since S60 v3.2
       
   666      * @param aCtxImpl statemachine context
       
   667      * @return ETrue if a state change occurred
       
   668      *         EFalse otherwise
       
   669      */
       
   670     virtual TBool GetFrameStatistics( WlanContextImpl& aCtxImpl );
       
   671 
       
   672     /**
       
   673      * Configures U-APSD usage
       
   674      *
       
   675      * @since S60 v3.2
       
   676      * @param aCtxImpl statemachine context
       
   677      * @param aMaxServicePeriodLength
       
   678      * @param aUapsdForVoice if ETrue the Voice AC is made both trigger and 
       
   679      *                       delivery enabled when connecting to a QoS AP 
       
   680      *                       supporting U-APSD.
       
   681      *                       Otherwise it's made neither trigger nor delivery 
       
   682      *                       enabled
       
   683      * @param aUapsdForVideo if ETrue the Video AC is made both trigger and 
       
   684      *                       delivery enabled 
       
   685      *                       when connecting to a QoS AP supporting U-APSD.
       
   686      *                       Otherwise it's made neither trigger nor delivery 
       
   687      *                       enabled
       
   688      * @param aUapsdForBestEffort if ETrue the Best Effort AC is made both 
       
   689      *                            trigger and delivery enabled when connecting
       
   690      *                            to a QoS AP supporting U-APSD.
       
   691      *                            Otherwise it's made neither trigger nor 
       
   692      *                            delivery enabled    
       
   693      * @param aUapsdForBackground if ETrue the Background AC is made both 
       
   694      *                            trigger and delivery enabled when connecting
       
   695      *                            to a QoS AP supporting U-APSD.
       
   696      *                            Otherwise it's made neither trigger nor 
       
   697      *                            delivery enabled    
       
   698      */
       
   699     virtual TBool ConfigureUapsd( 
       
   700         WlanContextImpl& aCtxImpl,
       
   701         TMaxServicePeriodLength aMaxServicePeriodLength,
       
   702         TBool aUapsdForVoice,
       
   703         TBool aUapsdForVideo,
       
   704         TBool aUapsdForBestEffort,
       
   705         TBool aUapsdForBackground );
       
   706 
       
   707     /**
       
   708      * Reconfigures the specified Tx queue if necessary
       
   709      *
       
   710      * @since S60 v3.2
       
   711      * @param aCtxImpl statemachine context
       
   712      * @param aQueueId ID of the queue to reconfigure
       
   713      * @param aMediumTime The amount of time the queue is allowed to access 
       
   714      *                    the WLAN air interface.
       
   715      * @param aMaxTxMSDULifetime Maximum Transmit MSDU Lifetime to be used 
       
   716      *                           for the specified queue.
       
   717      * @return ETrue if a state change occurred
       
   718      *         EFalse otherwise
       
   719      */
       
   720     virtual TBool ConfigureTxQueueIfNecessary( 
       
   721             WlanContextImpl& aCtxImpl,
       
   722             TQueueId aQueueId,
       
   723             TUint16 aMediumTime,
       
   724             TUint32 aMaxTxMSDULifetime );
       
   725 
       
   726     /**
       
   727      * Get our own MAC address
       
   728      *
       
   729      * @since S60 v3.1
       
   730      * @param aCtxImpl statemachine context
       
   731      * @return ETrue if a state change occurred
       
   732      *         EFalse otherwise
       
   733      */
       
   734     virtual TBool GetMacAddress(
       
   735         WlanContextImpl& aCtxImpl );
       
   736 
       
   737     /**
       
   738     * Triggers the setting of the Tx offset on the protocol stack side for 
       
   739     * every frame type which can be transmitted
       
   740     *
       
   741     * @param aCtxImpl statemachine context
       
   742     */
       
   743     virtual void SetProtocolStackTxOffset( WlanContextImpl& aCtxImpl ) const;
       
   744 
       
   745     /**
       
   746     * Configures ARP IP address filtering
       
   747     * 
       
   748     * @param aCtxImpl statemachine context
       
   749     * @param aEnableFiltering If ETrue, filtering is enabled
       
   750     *                         If EFalse, filtering is disabled
       
   751     * @param aIpv4Address If the target IP Address in a received ARP request 
       
   752     *        doesn't match this address, the packet shall be discarded
       
   753     *        on the lower layers.
       
   754     *        Relevant only when enabling filtering.
       
   755     * @return ETrue if a state change occurred in the state machine 
       
   756     *         EFalse otherwise
       
   757     */
       
   758     virtual TBool ConfigureArpIpAddressFiltering(
       
   759         WlanContextImpl& aCtxImpl,
       
   760         TBool aEnableFiltering,
       
   761         TIpv4Address aIpv4Address );
       
   762 
       
   763     /**
       
   764     * Configures HT Block Ack use
       
   765     * 
       
   766     * @param aCtxImpl statemachine context
       
   767     * @param aTxBlockAckUsage Bit map defining Block Ack use in Tx direction
       
   768     * @param aRxBlockAckUsage Bit map defining Block Ack use in Rx direction
       
   769     * @return ETrue if a state change occurred in the state machine 
       
   770     *         EFalse otherwise
       
   771     */
       
   772     virtual TBool ConfigureHtBlockAck(
       
   773         WlanContextImpl& aCtxImpl, 
       
   774         TUint8 aTxBlockAckUsage,
       
   775         TUint8 aRxBlockAckUsage );        
       
   776 
       
   777     /**
       
   778     * Configures Proprietary SNAP header. 
       
   779     * Valid received 802.11 Data frames containing this SNAP header
       
   780     * are accepted and forwarded to the WLAN Management Client.
       
   781     * 
       
   782     * @param aCtxImpl statemachine context
       
   783     * @param 
       
   784     * @return ETrue if a state change occurred in the state machine 
       
   785     *         EFalse otherwise
       
   786     */
       
   787     virtual TBool ConfigureProprietarySnapHdr(
       
   788         WlanContextImpl& aCtxImpl, 
       
   789         const TSnapHeader& aSnapHeader );        
       
   790     
       
   791     /**
       
   792     * Transmit a protocol stack frame
       
   793     * 
       
   794     * The frame to be sent needs to be in 802.3 format
       
   795     * @param aCtxImpl global state machine context
       
   796     * @param aDataBuffer meta header of the frame to be transmitted
       
   797     * @param aMore ETrue if another frame is also ready to be transmitted
       
   798     *              EFalse otherwise
       
   799     */
       
   800     virtual TBool TxData( 
       
   801         WlanContextImpl& aCtxImpl,
       
   802         TDataBuffer& aDataBuffer,
       
   803         TBool aMore );
       
   804 
       
   805     /**
       
   806     * Write for management data
       
   807     * The frame to be sent needs to be in 802.3 format
       
   808     * @param aCtxImpl statemachine context
       
   809     * @param aDataBuffer meta header of the frame to be transmitted
       
   810     */
       
   811     virtual void TxMgmtData( 
       
   812         WlanContextImpl& aCtxImpl,
       
   813         TDataBuffer& aDataBuffer );
       
   814 
       
   815     /**
       
   816      * From MWlanUserEvent
       
   817      * Make system ready for unloading
       
   818      *
       
   819      * @since S60 3.1
       
   820      */
       
   821     virtual void FinitSystem( WlanContextImpl& aCtxImpl );
       
   822     
       
   823     virtual void CommandResponse( 
       
   824         WlanContextImpl& aCtxImpl, 
       
   825         WHA::TCommandId aCommandId, 
       
   826         WHA::TStatus aStatus,
       
   827         const WHA::UCommandResponseParams& aCommandResponseParams );
       
   828 
       
   829     virtual TBool CommandComplete( 
       
   830         WlanContextImpl& aCtxImpl, 
       
   831         WHA::TCompleteCommandId aCompleteCommandId, 
       
   832         WHA::TStatus aStatus,
       
   833         const WHA::UCommandCompletionParams& 
       
   834         aCommandCompletionParams );
       
   835 
       
   836     virtual void Indication( 
       
   837         WlanContextImpl& aCtxImpl, 
       
   838         WHA::TIndicationId aIndicationId,
       
   839         const WHA::UIndicationParams& aIndicationParams );
       
   840 
       
   841     // Frame receive
       
   842 
       
   843     virtual TAny* RequestForBuffer ( 
       
   844         WlanContextImpl& aCtxImpl,             
       
   845         TUint16 aLength );
       
   846 
       
   847     virtual void ReceivePacket( 
       
   848         WlanContextImpl& aCtxImpl, 
       
   849         WHA::TStatus aStatus,
       
   850         const void* aFrame,
       
   851         TUint16 aLength,
       
   852         WHA::TRate aRate,
       
   853         WHA::TRcpi aRcpi,
       
   854         WHA::TChannelNumber aChannel,
       
   855         TUint8* aBuffer,
       
   856         TUint32 aFlags );
       
   857 
       
   858     // packet scheduler client
       
   859 
       
   860     /**
       
   861      * Method called when packet has been transferred to the WLAN device
       
   862      *
       
   863      * @since S60 3.1
       
   864      * @param aCtxImpl global state machine context
       
   865      * @param aPacketId packet whose transfer is complete
       
   866      * @param aMetaHeader frame meta header
       
   867      */
       
   868     virtual void OnPacketTransferComplete( 
       
   869         WlanContextImpl& aCtxImpl, 
       
   870         TUint32 aPacketId,
       
   871         TDataBuffer* aMetaHeader );
       
   872 
       
   873     virtual void OnPacketSendComplete(
       
   874         WlanContextImpl& aCtxImpl, 
       
   875         WHA::TStatus aStatus,
       
   876         TUint32 aPacketId,
       
   877         WHA::TRate aRate,
       
   878         TUint32 aPacketQueueDelay,
       
   879         TUint32 aMediaDelay,
       
   880         TUint aTotalTxDelay,
       
   881         TUint8 aAckFailures,
       
   882         WHA::TQueueId aQueueId,
       
   883         WHA::TRate aRequestedRate,
       
   884         TBool aMulticastData );
       
   885 
       
   886     /**
       
   887     * Method called when Packet Scheduler's packet scheduling method 
       
   888     * should be called, as there exists a packet that is suitable for 
       
   889     * transmission.
       
   890     * NOTE: if any other Packet Scheduler method is called within this
       
   891     * context the result is undefined.
       
   892     * 
       
   893     * @param aMore ETrue if another frame is also ready to be transmitted
       
   894     *              EFalse otherwise
       
   895     */
       
   896     virtual void CallPacketSchedule( 
       
   897         WlanContextImpl& aCtxImpl,
       
   898         TBool aMore );
       
   899 
       
   900     /**
       
   901      * Method called when packet has been flushed (removed)
       
   902      * from packet scheduler
       
   903      *
       
   904      * @since S60 3.1
       
   905      * @param aCtxImpl global state machine context
       
   906      * @param aPacketId packet that was flushed
       
   907      * @param aMetaHeader frame meta header
       
   908      */
       
   909     virtual void OnPacketFlushEvent(
       
   910         WlanContextImpl& aCtxImpl, 
       
   911         TUint32 aPacketId,
       
   912         TDataBuffer* aMetaHeader );
       
   913 
       
   914     virtual void OnPacketPushPossible( WlanContextImpl& aCtxImpl );
       
   915            
       
   916     /**
       
   917     * Timer timeout function
       
   918     * @param aCtxImpl statemachine context
       
   919     * @return ETrue if a state change occurred in the state machine
       
   920     *         EFalse otherwise
       
   921     */
       
   922     virtual TBool OnTimeout( WlanContextImpl& aCtxImpl );
       
   923 
       
   924     /**
       
   925     * Voice Call Entry timer timeout function
       
   926     *
       
   927     * @since S60 v3.2
       
   928     * @param aCtxImpl statemachine context
       
   929     * @return ETrue if a state change occurred in the state machine
       
   930     *         EFalse otherwise
       
   931     */
       
   932     virtual TBool OnVoiceCallEntryTimerTimeout( WlanContextImpl& aCtxImpl );
       
   933 
       
   934     /**
       
   935     * Null timer timeout function
       
   936     *
       
   937     * @since S60 v3.2
       
   938     * @param aCtxImpl statemachine context
       
   939     * @return ETrue if a state change occurred in the state machine
       
   940     *         EFalse otherwise
       
   941     */
       
   942     virtual TBool OnNullTimerTimeout( WlanContextImpl& aCtxImpl );
       
   943 
       
   944     /**
       
   945     * No Voice timer timeout function
       
   946     *
       
   947     * @since S60 v3.2
       
   948     * @param aCtxImpl statemachine context
       
   949     * @return ETrue if a state change occurred in the state machine
       
   950     *         EFalse otherwise
       
   951     */
       
   952     virtual TBool OnNoVoiceTimerTimeout( WlanContextImpl& aCtxImpl );
       
   953 
       
   954     /**
       
   955     * To be called upon Keep Alive Timer timeout
       
   956     *
       
   957     * @since S60 3.2
       
   958     * @param aCtxImpl statemachine context
       
   959     * @return ETrue if a state change occurred in the state machine
       
   960     *         EFalse otherwise
       
   961     */
       
   962     virtual TBool OnKeepAliveTimerTimeout( WlanContextImpl& aCtxImpl );    
       
   963 
       
   964     /**
       
   965     * Active to Light PS timer timeout function
       
   966     *
       
   967     * @since S60 v5.1
       
   968     * @param aCtxImpl statemachine context
       
   969     * @return ETrue if a state change occurred in the state machine
       
   970     *         EFalse otherwise
       
   971     */
       
   972     virtual TBool OnActiveToLightPsTimerTimeout( WlanContextImpl& aCtxImpl );
       
   973 
       
   974     /**
       
   975     * Light PS to Active timer timeout function
       
   976     *
       
   977     * @since S60 v5.1
       
   978     * @param aCtxImpl statemachine context
       
   979     * @return ETrue if a state change occurred in the state machine
       
   980     *         EFalse otherwise
       
   981     */
       
   982     virtual TBool OnLightPsToActiveTimerTimeout( WlanContextImpl& aCtxImpl );
       
   983 
       
   984     /**
       
   985     * Light PS to Deep PS timer timeout function
       
   986     *
       
   987     * @since S60 v5.1
       
   988     * @param aCtxImpl statemachine context
       
   989     * @return ETrue if a state change occurred in the state machine
       
   990     *         EFalse otherwise
       
   991     */
       
   992     virtual TBool OnLightPsToDeepPsTimerTimeout( WlanContextImpl& aCtxImpl );
       
   993     
       
   994     virtual void OnDfc( TAny* aCtx );
       
   995 
       
   996     /**
       
   997      * Request to send a Null Data Frame
       
   998      *
       
   999      * @since S60 v3.2
       
  1000      * @param aCtxImpl statemachine context
       
  1001      * @param aQosNull ETrue if a QoS Null Data frame should be transmitted
       
  1002      *                 EFalse if a regular Null Data frame should be transmitted
       
  1003      * @return ETrue if the send request was successfully submitted
       
  1004      *         EFalse otherwise
       
  1005      */
       
  1006     virtual TBool TxNullDataFrame( 
       
  1007         WlanContextImpl& aCtxImpl,
       
  1008         TBool aQosNull );
       
  1009 
       
  1010 public:  // new methods
       
  1011 
       
  1012     virtual void Entry( WlanContextImpl& aCtxImpl) = 0;
       
  1013     virtual void Exit( WlanContextImpl& aCtxImpl) = 0;
       
  1014 
       
  1015     /**
       
  1016     * Returns the states name
       
  1017     * @param aLength (OUT) length of the name of the state
       
  1018     * @return a pointer to begin of a buffer of name of the state
       
  1019     */
       
  1020 #ifndef NDEBUG 
       
  1021     virtual const TInt8* GetStateName( TUint8& aLength ) const = 0;
       
  1022 #endif // !NDEBUG 
       
  1023     
       
  1024 protected:
       
  1025 
       
  1026     /**
       
  1027     * C++ default constructor.
       
  1028     */
       
  1029     WlanMacState() {};
       
  1030 
       
  1031     /**
       
  1032     * Destructor.
       
  1033     */
       
  1034     virtual ~WlanMacState() {};
       
  1035 
       
  1036     // New methods
       
  1037 
       
  1038     // Indications
       
  1039 
       
  1040     virtual TBool DoErrorIndication( 
       
  1041         WlanContextImpl& aCtxImpl, 
       
  1042         WHA::TStatus aStatus );
       
  1043 
       
  1044     /**
       
  1045     * Indicates Consecutive Beacons Lost 
       
  1046     * to WLAN Mgmt Client; if necessary
       
  1047     * 
       
  1048     * @since S60 5.0
       
  1049     * @param aCtxImpl global statemachine context
       
  1050     */
       
  1051     virtual void DoConsecutiveBeaconsLostIndication( WlanContextImpl& aCtxImpl );
       
  1052 
       
  1053     /**
       
  1054     * Indicates Consecutive Tx Failures
       
  1055     * to WLAN Mgmt Client; if necessary
       
  1056     * 
       
  1057     * @since S60 5.0
       
  1058     * @param aCtxImpl global statemachine context
       
  1059     */
       
  1060     virtual void DoConsecutiveTxFailuresIndication( WlanContextImpl& aCtxImpl );
       
  1061 
       
  1062     /**
       
  1063     * Indicates Consecutive 802.11 Power Management Mode Set Failures
       
  1064     * to WLAN Mgmt Client; if necessary
       
  1065     * 
       
  1066     * @since S60 5.0
       
  1067     * @param aCtxImpl global statemachine context
       
  1068     */
       
  1069     virtual void DoConsecutivePwrModeSetFailuresIndication( 
       
  1070         WlanContextImpl& aCtxImpl );
       
  1071 
       
  1072     /**
       
  1073     * Indicates BSS Regained 
       
  1074     * to WLAN Mgmt Client; if necessary
       
  1075     * 
       
  1076     * @since S60 3.1
       
  1077     * @param aCtxImpl global statemachine context
       
  1078     */
       
  1079     virtual void DoRegainedBSSIndication( WlanContextImpl& aCtxImpl );
       
  1080 
       
  1081     virtual void DoRadarIndication( WlanContextImpl& aCtxImpl );
       
  1082 
       
  1083     virtual void DoRcpiIndication( 
       
  1084          WlanContextImpl& aCtxImpl,
       
  1085          WHA::TRcpi aRcpi );
       
  1086     
       
  1087     /**
       
  1088     * Indicates that the WLAN device has detected problems in the power
       
  1089     * save mode operation of the AP
       
  1090     * 
       
  1091     * @param aCtxImpl global statemachine context
       
  1092     */
       
  1093     virtual void DoPsModeErrorIndication( WlanContextImpl& aCtxImpl );
       
  1094     
       
  1095     /**
       
  1096     * Called from SetPowerMode() when desired power mode 
       
  1097     * differs from currently used one
       
  1098     * @param aCtxImpl statemachine context
       
  1099     */
       
  1100     virtual TBool OnDot11PwrMgmtTransitRequired( 
       
  1101         WlanContextImpl& aCtxImpl );
       
  1102 
       
  1103     /**
       
  1104     * Resolves is a frame given type and subtype 
       
  1105     * by comparing 2 frame control field LO bytes
       
  1106     * @param aLhs a frame control field LO byte
       
  1107     * @param aRhs a frame control field LO byte
       
  1108     * @param aTypeMatch (OUT) 
       
  1109     * ETrue = type fields matched, EFalse = type fields did NOT match
       
  1110     * @return ETrue = was a given type and subtype, 
       
  1111     * EFalse = was not a given type and subtype
       
  1112     */
       
  1113     static TBool IsRequestedFrameType(
       
  1114         TUint8 aLhs,
       
  1115         TUint8 aRhs,
       
  1116         TBool& aTypeMatch);
       
  1117 
       
  1118     /**
       
  1119     * Requests a new oid = signals completion of oid
       
  1120     * @param aCtxImpl statemachine context
       
  1121     * @param aReason reason code to user mode
       
  1122     */        
       
  1123     static void OnOidComplete( 
       
  1124         WlanContextImpl& aCtxImpl,
       
  1125         TInt aReason = KErrNone,
       
  1126         const TAny* aData = NULL, 
       
  1127         TUint32 aLengthInBytes = 0 );
       
  1128 
       
  1129     static void OnTxProtocolStackDataComplete( 
       
  1130         WlanContextImpl& aCtxImpl,
       
  1131         TDataBuffer* aMetaHeader,
       
  1132         TInt aCompletionCode = KErrNone );
       
  1133     
       
  1134     static void OnMgmtPathWriteComplete( 
       
  1135         WlanContextImpl& aCtxImpl,
       
  1136         TInt aCompletionCode = KErrNone );
       
  1137 
       
  1138     /**
       
  1139     * Sends an indication of an event to WLM
       
  1140     * @param aCtxImpl statemachine context
       
  1141     * @param aIndication an event that has occurred see #TIndication
       
  1142     */        
       
  1143     static void OnInDicationEvent( 
       
  1144         WlanContextImpl& aCtxImpl,
       
  1145         TIndication aIndication );
       
  1146 
       
  1147     /**
       
  1148     * Determines the Tx offset for every frame type which can be transmitted
       
  1149     *
       
  1150     * @param aCtxImpl global statemachine context
       
  1151     * @param aEthernetFrameTxOffset Tx offset for Ethernet frames
       
  1152     * @param aDot11FrameTxOffset Tx offset for complete 802.11 frames
       
  1153     * @param aSnapFrameTxOffset Tx offset for SNAP frames
       
  1154     */
       
  1155     void DetermineTxOffsets( 
       
  1156         WlanContextImpl& aCtxImpl,
       
  1157         TUint32& aEthernetFrameTxOffset,
       
  1158         TUint32& aDot11FrameTxOffset,
       
  1159         TUint32& aSnapFrameTxOffset ) const;            
       
  1160 
       
  1161 private:
       
  1162 
       
  1163     // Prohibit copy constructor.
       
  1164     WlanMacState( const WlanMacState& );
       
  1165     // Prohibit assigment operator.
       
  1166     WlanMacState& operator= ( const WlanMacState& );   
       
  1167 
       
  1168 private:    // Data
       
  1169         
       
  1170     };
       
  1171 
       
  1172 #endif      // WLANMACSTATE_H