wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacWsaSetBssParameters.cpp
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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:   Implementation of the WlanWsaSetBssParameters class
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 12 %
       
    20 */
       
    21 
       
    22 #include "config.h"
       
    23 #include "UmacWsaSetBssParameters.h"
       
    24 #include "UmacContextImpl.h"
       
    25 
       
    26 #ifndef NDEBUG 
       
    27 const TInt8 WlanWsaSetBssParameters::iName[] = "wsa-setbssparameters";
       
    28 #endif
       
    29 
       
    30 // ======== MEMBER FUNCTIONS ========
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // 
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 void WlanWsaSetBssParameters::Entry( WlanContextImpl& aCtxImpl )
       
    37     {
       
    38     // mark WSA cmd active
       
    39     aCtxImpl.ActivateWsaCmd();
       
    40 
       
    41     OsTracePrint( KWsaCmdStateDetails, 
       
    42         (TUint8*)("UMAC: WlanWsaSetBssParameters::Entry") );
       
    43     OsTracePrint( KWsaCmdStateDetails, (TUint8*)
       
    44         ("UMAC: WlanWsaSetBssParameters::Entry: iDtim: %d"), iDtim );
       
    45     OsTracePrint( KWsaCmdStateDetails, (TUint8*)
       
    46         ("UMAC: WlanWsaSetBssParameters::Entry: iAid: %d"),  iAid );
       
    47 
       
    48     OsTracePrint( KWsaCmdState, (TUint8*)
       
    49         ("UMAC: WHA-CMD-SetBssParameters") );
       
    50             
       
    51     // execute the command
       
    52     aCtxImpl.Wha().SetBssParameters( iDtim, iAid );
       
    53     }
       
    54 
       
    55 // ---------------------------------------------------------------------------
       
    56 // 
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 void WlanWsaSetBssParameters::Set( 
       
    60     WlanContextImpl& /*aCtxImpl*/,
       
    61     TUint32 aDtim,
       
    62     TUint32 aAid )
       
    63     {
       
    64     iDtim = aDtim;
       
    65     iAid = aAid;
       
    66     }
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // 
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 void WlanWsaSetBssParameters::CommandResponse( 
       
    73     WlanContextImpl& aCtxImpl, 
       
    74     WHA::TCommandId aCommandId, 
       
    75     WHA::TStatus aStatus,
       
    76     const WHA::UCommandResponseParams& aCommandResponseParams )
       
    77     {
       
    78     OsTracePrint( KWsaCmdState, 
       
    79         (TUint8*)("UMAC: WlanWsaSetBssParameters::CommandResponse") );
       
    80 
       
    81     if ( aCommandId == WHA::ESetBssParametersResponse )
       
    82         {        
       
    83         TraverseToHistoryState( aCtxImpl, 
       
    84             aCommandId, aStatus, aCommandResponseParams );    
       
    85         }
       
    86     else
       
    87         {
       
    88         OsTracePrint( KErrorLevel, 
       
    89             (TUint8*)("UMAC: aCommandId: %d"), aCommandId );
       
    90         OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
       
    91         }
       
    92     }
       
    93 
       
    94 // ---------------------------------------------------------------------------
       
    95 // 
       
    96 // ---------------------------------------------------------------------------
       
    97 //
       
    98 #ifndef NDEBUG 
       
    99 const TInt8* WlanWsaSetBssParameters::GetStateName( TUint8& aLength ) const
       
   100     {
       
   101     aLength = sizeof( iName );
       
   102     return iName;
       
   103     }
       
   104 #endif