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