|
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 WlanWsaInitiliaze class |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 13 % |
|
20 */ |
|
21 |
|
22 #include "config.h" |
|
23 #include "UmacWsaInitiliaze.h" |
|
24 #include "UmacContextImpl.h" |
|
25 |
|
26 #ifndef NDEBUG |
|
27 const TInt8 WlanWsaInitiliaze::iName[] = "wha-initiliaze"; |
|
28 #endif |
|
29 |
|
30 // ======== MEMBER FUNCTIONS ======== |
|
31 |
|
32 // --------------------------------------------------------------------------- |
|
33 // |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 void WlanWsaInitiliaze::Entry( WlanContextImpl& aCtxImpl ) |
|
37 { |
|
38 // mark WSA cmd active |
|
39 aCtxImpl.ActivateWsaCmd(); |
|
40 |
|
41 OsTracePrint( KWsaCmdStateDetails, (TUint8*) |
|
42 ("UMAC: WlanWsaInitiliaze::Entry: firmware size: %d"), iLength); |
|
43 OsTracePrint( KWsaCmdStateDetails, (TUint8*) |
|
44 ("UMAC: WlanWsaInitiliaze::Entry: firmware start address 0x%08x"), |
|
45 reinterpret_cast<TUint32>(iData)); |
|
46 |
|
47 OsTracePrint( KWsaCmdState, (TUint8*) |
|
48 ("UMAC: WHA-CMD-Initialize") ); |
|
49 |
|
50 aCtxImpl.Wha().Initialize( iData, iLength ); |
|
51 } |
|
52 |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 // --------------------------------------------------------------------------- |
|
56 // |
|
57 void WlanWsaInitiliaze::CommandResponse( |
|
58 WlanContextImpl& aCtxImpl, |
|
59 WHA::TCommandId aCommandId, |
|
60 WHA::TStatus aStatus, |
|
61 const WHA::UCommandResponseParams& aCommandResponseParams ) |
|
62 { |
|
63 if ( aCommandId == WHA::EInitializeResponse ) |
|
64 { |
|
65 TraverseToHistoryState( aCtxImpl, |
|
66 aCommandId, aStatus, aCommandResponseParams ); |
|
67 } |
|
68 else |
|
69 { |
|
70 OsTracePrint( KErrorLevel, |
|
71 (TUint8*)("UMAC: aCommandId: %d"), aCommandId ); |
|
72 OsAssert( (TUint8*)("UMAC: panic"), (TUint8*)(WLAN_FILE), __LINE__ ); |
|
73 } |
|
74 } |
|
75 |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 // --------------------------------------------------------------------------- |
|
79 // |
|
80 void WlanWsaInitiliaze::Set( |
|
81 WlanContextImpl& /*aCtxImpl*/, |
|
82 const TAny* aData, |
|
83 TUint32 aLength ) |
|
84 { |
|
85 OsTracePrint( KWsaCmdState, (TUint8*) |
|
86 ("UMAC: WlanWsaInitiliaze::Set: user space fw address: 0x%08x"), |
|
87 reinterpret_cast<TUint32>(aData) ); |
|
88 OsTracePrint( KWsaCmdState, (TUint8*) |
|
89 ("UMAC: WlanWsaInitiliaze::Set: length of fw: %d"), aLength ); |
|
90 |
|
91 iData = aData; |
|
92 iLength = aLength; |
|
93 } |
|
94 |
|
95 // --------------------------------------------------------------------------- |
|
96 // |
|
97 // --------------------------------------------------------------------------- |
|
98 // |
|
99 #ifndef NDEBUG |
|
100 const TInt8* WlanWsaInitiliaze::GetStateName( TUint8& aLength ) const |
|
101 { |
|
102 aLength = sizeof( iName ); |
|
103 return iName; |
|
104 } |
|
105 #endif |