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