wlan_bearer/wlanldd/wlan_common/umac_common/src/umacwhastopscan.cpp
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2006-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 WlanWhaStopScan class
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 5 %
       
    20 */
       
    21 
       
    22 #include "config.h"
       
    23 #include "umacwhastopscan.h"
       
    24 #include "UmacContextImpl.h"
       
    25 
       
    26 #ifndef NDEBUG
       
    27 const TInt8 WlanWhaStopScan::iName[] = "wha-stopscan";
       
    28 #endif
       
    29 
       
    30 // ======== MEMBER FUNCTIONS ========
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // 
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 void WlanWhaStopScan::Entry( WlanContextImpl& aCtxImpl )
       
    37     {
       
    38     // mark WSA cmd active
       
    39     aCtxImpl.ActivateWsaCmd();
       
    40 
       
    41     OsTracePrint( KWsaCmdStateDetails, (TUint8*)
       
    42         ("UMAC: WlanWhaStopScan::Entry") );
       
    43 
       
    44     OsTracePrint( KWsaCmdState, (TUint8*)
       
    45         ("UMAC: WHA-CMD-StopScan") );
       
    46 
       
    47     // execute the command. 
       
    48     aCtxImpl.Wha().StopScan();
       
    49     }
       
    50 
       
    51 // -----------------------------------------------------------------------------
       
    52 // 
       
    53 // -----------------------------------------------------------------------------
       
    54 //
       
    55 #ifndef NDEBUG 
       
    56 const TInt8* WlanWhaStopScan::GetStateName( TUint8& aLength ) const
       
    57     {
       
    58     aLength = sizeof( iName );
       
    59     return iName;
       
    60     }
       
    61 #endif
       
    62 
       
    63 // -----------------------------------------------------------------------------
       
    64 // 
       
    65 // -----------------------------------------------------------------------------
       
    66 //
       
    67 void WlanWhaStopScan::CommandResponse( 
       
    68     WlanContextImpl& aCtxImpl, 
       
    69     WHA::TCommandId aCommandId, 
       
    70     WHA::TStatus aStatus,
       
    71     const WHA::UCommandResponseParams& aCommandResponseParams )
       
    72     {
       
    73     if ( aCommandId == WHA::EStopScanResponse )
       
    74         {
       
    75         TraverseToHistoryState( aCtxImpl, 
       
    76             aCommandId, aStatus, aCommandResponseParams );    
       
    77         }
       
    78     else
       
    79         {
       
    80         OsTracePrint( KErrorLevel, 
       
    81             (TUint8*)("UMAC: aCommandId: %d"), aCommandId );
       
    82         OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
       
    83         }
       
    84     }