|
1 /* |
|
2 * wlanhwinit.cpp |
|
3 * |
|
4 * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved. |
|
5 * All rights reserved. |
|
6 * |
|
7 * This program and the accompanying materials are made available under the |
|
8 * terms of the Eclipse Public License v1.0 or BSD License which accompanies |
|
9 * this distribution. The Eclipse Public License is available at |
|
10 * http://www.eclipse.org/legal/epl-v10.html and the BSD License is as below. |
|
11 * |
|
12 * Redistribution and use in source and binary forms, with or without |
|
13 * modification, are permitted provided that the following conditions |
|
14 * are met: |
|
15 * |
|
16 * * Redistributions of source code must retain the above copyright |
|
17 * notice, this list of conditions and the following disclaimer. |
|
18 * * Redistributions in binary form must reproduce the above copyright |
|
19 * notice, this list of conditions and the following disclaimer in |
|
20 * the documentation and/or other materials provided with the |
|
21 * distribution. |
|
22 * * Neither the name Texas Instruments nor the names of its |
|
23 * contributors may be used to endorse or promote products derived |
|
24 * from this software without specific prior written permission. |
|
25 * |
|
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|
27 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|
28 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|
29 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|
30 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
31 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
32 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
36 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
37 */ |
|
38 |
|
39 /** \file wlanhwinit.c |
|
40 * \brief TI WLAN Hardware init Driver |
|
41 * |
|
42 */ |
|
43 |
|
44 #include <wlanhwinit.h> |
|
45 #include "WiLink6_nvs.h" |
|
46 #include "wilink6_firmware.h" |
|
47 #include "wlanhwinitmain.h" |
|
48 #include "radio_ini.h" |
|
49 #define __FILE_ID__ FILE_ID_135 |
|
50 |
|
51 // ============================ MEMBER FUNCTIONS =============================== |
|
52 |
|
53 CWlanHwInit::CWlanHwInit() : |
|
54 iMain( NULL ) |
|
55 { |
|
56 } |
|
57 |
|
58 void CWlanHwInit::ConstructL() |
|
59 { |
|
60 /* create hwInitMain private class implemantion*/ |
|
61 iMain = CWlanHwInitMain::NewL(); |
|
62 |
|
63 } |
|
64 |
|
65 EXPORT_C CWlanHwInit* CWlanHwInit::NewL() |
|
66 { |
|
67 CWlanHwInit* self = new( ELeave ) CWlanHwInit; |
|
68 CleanupStack::PushL( self ); |
|
69 self->ConstructL(); |
|
70 CleanupStack::Pop(); |
|
71 |
|
72 return self; |
|
73 } |
|
74 |
|
75 EXPORT_C CWlanHwInit::~CWlanHwInit() |
|
76 { |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CWlanHwInit::GetHwInitData |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 EXPORT_C void CWlanHwInit::GetHwInitData( |
|
84 const TUint8** aInitData, |
|
85 TUint& aInitLength, |
|
86 const TUint8** aFwData, |
|
87 TUint& aFwLength ) |
|
88 { |
|
89 |
|
90 /* Call the CHWInitMain Class sicne all private members and method can only be stored there */ |
|
91 iMain->GetHwInitData( aInitData, aInitLength, aFwData, aFwLength ); |
|
92 |
|
93 |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // CWlanHwInit::GetMacAddress |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 EXPORT_C TInt CWlanHwInit::GetMacAddress( |
|
101 TMacAddr& aMacAddress ) |
|
102 { |
|
103 return iMain->GetMacAddress(aMacAddress); |
|
104 } |
|
105 |
|
106 |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // CWlanHwInit::GetHwTestInitData |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 EXPORT_C void CWlanHwInit::GetHwTestInitData( |
|
113 const TUint8** aInitData, |
|
114 TUint& aInitLength, |
|
115 const TUint8** aFwData, |
|
116 TUint& aFwLength ) |
|
117 { |
|
118 *aInitData = NULL; |
|
119 aInitLength = 0; |
|
120 *aFwData = NULL; |
|
121 aFwLength = 0; |
|
122 } |
|
123 |
|
124 // ----------------------------------------------------------------------------- |
|
125 // CWlanHwInit::GetHwTestData |
|
126 // ----------------------------------------------------------------------------- |
|
127 // |
|
128 EXPORT_C TInt CWlanHwInit::GetHwTestData( |
|
129 TUint /*aId*/, |
|
130 TDes8& /*aData*/ ) |
|
131 { |
|
132 return KErrNotSupported; |
|
133 } |
|
134 |
|
135 // ----------------------------------------------------------------------------- |
|
136 // CWlanHwInit::SetHwTestData |
|
137 // ----------------------------------------------------------------------------- |
|
138 // |
|
139 EXPORT_C TInt CWlanHwInit::SetHwTestData( |
|
140 TUint /*aId*/, |
|
141 TDesC8& /*aData*/ ) |
|
142 { |
|
143 return KErrNotSupported; |
|
144 } |