0
|
1 |
/*
|
|
2 |
* TIWhaCb.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 |
|
|
40 |
/** \file TIWhaCB.c
|
|
41 |
* \brief TIWha Adaptation CB implementation
|
|
42 |
*
|
|
43 |
*/
|
|
44 |
|
|
45 |
|
|
46 |
#include "TIWha.h"
|
|
47 |
#include "TIWhaAdaptCb.h"
|
|
48 |
#ifdef FPGA1273_STAGE_
|
|
49 |
#warning FPGA
|
|
50 |
#include "fw1273_fpga.h"
|
|
51 |
#endif
|
|
52 |
extern "C"
|
|
53 |
{
|
|
54 |
#include "timer.h"
|
|
55 |
#include "report.h"
|
|
56 |
#include "TWDriver.h"
|
|
57 |
#include "WlanDrvCommon.h"
|
|
58 |
#include "version.h"
|
|
59 |
#define __FILE_ID__ FILE_ID_146
|
|
60 |
}
|
|
61 |
|
|
62 |
|
|
63 |
/**
|
|
64 |
* \fn prepareNextFwChunk
|
|
65 |
* \brief called for each Fw chunk. last chunk is marked with bLast
|
|
66 |
*
|
|
67 |
* \note
|
|
68 |
* \return
|
|
69 |
* \sa
|
|
70 |
*/
|
|
71 |
void TIWha:: prepareNextFwChunk ()
|
|
72 |
{
|
|
73 |
/* Move to the next chunk (if this is the first chunk then uLength == 0)*/
|
|
74 |
iFwFile.pBuffer += iFwFile.uLength;
|
|
75 |
|
|
76 |
/* read Chunk's address */
|
|
77 |
iFwFile.uAddress = BYTE_SWAP_LONG( *((TI_UINT32*)(iFwFile.pBuffer)) );
|
|
78 |
iFwFile.pBuffer += DRV_ADDRESS_SIZE;
|
|
79 |
/* read Portion's length */
|
|
80 |
iFwFile.uLength = BYTE_SWAP_LONG( *((TI_UINT32*)(iFwFile.pBuffer)) );
|
|
81 |
iFwFile.pBuffer += DRV_ADDRESS_SIZE;
|
|
82 |
|
|
83 |
/* decrease number of chunks left, and check if this is the last one */
|
|
84 |
if ( --iFwFile.uChunksLeft == 0 )
|
|
85 |
{
|
|
86 |
/* Last chunk. Next time we should continue with our own sequence */
|
|
87 |
iFwFile.bLast = TI_TRUE;
|
|
88 |
}
|
|
89 |
|
|
90 |
|
|
91 |
/*TRACE3(iTwdCtrl.hReport, REPORT_SEVERITY_INIT, TIWLANWHA_CB_MODULE_LOG, MSG_2195 , iFwFile.bLast, iFwFile.uChunksLeft, iFwFile.uLength, iFwFile.uAddress);*/
|
|
92 |
}
|
|
93 |
|
|
94 |
|
|
95 |
/* Thisis called whentxnQ_ConnectBus has finished */
|
|
96 |
void TIWha:: ConnectBusCb ( TI_STATUS status)
|
|
97 |
{
|
|
98 |
/* This will download the FW image into part with DMA of 512 bytes each time */
|
|
99 |
TWD_Init (iTwdCtrl.hTWD,
|
|
100 |
iTwdCtrl.hReport,
|
|
101 |
this,
|
|
102 |
iTwdCtrl.hTimer,
|
|
103 |
iTwdCtrl.hContext,
|
|
104 |
iTwdCtrl.hTxnQ,
|
|
105 |
(TTwdCallback)TIWhaAdaptCB::InitHw,
|
|
106 |
(TTwdCallback)TIWhaAdaptCB::InitFw,
|
|
107 |
(TTwdCallback)TIWhaAdaptCB::ConfigFw,
|
|
108 |
NULL,//(TTwdCallback)drvMain_TwdStopCb,
|
|
109 |
(TTwdCallback)TIWhaAdaptCB::InitFail);
|
|
110 |
|
|
111 |
/* Set the default ELP mode to be in awake mode */
|
|
112 |
TWD_CfgSleepAuth (iTwdCtrl.hTWD, POWERAUTHO_POLICY_AWAKE);
|
|
113 |
|
|
114 |
|
|
115 |
/*TRACE2(iTwdCtrl.hReport, REPORT_SEVERITY_INIT, TIWLANWHA_MODULE_LOG, MSG_2196, "data = 0x%x len = %d\n",aData,aLength);*/
|
|
116 |
|
|
117 |
/* Set Report default parameters in to the logger internal DB */
|
|
118 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INIT, "Set Defaults");
|
|
119 |
|
|
120 |
/* Setting the defaults values for the TWD and the Report modules
|
|
121 |
note that all parameters are hardcoded and not from a configuration file */
|
|
122 |
InitTwdParamTable ();
|
|
123 |
InitTwdPlatformGenParam();
|
|
124 |
|
|
125 |
/* FEM Auto Detection Configure Radio Params only if Manual mode selected*/
|
|
126 |
if (iAutoRadioParams.tGeneralParams.TXBiPFEMAutoDetect == FEM_MANUAL_DETECT_MODE_E)
|
|
127 |
{
|
|
128 |
/* fill TWD init parms with relevant (RFMD or TriQuint) Radio parms before calling TWD_SetDefault*/
|
|
129 |
InitTwdRadioParam();
|
|
130 |
}
|
|
131 |
|
|
132 |
|
|
133 |
/* Fill the default SmartReflex params */
|
|
134 |
InitTwdRadioSmartReflexParam();
|
|
135 |
|
|
136 |
/* Initializing the SG profile and params */
|
|
137 |
InitBtCoex();
|
|
138 |
|
|
139 |
TWD_SetDefaults (iTwdCtrl.hTWD, &(iTwdCtrl.twdInitParams));
|
|
140 |
|
|
141 |
|
|
142 |
TWD_SetRateMngDebug(iTwdCtrl.hTWD, &(iTwdCtrl.twdInitParams.tRateMngParams));
|
|
143 |
|
|
144 |
/* Set the default burst mode to false */
|
|
145 |
TWD_CfgBurstMode (iTwdCtrl.hTWD, BURST_MODE_ENABLE_DEF);
|
|
146 |
|
|
147 |
/* Set the SG params to the wlan internal DB */
|
|
148 |
/* BTCOEX_DEFAULT_MODE is set to SG_OPPORTUNISTIC */
|
|
149 |
SoftGemini_SetParams(iTwdCtrl.hTWD,&iSgParams,BTCOEX_DEFAULT_MODE);
|
|
150 |
|
|
151 |
|
|
152 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INIT, "Register CB/Events");
|
|
153 |
|
|
154 |
RegisterCb ();
|
|
155 |
RegisterEvents ();
|
|
156 |
|
|
157 |
/* sending the NVS buffer - it can be default or real nvs*/
|
|
158 |
if ( TWD_InitHw (iTwdCtrl.hTWD,ipNVSbuf,iNVSlength) != TI_OK)
|
|
159 |
{
|
|
160 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_FATAL_ERROR, "\n.....TWD_InitHw failure \n");
|
|
161 |
}
|
|
162 |
}
|
|
163 |
|
|
164 |
|
|
165 |
/**
|
|
166 |
* \fn InitHwCb
|
|
167 |
* \brief called after init was done
|
|
168 |
*
|
|
169 |
* kick the next stage of itit after all TWD modules wew initialaized.
|
|
170 |
*
|
|
171 |
* \note
|
|
172 |
* \param hTIWha - Handle to the TIWha object
|
|
173 |
* \param aStatus - status
|
|
174 |
* \return
|
|
175 |
* \sa
|
|
176 |
*/
|
|
177 |
void TIWha:: InitHwCb ( TI_STATUS status)
|
|
178 |
{
|
|
179 |
uint8 FemType;
|
|
180 |
|
|
181 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INIT, "\n");
|
|
182 |
|
|
183 |
/* FEM Auto Detection Configure Radio Params only if Manual mode selected*/
|
|
184 |
if (iAutoRadioParams.tGeneralParams.TXBiPFEMAutoDetect == FEM_MANUAL_DETECT_MODE_E)
|
|
185 |
{
|
|
186 |
FemType = TWD_GetFEMType(iTwdCtrl.hTWD);
|
|
187 |
|
|
188 |
if (FemType != iAutoRadioParams.tGeneralParams.TXBiPFEMManufacturer)
|
|
189 |
{
|
|
190 |
WLAN_OS_REPORT(("TIWha:: InitHwCb ERROR Manual FEM is %d real FEM is %d \n",iAutoRadioParams.tGeneralParams.TXBiPFEMManufacturer,FemType));
|
|
191 |
}
|
|
192 |
}
|
|
193 |
|
|
194 |
/* update Radio params due to FEM type*/
|
|
195 |
if (iAutoRadioParams.tGeneralParams.TXBiPFEMAutoDetect == FEM_AUTO_DETECT_MODE_E)
|
|
196 |
{
|
|
197 |
/* fill TWD init parms with relevant (RFMD or TriQuint) Radio parms before calling TWD_SetDefault*/
|
|
198 |
InitTwdRadioParam();
|
|
199 |
/* FEM Auto Detect, calling agian TWD_SetDefault, to store real Radio params in TWD DB due to FEM detection */
|
|
200 |
TWD_SetDefaults (iTwdCtrl.hTWD, &(iTwdCtrl.twdInitParams));
|
|
201 |
|
|
202 |
}
|
|
203 |
|
|
204 |
/*
|
|
205 |
* prepare Fw file.
|
|
206 |
*/
|
|
207 |
|
|
208 |
/* First chunk points to begining of Fw */
|
|
209 |
/* This was retrieved in Iniatialize iFwFile.pBuffer = (TI_UINT8*)firmware;*/
|
|
210 |
/* length of chunk will be updated later in prepareNextFwChunk() */
|
|
211 |
iFwFile.uLength = 0;
|
|
212 |
/* First 4 bytes indicate the number of chunks */
|
|
213 |
iFwFile.uChunksLeft = BYTE_SWAP_LONG( *((TI_UINT32*)(iFwFile.pBuffer)) );
|
|
214 |
iFwFile.pBuffer += DRV_ADDRESS_SIZE;
|
|
215 |
|
|
216 |
/* Mark if we are in the last chunk (i.e. only one chunk) */
|
|
217 |
iFwFile.bLast = ( iFwFile.uChunksLeft == 1 ? TI_TRUE : TI_FALSE);
|
|
218 |
|
|
219 |
/* Prepare next chunk for initFw */
|
|
220 |
prepareNextFwChunk ();
|
|
221 |
|
|
222 |
/* call TWD with first chunk */
|
|
223 |
TWD_InitFw ( iTwdCtrl.hTWD, &iFwFile);
|
|
224 |
}
|
|
225 |
|
|
226 |
|
|
227 |
/**
|
|
228 |
* \fn InitFwCb
|
|
229 |
* \brief after FW download
|
|
230 |
*
|
|
231 |
* giv back the context to the UMAC for configuration
|
|
232 |
*
|
|
233 |
* \note
|
|
234 |
* \param hTIWha - Handle to the TIWha object
|
|
235 |
* \param aStatus - status
|
|
236 |
* \return
|
|
237 |
* \sa
|
|
238 |
*/
|
|
239 |
void TIWha:: InitFwCb ( TI_STATUS status)
|
|
240 |
{
|
|
241 |
TRACE2(iTwdCtrl.hReport, REPORT_SEVERITY_INIT, " last = %d ChunksLeft = %d\n", iFwFile.bLast, iFwFile.uChunksLeft);
|
|
242 |
|
|
243 |
if (status != TI_OK )
|
|
244 |
{
|
|
245 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_ERROR, " status = %d \n", status);
|
|
246 |
}
|
|
247 |
|
|
248 |
/* check if another rounf of FW download is needed */
|
|
249 |
if ( iFwFile.bLast == TI_FALSE )
|
|
250 |
{
|
|
251 |
/* download another chunk */
|
|
252 |
prepareNextFwChunk ();
|
|
253 |
TWD_InitFw ( iTwdCtrl.hTWD, &iFwFile);
|
|
254 |
}
|
|
255 |
else
|
|
256 |
{
|
|
257 |
/* Call Init Response with the given status */
|
|
258 |
InitResponse ((WHA::TStatus)status);
|
|
259 |
}
|
|
260 |
/* next step will be configure from UMAC */
|
|
261 |
}
|
|
262 |
|
|
263 |
/**
|
|
264 |
* \fn ConfigFwCb
|
|
265 |
* \brief after FW configured
|
|
266 |
*
|
|
267 |
* after FW configured using the set defauls stage.
|
|
268 |
*
|
|
269 |
* \note
|
|
270 |
* \param hTIWha - Handle to the TIWha object
|
|
271 |
* \param aStatus - status
|
|
272 |
* \return
|
|
273 |
* \sa
|
|
274 |
*/
|
|
275 |
void TIWha:: ConfigFwCb ( TI_STATUS status)
|
|
276 |
{
|
|
277 |
|
|
278 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_INIT, " status = %d\n",status);
|
|
279 |
|
|
280 |
if (status == TI_OK)
|
|
281 |
{
|
|
282 |
/* Register the command complete generic callback. From now on we will get response for every command */
|
|
283 |
TWD_RegisterCb (iTwdCtrl.hTWD, TWD_EVENT_COMMAND_COMPLETE,
|
|
284 |
(TTwdCB *)TIWhaAdaptCB::GenericCommandResponse, this);
|
|
285 |
|
|
286 |
/* Enable external events from FW */
|
|
287 |
TWD_EnableExternalEvents (iTwdCtrl.hTWD);
|
|
288 |
|
|
289 |
/* At this stage now send back the Command Response of the Configure stage to the UMAC */
|
|
290 |
if( bErrorIndication == TI_FALSE)
|
|
291 |
{
|
|
292 |
WhaCb()->CommandResponse(WHA::EConfigureResponse, WHA::KSuccess, iUCommandResponseParams);
|
|
293 |
}
|
|
294 |
#if TI_DBG
|
|
295 |
else
|
|
296 |
{
|
|
297 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
298 |
}
|
|
299 |
#endif
|
|
300 |
|
|
301 |
/* Indicate that UMAC will send the Release() command by itself, since EConfigureResponse was sent */
|
|
302 |
bCallRelease = TI_FALSE;
|
|
303 |
|
|
304 |
}
|
|
305 |
else /* Configure Failure - Send error indication since it is the only thing that will unload the driver */
|
|
306 |
{
|
|
307 |
TIWhaAdaptCB::FailureIndication (this, HW_AWAKE_FAILURE);
|
|
308 |
}
|
|
309 |
}
|
|
310 |
|
|
311 |
|
|
312 |
/**
|
|
313 |
* \fn InitFailCb
|
|
314 |
* \brief general fail in init/configure stages
|
|
315 |
*
|
|
316 |
* \note
|
|
317 |
* \param hTIWha - Handle to the TIWha object
|
|
318 |
* \param aStatus - status
|
|
319 |
* \return
|
|
320 |
* \sa
|
|
321 |
*/
|
|
322 |
void TIWha::InitFailCb ( TI_STATUS status)
|
|
323 |
{
|
|
324 |
InitResponse ((WHA::TStatus)WHA::KFailed);
|
|
325 |
}
|
|
326 |
|
|
327 |
/**
|
|
328 |
* \fn ConnectionTimeOut
|
|
329 |
* \brief change rate management parameters after the connection phase
|
|
330 |
*
|
|
331 |
* \note
|
|
332 |
* \return
|
|
333 |
* \sa
|
|
334 |
*/
|
|
335 |
void TIWha::ConnectionTimeOut ()
|
|
336 |
{
|
|
337 |
TRACE1( iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "%s\n",__FUNCTION__);
|
|
338 |
|
|
339 |
bConnectionTimerRunning = TI_FALSE;
|
|
340 |
SetTxFailLowThreshold(TIWHA_TX_FAIL_LOW_TH_AFTER_CONNECTION);
|
|
341 |
}
|
|
342 |
|
|
343 |
/**
|
|
344 |
* \fn SetTxFailLowThreshold
|
|
345 |
* \brief Set new Tx Fail rate to FW
|
|
346 |
*
|
|
347 |
* \note
|
|
348 |
* \return
|
|
349 |
* \sa
|
|
350 |
*/
|
|
351 |
void TIWha::SetTxFailLowThreshold( TI_UINT8 uTxFailLowTh)
|
|
352 |
{
|
|
353 |
RateMangeParams_t tRM;
|
|
354 |
|
|
355 |
TRACE2( iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "%s Th = %d\n",__FUNCTION__,uTxFailLowTh);
|
|
356 |
/* Set the Tx fail Threshold again to the FW */
|
|
357 |
tRM.paramIndex = RATE_MGMT_TX_FAIL_LOW_TH_PARAM;
|
|
358 |
tRM.TxFailLowTh = uTxFailLowTh;
|
|
359 |
/* CommandResponse would be ignored for this call (for ACX_SET_RATE_MAMAGEMENT_PARAMS) */
|
|
360 |
TWD_SetRateMngDebug(iTwdCtrl.hTWD, &tRM);
|
|
361 |
}
|
|
362 |
/**
|
|
363 |
* \fn FailureIndication
|
|
364 |
* \brief fail CB for the driver
|
|
365 |
*
|
|
366 |
* propogats faliure indication
|
|
367 |
* \note
|
|
368 |
* \param failureEvent - failure Event
|
|
369 |
* \return
|
|
370 |
* \sa
|
|
371 |
*/
|
|
372 |
void TIWha::FailureIndicationCb ( EFailureEvent failureEvent)
|
|
373 |
{
|
|
374 |
bFailureIndication = TI_TRUE;
|
|
375 |
|
|
376 |
/*
|
|
377 |
* Check if we should call Release() directly since UMAC calls release only after
|
|
378 |
* successful EConfigureResponse
|
|
379 |
*/
|
|
380 |
if (bCallRelease)
|
|
381 |
{
|
|
382 |
|
|
383 |
/* in case we are before configure complete save the failure event to send it later */
|
|
384 |
ifailureEvent = failureEvent;
|
|
385 |
|
|
386 |
iConnectionCounter++;
|
|
387 |
WLAN_OS_REPORT(("POR identified - Reconnecting #%d \n", iConnectionCounter));
|
|
388 |
|
|
389 |
/* if we have consecutive failures then add delayes till next reconnect to increase success probability */
|
|
390 |
if (iConnectionCounter > 2)
|
|
391 |
{
|
|
392 |
/* if we fail more than 5 times notify the upper layer on failure to initailze */
|
|
393 |
if (iConnectionCounter > 5)
|
|
394 |
{
|
|
395 |
|
|
396 |
bCallRelease = TI_FALSE;
|
|
397 |
/* If we recognize failure in init time then release the driver and try to intialize again */
|
|
398 |
Release(TRUE);
|
|
399 |
|
|
400 |
WLAN_OS_REPORT((" ************** FailureIndicationCb == %d ****************** \n",ifailureEvent));
|
|
401 |
|
|
402 |
/* call to LDD with failure indication */
|
|
403 |
if( bErrorIndication == TI_FALSE)
|
|
404 |
{
|
|
405 |
WhaCb()->Indication (WHA::EError, iUIndicationParams);
|
|
406 |
}
|
|
407 |
#if TI_DBG
|
|
408 |
else
|
|
409 |
{
|
|
410 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
411 |
}
|
|
412 |
#endif
|
|
413 |
|
|
414 |
return;
|
|
415 |
}
|
|
416 |
/* 2 < iConnectionCounter <= 5 */
|
|
417 |
else
|
|
418 |
{
|
|
419 |
/* If we recognize failure in init time then release the driver and try to intialize again */
|
|
420 |
Release(TRUE);
|
|
421 |
/* If we have more than 2 conssecutive failures wait 400ms before turning on the device */
|
|
422 |
os_StalluSec ((TI_HANDLE)&iTwdCtrl.tOsContext, STALL_ON_FAILURE );
|
|
423 |
}
|
|
424 |
}
|
|
425 |
/* iConnectionCounter <= 2 */
|
|
426 |
else
|
|
427 |
{
|
|
428 |
/* If we recognize failure in init time then release the driver and try to intialize again */
|
|
429 |
Release(TRUE);
|
|
430 |
/* Wait 1ms before turning on the device */
|
|
431 |
os_StalluSec ((TI_HANDLE)&iTwdCtrl.tOsContext, STALL_ON_RECONNECT );
|
|
432 |
}
|
|
433 |
Initialize(iData, iLength);
|
|
434 |
|
|
435 |
bFailureIndication = TI_FALSE;
|
|
436 |
|
|
437 |
return;
|
|
438 |
|
|
439 |
}
|
|
440 |
|
|
441 |
|
|
442 |
TRACE1( iTwdCtrl.hReport, REPORT_SEVERITY_ERROR, " ************** FailureIndicationCb == %d ****************** \n",failureEvent);
|
|
443 |
|
|
444 |
#ifndef NO_ERROR_INDICATION
|
|
445 |
/* Always return MacNotResponding in case of an EEROR */
|
|
446 |
iUIndicationParams.iError.iStatus = WHA::KErrorMacNotResponding;
|
|
447 |
|
|
448 |
if( bErrorIndication == TI_FALSE)
|
|
449 |
{
|
|
450 |
WhaCb()->Indication (WHA::EError, iUIndicationParams);
|
|
451 |
}
|
|
452 |
#if TI_DBG
|
|
453 |
else
|
|
454 |
{
|
|
455 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
456 |
}
|
|
457 |
#endif
|
|
458 |
|
|
459 |
#endif
|
|
460 |
|
|
461 |
/* Mark that from now on there will be no calls to LDD (this is done with a dummy WhaCb() ) */
|
|
462 |
bErrorIndication = TI_TRUE;
|
|
463 |
}
|
|
464 |
|
|
465 |
/**
|
|
466 |
* \fn RcpiIndication
|
|
467 |
* \brief rcpi CB for the driver
|
|
468 |
*
|
|
469 |
* propogats rcpi indication
|
|
470 |
* \note
|
|
471 |
* \param buffer - RCPI value
|
|
472 |
* \return
|
|
473 |
* \sa
|
|
474 |
*/
|
|
475 |
void TIWha::RcpiIndicationCb ( TUint8* buffer, TUint32 len)
|
|
476 |
{
|
|
477 |
TRACE0( iTwdCtrl.hReport, REPORT_SEVERITY_WARNING, " *********** RcpiIndication ****************** \n");
|
|
478 |
|
|
479 |
iUIndicationParams.iRcpi.iRcpi= *((WHA::TRcpi*)buffer);
|
|
480 |
if( bErrorIndication == TI_FALSE)
|
|
481 |
{
|
|
482 |
WhaCb()->Indication (WHA::ERcpi, iUIndicationParams);
|
|
483 |
}
|
|
484 |
#if TI_DBG
|
|
485 |
else
|
|
486 |
{
|
|
487 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
488 |
}
|
|
489 |
#endif
|
|
490 |
}
|
|
491 |
|
|
492 |
|
|
493 |
/**
|
|
494 |
* \fn TIWha_ScanResponseCb
|
|
495 |
* \brief Scan complete CB call directly to the host driver command response
|
|
496 |
*
|
|
497 |
* Function detailed description goes here
|
|
498 |
*
|
|
499 |
* \note
|
|
500 |
* \param aStatus - status
|
|
501 |
* \return
|
|
502 |
* \sa
|
|
503 |
*/
|
|
504 |
void TIWha::ScanResponseCb (WHA::TStatus aStatus)
|
|
505 |
{
|
|
506 |
|
|
507 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, " aStatus = %d\n", aStatus);
|
|
508 |
|
|
509 |
if( bErrorIndication == TI_FALSE)
|
|
510 |
{
|
|
511 |
(WhaCb())->CommandResponse(WHA::EScanCommandResponse, WHA::KSuccess, iUCommandResponseParams);
|
|
512 |
}
|
|
513 |
#if TI_DBG
|
|
514 |
else
|
|
515 |
{
|
|
516 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
517 |
}
|
|
518 |
#endif
|
|
519 |
}
|
|
520 |
|
|
521 |
/**
|
|
522 |
* \fn ScanCompleteCb
|
|
523 |
* \brief Scan complete CB.
|
|
524 |
*
|
|
525 |
* \note
|
|
526 |
* \param PSMode - not used
|
|
527 |
* \param returnStatus - status
|
|
528 |
* \return
|
|
529 |
* \sa
|
|
530 |
*/
|
|
531 |
void TIWha::ScanCompleteCb (TI_STATUS returnStatus , E80211PsStatus PSMode)
|
|
532 |
{
|
|
533 |
WHA::TStatus status = ( returnStatus == TI_OK ) ? WHA::KSuccess : WHA::KFailed;
|
|
534 |
|
|
535 |
/* return PS state by using PowerSaveSrv in TWD */
|
|
536 |
iUCommandCompletionParams.iScanComplete.iDot11PowerManagementMode = TWD_GetPsStatus (iTwdCtrl.hTWD) ? WHA::KPsEnable : WHA::KPsDisable;
|
|
537 |
|
|
538 |
TRACE2(iTwdCtrl.hTWD, REPORT_SEVERITY_INFORMATION , " - status = %d iDot11PowerManagementMode = %d\n", status, iUCommandCompletionParams.iScanComplete.iDot11PowerManagementMode );
|
|
539 |
|
|
540 |
if( bErrorIndication == TI_FALSE)
|
|
541 |
{
|
|
542 |
WhaCb()->CommandComplete(WHA::EScanComplete, status, iUCommandCompletionParams);
|
|
543 |
}
|
|
544 |
#if TI_DBG
|
|
545 |
else
|
|
546 |
{
|
|
547 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
548 |
}
|
|
549 |
#endif
|
|
550 |
|
|
551 |
/* Set back the ReceivePacket CB to norman path */
|
|
552 |
TWD_RegisterCb (iTwdCtrl.hTWD,
|
|
553 |
TWD_EVENT_RX_RECEIVE_PACKET,
|
|
554 |
(TTwdCB *)TIWhaAdaptCB::ReceivePacket,
|
|
555 |
this);
|
|
556 |
}
|
|
557 |
|
|
558 |
|
|
559 |
/**
|
|
560 |
* \fn GenericCommandResponseCb
|
|
561 |
* \brief Whenever we don't have a specific callback we get into here
|
|
562 |
*
|
|
563 |
* \param CmdType - Command Type
|
|
564 |
* \param CmdID - ACX ID
|
|
565 |
* \param aStatus - Success or Failure
|
|
566 |
* \return
|
|
567 |
* \sa
|
|
568 |
*/
|
|
569 |
void TIWha::GenericCommandResponseCb ( TUint16 CmdType, TUint16 CmdID, TUint32 aStatus)
|
|
570 |
{
|
|
571 |
WHA::TCommandId commandId = WHA::EWriteMIBResponse; /* By default we get here on WriteMib response */
|
|
572 |
|
|
573 |
TRACE3(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "GenericCommandResponseCb Command = 0x%x, ACX = 0x%x, status = %d\n", CmdType, CmdID, aStatus);
|
|
574 |
|
|
575 |
switch (CmdType)
|
|
576 |
{
|
|
577 |
/* Do not send Command Response in case of Ps Mode ==> this may happen when doing Scan in ForceBackgroundScan Type
|
|
578 |
that sets the PS to be entered and then a Command Response of Entering PS mode is received via this channel although the Scan command has been issued */
|
|
579 |
case CMD_SET_PS_MODE:
|
|
580 |
return;
|
|
581 |
|
|
582 |
case CMD_CONFIGURE:
|
|
583 |
switch (CmdID)
|
|
584 |
{
|
|
585 |
case ACX_TID_CFG:
|
|
586 |
commandId = WHA::EConfigureQueueResponse;
|
|
587 |
break;
|
|
588 |
case ACX_AC_CFG:
|
|
589 |
commandId = WHA::EConfigureACResponse;
|
|
590 |
break;
|
|
591 |
case ACX_AID:
|
|
592 |
commandId = WHA::ESetBssParametersResponse;
|
|
593 |
break;
|
|
594 |
|
|
595 |
case ACX_SLEEP_AUTH:
|
|
596 |
if ( ! iTwdCtrl.bResponse )
|
|
597 |
{ /* In this case we don't send response since it is an internal command */
|
|
598 |
return;
|
|
599 |
}
|
|
600 |
break;
|
|
601 |
#ifdef HT_SUPPORT
|
|
602 |
case ACX_BA_SESSION_RESPONDER_POLICY:
|
|
603 |
case ACX_BA_SESSION_INITIATOR_POLICY:
|
|
604 |
iBACounertRespone--;
|
|
605 |
if (iBACounertRespone > 0)
|
|
606 |
{
|
|
607 |
return;
|
|
608 |
}
|
|
609 |
commandId = WHA::EWriteMIBResponse;
|
|
610 |
break;
|
|
611 |
#endif /* HT_SUPPORT */
|
|
612 |
|
|
613 |
/* In this case it is an internal MIB so do not send response to upper layer */
|
|
614 |
case ACX_PREAMBLE_TYPE:
|
|
615 |
return;
|
|
616 |
/* Internal command before join and after full connection */
|
|
617 |
case ACX_SET_RATE_MAMAGEMENT_PARAMS:
|
|
618 |
return;
|
|
619 |
}
|
|
620 |
break;
|
|
621 |
|
|
622 |
case CMD_STOP_SCAN:
|
|
623 |
/* The regular StopScan command always goes through StopScanResponseCb(). This is a special
|
|
624 |
* error case where ScanSrv decided to send StopScan. Therefore we shouldn't forward the indication
|
|
625 |
* to UMAC
|
|
626 |
*/
|
|
627 |
return;
|
|
628 |
|
|
629 |
case CMD_START_JOIN:
|
|
630 |
/*
|
|
631 |
* In TWD we have 'join response' and 'join complete' while Symbian defines only 'join response'.
|
|
632 |
* Hence, here we ignore the response, and the join complete returns to Symbian as EJoinResponse
|
|
633 |
*/
|
|
634 |
return;
|
|
635 |
|
|
636 |
case CMD_DISCONNECT:
|
|
637 |
commandId = WHA::EResetResponse;
|
|
638 |
break;
|
|
639 |
|
|
640 |
case CMD_SET_STA_STATE:
|
|
641 |
/* This is an internal command sent by WHA at Set AID method.
|
|
642 |
This is used to indicate the FW that the STA is connected for COEX and 11N BA */
|
|
643 |
return;
|
|
644 |
|
|
645 |
default:
|
|
646 |
break;
|
|
647 |
}
|
|
648 |
|
|
649 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "GenericCommandResponseCb sending response to UMAC status = %d\n",aStatus);
|
|
650 |
|
|
651 |
if( bErrorIndication == TI_FALSE)
|
|
652 |
{
|
|
653 |
WhaCb()->CommandResponse(commandId, aStatus, iUCommandResponseParams);
|
|
654 |
}
|
|
655 |
#if TI_DBG
|
|
656 |
else
|
|
657 |
{
|
|
658 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
659 |
}
|
|
660 |
#endif
|
|
661 |
}
|
|
662 |
|
|
663 |
/**
|
|
664 |
* \fn InitResponse
|
|
665 |
* \brief ititializatin response function. In case of success - return command response
|
|
666 |
* In case of error - send error indication (as requested from Palau)
|
|
667 |
*
|
|
668 |
* /note
|
|
669 |
*
|
|
670 |
* /param aTwdInitStatus - Whether Init was successful
|
|
671 |
*
|
|
672 |
* /return
|
|
673 |
*/
|
|
674 |
void TIWha::InitResponse (WHA::TStatus aTwdInitStatus)
|
|
675 |
{
|
|
676 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_INIT, " status = %d\n",aTwdInitStatus);
|
|
677 |
|
|
678 |
if (aTwdInitStatus == WHA::KSuccess)
|
|
679 |
{
|
|
680 |
if( bErrorIndication == TI_FALSE)
|
|
681 |
{
|
|
682 |
WhaCb()->CommandResponse(WHA::EInitializeResponse, WHA::KSuccess, iUCommandResponseParams);
|
|
683 |
}
|
|
684 |
#if TI_DBG
|
|
685 |
else
|
|
686 |
{
|
|
687 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
688 |
}
|
|
689 |
#endif
|
|
690 |
|
|
691 |
}
|
|
692 |
else /* Init Failure - Send error indication since it is the only thing that will unload the driver */
|
|
693 |
{
|
|
694 |
/* Call UMAC with error indication */
|
|
695 |
TIWhaAdaptCB::FailureIndication (this, HW_AWAKE_FAILURE);
|
|
696 |
}
|
|
697 |
}
|
|
698 |
|
|
699 |
|
|
700 |
/****************************************************************************************
|
|
701 |
* MeasureComplete() *
|
|
702 |
****************************************************************************************
|
|
703 |
DESCRIPTION:
|
|
704 |
|
|
705 |
INPUT:
|
|
706 |
|
|
707 |
OUTPUT:
|
|
708 |
|
|
709 |
RETURN:
|
|
710 |
|
|
711 |
************************************************************************/
|
|
712 |
void TIWha::MeasureCompleteCb ( TMeasurementReply* msrReply)
|
|
713 |
{
|
|
714 |
return;
|
|
715 |
}
|
|
716 |
|
|
717 |
|
|
718 |
/****************************************************************************************
|
|
719 |
* MeasureResponse() *
|
|
720 |
****************************************************************************************
|
|
721 |
DESCRIPTION:
|
|
722 |
|
|
723 |
INPUT:
|
|
724 |
|
|
725 |
OUTPUT:
|
|
726 |
|
|
727 |
RETURN:
|
|
728 |
|
|
729 |
************************************************************************/
|
|
730 |
void TIWha::MeasureResponseCb ( TUint16 aStatus)
|
|
731 |
{
|
|
732 |
return;
|
|
733 |
}
|
|
734 |
|
|
735 |
|
|
736 |
/****************************************************************************************
|
|
737 |
* StopMeasureResponse() *
|
|
738 |
****************************************************************************************
|
|
739 |
DESCRIPTION:
|
|
740 |
|
|
741 |
INPUT:
|
|
742 |
|
|
743 |
OUTPUT:
|
|
744 |
|
|
745 |
RETURN:
|
|
746 |
|
|
747 |
************************************************************************/
|
|
748 |
void TIWha::StopMeasureResponseCb ( TUint16 aStatus)
|
|
749 |
{
|
|
750 |
return;
|
|
751 |
}
|
|
752 |
|
|
753 |
|
|
754 |
|
|
755 |
/**
|
|
756 |
* \fn SetPsModeResponseCb
|
|
757 |
*
|
|
758 |
*
|
|
759 |
* /param aStatus
|
|
760 |
*
|
|
761 |
* /return
|
|
762 |
*/
|
|
763 |
void TIWha::SetPsModeResponseCb (TUint8 aStatus)
|
|
764 |
{
|
|
765 |
WHA::TStatus status = ( aStatus == TI_OK ) ? WHA::KSuccess : WHA::KFailed;
|
|
766 |
|
|
767 |
TRACE2(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION , " - aStatus: = %d status = %d\n", aStatus, status);
|
|
768 |
|
|
769 |
if( bErrorIndication == TI_FALSE)
|
|
770 |
{
|
|
771 |
WhaCb()->CommandResponse (WHA::ESetPsModeCommandResponse, status, iUCommandResponseParams);
|
|
772 |
}
|
|
773 |
#if TI_DBG
|
|
774 |
else
|
|
775 |
{
|
|
776 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
777 |
}
|
|
778 |
#endif
|
|
779 |
}
|
|
780 |
|
|
781 |
|
|
782 |
/**
|
|
783 |
* \fn SetPsModeCompleteCb
|
|
784 |
*
|
|
785 |
*
|
|
786 |
* /param aStatus
|
|
787 |
*
|
|
788 |
* /return
|
|
789 |
*/
|
|
790 |
void TIWha::SetPsModeCompleteCb (TUint8 PSMode, TUint8 transStatus)
|
|
791 |
{
|
|
792 |
/* By default the request was successful */
|
|
793 |
WHA::TStatus status = WHA::KSuccess;
|
|
794 |
/* By default we are not in 802.11 ps mode */
|
|
795 |
WHA::TPsMode psMode = WHA::KPsDisable;
|
|
796 |
|
|
797 |
switch (transStatus)
|
|
798 |
{
|
|
799 |
case ENTER_POWER_SAVE_FAIL :
|
|
800 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_ERROR , " - status: Enter PowerSaveFailure\n");
|
|
801 |
|
|
802 |
status = WHA::KFailed;
|
|
803 |
break;
|
|
804 |
|
|
805 |
case EXIT_POWER_SAVE_FAIL :
|
|
806 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_ERROR , " - status: Exit PowerSaveFailure (but we our awake anyway)\n");
|
|
807 |
/* PS State is awake because even if we failed - we are not in PS - but the return is Failed */
|
|
808 |
status = WHA::KFailed;
|
|
809 |
break;
|
|
810 |
|
|
811 |
case ENTER_POWER_SAVE_SUCCESS :
|
|
812 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION , " - status: Enter PowerSave Success\n");
|
|
813 |
psMode = WHA::KPsEnable;
|
|
814 |
break;
|
|
815 |
|
|
816 |
case EXIT_POWER_SAVE_SUCCESS :
|
|
817 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION , " - status: Exit PowerSave Success\n");
|
|
818 |
break;
|
|
819 |
|
|
820 |
default :
|
|
821 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_ERROR , " unknown- status = %d: Failed\n", __FUNCTION__);
|
|
822 |
status = WHA::KFailed;
|
|
823 |
}
|
|
824 |
|
|
825 |
/*
|
|
826 |
* On any case other then ENTER_POWER_SAVE_FAIL we change sleep mode
|
|
827 |
* Note that on EXIT_POWER_SAVE_FAIL we are actually awake and therfore we change sleepMode
|
|
828 |
*/
|
|
829 |
if ( transStatus != ENTER_POWER_SAVE_FAIL && transStatus != EXIT_POWER_SAVE_SUCCESS)
|
|
830 |
{
|
|
831 |
/* Configure Awake if we are in PsDisable and user-defined sleepMode otherwise */
|
|
832 |
if ( psMode == WHA::KPsEnable )
|
|
833 |
{
|
|
834 |
/* Configure H/W to user sleep mode */
|
|
835 |
SleepMode (iTwdCtrl.sleepMode, FALSE);
|
|
836 |
}
|
|
837 |
else
|
|
838 |
{
|
|
839 |
/* Configure H/W to awake */
|
|
840 |
SleepMode (WHA::KAwakeMode, FALSE);
|
|
841 |
}
|
|
842 |
}
|
|
843 |
|
|
844 |
iUCommandCompletionParams.iSetPsModeComplete.iDot11PowerManagementMode = psMode;
|
|
845 |
|
|
846 |
if( bErrorIndication == TI_FALSE)
|
|
847 |
{
|
|
848 |
WhaCb()->CommandComplete(WHA::ESetPsModeComplete, status, iUCommandCompletionParams);
|
|
849 |
}
|
|
850 |
#if TI_DBG
|
|
851 |
else
|
|
852 |
{
|
|
853 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
854 |
}
|
|
855 |
#endif
|
|
856 |
}
|
|
857 |
|
|
858 |
|
|
859 |
/****************************************************************************************
|
|
860 |
* AddKeyResponse() *
|
|
861 |
****************************************************************************************
|
|
862 |
DESCRIPTION: This method is the adapt response to the AddKey command.
|
|
863 |
|
|
864 |
INPUT:
|
|
865 |
|
|
866 |
OUTPUT:
|
|
867 |
|
|
868 |
RETURN:
|
|
869 |
|
|
870 |
************************************************************************/
|
|
871 |
void TIWha::AddKeyResponseCb ( WHA::TStatus aStatus)
|
|
872 |
{
|
|
873 |
WHA::TStatus status = ( aStatus == TI_OK ) ? WHA::KSuccess : WHA::KFailed;
|
|
874 |
|
|
875 |
if( bErrorIndication == TI_FALSE)
|
|
876 |
{
|
|
877 |
WhaCb()->CommandResponse (WHA::EAddKeyResponse, status, iUCommandResponseParams);
|
|
878 |
}
|
|
879 |
#if TI_DBG
|
|
880 |
else
|
|
881 |
{
|
|
882 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
883 |
}
|
|
884 |
#endif
|
|
885 |
|
|
886 |
return;
|
|
887 |
}
|
|
888 |
|
|
889 |
|
|
890 |
/****************************************************************************************
|
|
891 |
* RemoveKeyResponse() *
|
|
892 |
****************************************************************************************
|
|
893 |
DESCRIPTION: This method is the adapt response to the RemoveKey command.
|
|
894 |
|
|
895 |
INPUT:
|
|
896 |
|
|
897 |
OUTPUT:
|
|
898 |
|
|
899 |
RETURN:
|
|
900 |
|
|
901 |
************************************************************************/
|
|
902 |
void TIWha::RemoveKeyResponseCb ( WHA::TStatus aStatus)
|
|
903 |
{
|
|
904 |
WHA::TStatus status = ( aStatus == TI_OK ) ? WHA::KSuccess : WHA::KFailed;
|
|
905 |
|
|
906 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "\n");
|
|
907 |
|
|
908 |
if( bErrorIndication == TI_FALSE)
|
|
909 |
{
|
|
910 |
WhaCb()->CommandResponse (WHA::ERemoveKeyResponse , status, iUCommandResponseParams);
|
|
911 |
}
|
|
912 |
#if TI_DBG
|
|
913 |
else
|
|
914 |
{
|
|
915 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
916 |
}
|
|
917 |
#endif
|
|
918 |
|
|
919 |
return;
|
|
920 |
}
|
|
921 |
|
|
922 |
|
|
923 |
/**
|
|
924 |
* \fn StopScanResponse
|
|
925 |
* \brief member function.
|
|
926 |
*
|
|
927 |
* \note
|
|
928 |
* \param aStatus - result of sending stop scan command to FW
|
|
929 |
* \return
|
|
930 |
* \sa
|
|
931 |
*/
|
|
932 |
void TIWha::StopScanResponseCb (WHA::TStatus aStatus)
|
|
933 |
{
|
|
934 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION , " - status: %d\n", aStatus);
|
|
935 |
|
|
936 |
if( bErrorIndication == TI_FALSE)
|
|
937 |
{
|
|
938 |
WhaCb()->CommandResponse(WHA::EStopScanResponse, aStatus, iUCommandResponseParams);
|
|
939 |
}
|
|
940 |
#if TI_DBG
|
|
941 |
else
|
|
942 |
{
|
|
943 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
944 |
}
|
|
945 |
#endif
|
|
946 |
}
|
|
947 |
|
|
948 |
#ifdef PLT_TESTER
|
|
949 |
int state = 0;
|
|
950 |
TTestCmd test;
|
|
951 |
/**
|
|
952 |
* \fn PltSm
|
|
953 |
* \brief debug function till we have full support for PLT.
|
|
954 |
*
|
|
955 |
* \note
|
|
956 |
* \param pBuf - contain PLT return buffer
|
|
957 |
* \return
|
|
958 |
* \sa
|
|
959 |
*/
|
|
960 |
void TIWha::PltSm(void *pBuf)
|
|
961 |
{
|
|
962 |
TRACE3(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, " state = %d ptr = %p plt = %d\n", state, pBuf, iTwdCtrl.ePlt);
|
|
963 |
|
|
964 |
os_printf("*********** TIWha::PltSm state = %d ****************",state);
|
|
965 |
|
|
966 |
|
|
967 |
switch (state)
|
|
968 |
{
|
|
969 |
|
|
970 |
case 0:
|
|
971 |
{
|
|
972 |
|
|
973 |
os_printf("*********** TEST_CMD_CHANNEL_TUNE 0 7 ****************");
|
|
974 |
/* If we want to debug the plt sequence with no scan */
|
|
975 |
/* state++; */
|
|
976 |
state = 9; /* Start Tx Bip */
|
|
977 |
test.testCmd_u.Channel.iChannel = 7;
|
|
978 |
test.testCmd_u.Channel.iBand = 0;
|
|
979 |
|
|
980 |
Plt ( TEST_CMD_CHANNEL_TUNE, (void *) &(test.testCmd_u));
|
|
981 |
break;
|
|
982 |
}
|
|
983 |
|
|
984 |
case 1:
|
|
985 |
{
|
|
986 |
os_printf("*********** TEST_CMD_RX_STAT_RESET ******************");
|
|
987 |
state++;
|
|
988 |
Plt ( TEST_CMD_RX_STAT_RESET, &(test.testCmd_u));
|
|
989 |
break;
|
|
990 |
}
|
|
991 |
|
|
992 |
case 2:
|
|
993 |
{
|
|
994 |
os_printf("*********** TEST_CMD_RX_STAT_START ******************");
|
|
995 |
state++;
|
|
996 |
Plt ( TEST_CMD_RX_STAT_START, &(test.testCmd_u));
|
|
997 |
break;
|
|
998 |
}
|
|
999 |
case 3:
|
|
1000 |
{
|
|
1001 |
os_printf("*********** TEST_CMD_RX_STAT_GET ******************");
|
|
1002 |
state++;
|
|
1003 |
os_memorySet(NULL , (void *) &test, 0,sizeof(test));
|
|
1004 |
Plt ( TEST_CMD_RX_STAT_GET, (void *) &(test.testCmd_u));
|
|
1005 |
break;
|
|
1006 |
}
|
|
1007 |
case 4:
|
|
1008 |
{
|
|
1009 |
os_printf("*********** TEST_CMD_RX_STAT_STOP ******************");
|
|
1010 |
TTestCmd data;
|
|
1011 |
os_memoryCopy(NULL , (void *) &data.testCmd_u,
|
|
1012 |
pBuf, sizeof(data.testCmd_u));
|
|
1013 |
|
|
1014 |
WLAN_OS_REPORT(("Received Valid Packet no.: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.ReceivedValidPacketsNumber,data.testCmd_u.Statistics.oRxPathStatistics.ReceivedValidPacketsNumber));
|
|
1015 |
WLAN_OS_REPORT(("Received FCS Error Packet no.: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.ReceivedFcsErrorPacketsNumber,data.testCmd_u.Statistics.oRxPathStatistics.ReceivedFcsErrorPacketsNumber));
|
|
1016 |
WLAN_OS_REPORT(("Received Address missmatch Error Packet no.: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.ReceivedPlcpErrorPacketsNumber,data.testCmd_u.Statistics.oRxPathStatistics.ReceivedPlcpErrorPacketsNumber));
|
|
1017 |
WLAN_OS_REPORT(("Sequence Number Missing Count: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.SeqNumMissCount,data.testCmd_u.Statistics.oRxPathStatistics.SeqNumMissCount));
|
|
1018 |
WLAN_OS_REPORT(("Average SNR: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.AverageSnr,data.testCmd_u.Statistics.oRxPathStatistics.AverageSnr));
|
|
1019 |
WLAN_OS_REPORT(("Average RSSI: %d(0x%x)\n", data.testCmd_u.Statistics.oRxPathStatistics.AverageRssi,data.testCmd_u.Statistics.oRxPathStatistics.AverageRssi));
|
|
1020 |
WLAN_OS_REPORT(("Base Packet ID: %d(0x%x)\n", data.testCmd_u.Statistics.oBasePacketId,data.testCmd_u.Statistics.oBasePacketId));
|
|
1021 |
WLAN_OS_REPORT(("Number of Packets: %d(0x%x)\n", data.testCmd_u.Statistics.ioNumberOfPackets,data.testCmd_u.Statistics.ioNumberOfPackets));
|
|
1022 |
WLAN_OS_REPORT(("Number of Missed Packets: %d(0x%x)\n", data.testCmd_u.Statistics.oNumberOfMissedPackets,data.testCmd_u.Statistics.oNumberOfMissedPackets));
|
|
1023 |
|
|
1024 |
state++;
|
|
1025 |
Plt ( TEST_CMD_RX_STAT_STOP, pBuf);
|
|
1026 |
break;
|
|
1027 |
}
|
|
1028 |
case 5:
|
|
1029 |
{
|
|
1030 |
os_printf("*********** TEST_CMD_FCC ******************");
|
|
1031 |
state++;
|
|
1032 |
test.testCmdId = TEST_CMD_FCC;
|
|
1033 |
test.testCmd_u.TxPacketParams.iDelay = 5000;
|
|
1034 |
test.testCmd_u.TxPacketParams.iRate = 0x1;
|
|
1035 |
test.testCmd_u.TxPacketParams.iSize = 1000;
|
|
1036 |
test.testCmd_u.TxPacketParams.iAmount = 0;
|
|
1037 |
test.testCmd_u.TxPacketParams.iPower = 2000;
|
|
1038 |
test.testCmd_u.TxPacketParams.iSeed = 10000;
|
|
1039 |
test.testCmd_u.TxPacketParams.iPacketMode = 3;
|
|
1040 |
test.testCmd_u.TxPacketParams.iDcfOnOff = 0;
|
|
1041 |
test.testCmd_u.TxPacketParams.iGI = 204;
|
|
1042 |
test.testCmd_u.TxPacketParams.iPreamble = 0;
|
|
1043 |
test.testCmd_u.TxPacketParams.iType = 0;
|
|
1044 |
test.testCmd_u.TxPacketParams.iScrambler = 1;
|
|
1045 |
test.testCmd_u.TxPacketParams.iEnableCLPC = 204;
|
|
1046 |
test.testCmd_u.TxPacketParams.iSeqNumMode = 1;
|
|
1047 |
test.testCmd_u.TxPacketParams.iSrcMacAddr[0] = 0xDE;
|
|
1048 |
test.testCmd_u.TxPacketParams.iSrcMacAddr[1] = 0xAD;
|
|
1049 |
test.testCmd_u.TxPacketParams.iSrcMacAddr[2] = 0xBE;
|
|
1050 |
test.testCmd_u.TxPacketParams.iSrcMacAddr[3] = 0xFF;
|
|
1051 |
test.testCmd_u.TxPacketParams.iSrcMacAddr[4] = 0;
|
|
1052 |
test.testCmd_u.TxPacketParams.iSrcMacAddr[5] = 0;
|
|
1053 |
for (int i = 0 ; i < 6 ; i ++)
|
|
1054 |
{
|
|
1055 |
test.testCmd_u.TxPacketParams.iDstMacAddr[i] = 0x5A;
|
|
1056 |
}
|
|
1057 |
|
|
1058 |
os_printf("Pad = 0x%x",&(test.testCmd_u.TxPacketParams.Pad));
|
|
1059 |
os_printf("iDelay = 0x%x",&(test.testCmd_u.TxPacketParams.iDelay));
|
|
1060 |
os_printf("iRate = 0x%x",&(test.testCmd_u.TxPacketParams.iRate));
|
|
1061 |
Plt( TEST_CMD_FCC, (void *) &(test.testCmd_u));
|
|
1062 |
break;
|
|
1063 |
}
|
|
1064 |
case 6:
|
|
1065 |
{
|
|
1066 |
os_printf("*********** TEST_CMD_STOP_TX ******************");
|
|
1067 |
state++;
|
|
1068 |
Plt ( TEST_CMD_STOP_TX, pBuf);
|
|
1069 |
break;
|
|
1070 |
}
|
|
1071 |
case 7:
|
|
1072 |
{
|
|
1073 |
os_printf("*********** TEST_CMD_TELEC ******************");
|
|
1074 |
state++;
|
|
1075 |
test.testCmd_u.TxToneParams.iPower = 10000;
|
|
1076 |
|
|
1077 |
Plt ( TEST_CMD_TELEC, (void *) &(test.testCmd_u));
|
|
1078 |
break;
|
|
1079 |
}
|
|
1080 |
case 8:
|
|
1081 |
{
|
|
1082 |
os_printf("*********** TEST_CMD_STOP_TX ******************");
|
|
1083 |
state++;
|
|
1084 |
Plt ( TEST_CMD_STOP_TX, pBuf);
|
|
1085 |
|
|
1086 |
break;
|
|
1087 |
}
|
|
1088 |
case 9:
|
|
1089 |
{
|
|
1090 |
os_printf("*********** BIP ******************");
|
|
1091 |
os_printf("*********** TEST_CMD_UPDATE_PD_REFERENCE_POINT ******************");
|
|
1092 |
state++;
|
|
1093 |
test.testCmd_u.PdBufferCalReferencePoint.iReferencePointDetectorValue = 375;
|
|
1094 |
test.testCmd_u.PdBufferCalReferencePoint.iReferencePointPower = 128;
|
|
1095 |
test.testCmd_u.PdBufferCalReferencePoint.isubBand = 0;
|
|
1096 |
|
|
1097 |
Plt ( TEST_CMD_UPDATE_PD_REFERENCE_POINT, (void *) &(test.testCmd_u));
|
|
1098 |
break;
|
|
1099 |
}
|
|
1100 |
case 10:
|
|
1101 |
|
|
1102 |
{
|
|
1103 |
os_printf("*********** TEST_CMD_P2G_CAL ******************");
|
|
1104 |
state++;
|
|
1105 |
test.testCmd_u.P2GCal.iSubBandMask = 1;
|
|
1106 |
Plt ( TEST_CMD_P2G_CAL, (void *) &(test.testCmd_u));
|
|
1107 |
break;
|
|
1108 |
}
|
|
1109 |
case 11:
|
|
1110 |
{
|
|
1111 |
state++;
|
|
1112 |
os_printf("********** NVS *****************");
|
|
1113 |
|
|
1114 |
/* Print the NVS as in the wilink6_nvs.h file */
|
|
1115 |
for (int i = 0; i < iNVSlength; i+=16)
|
|
1116 |
{
|
|
1117 |
os_printf("0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,0x%02x ,",
|
|
1118 |
((TUint8*)iBipNvsBuffer)[i+0],((TUint8*)iBipNvsBuffer)[i+1],((TUint8*)iBipNvsBuffer)[i+2],
|
|
1119 |
((TUint8*)iBipNvsBuffer)[i+3],((TUint8*)iBipNvsBuffer)[i+4],((TUint8*)iBipNvsBuffer)[i+5],
|
|
1120 |
((TUint8*)iBipNvsBuffer)[i+6],((TUint8*)iBipNvsBuffer)[i+7],((TUint8*)iBipNvsBuffer)[i+8],
|
|
1121 |
((TUint8*)iBipNvsBuffer)[i+9],((TUint8*)iBipNvsBuffer)[i+10],((TUint8*)iBipNvsBuffer)[i+11],
|
|
1122 |
((TUint8*)iBipNvsBuffer)[i+12],((TUint8*)iBipNvsBuffer)[i+13],((TUint8*)iBipNvsBuffer)[i+14],
|
|
1123 |
((TUint8*)iBipNvsBuffer)[i+15]);
|
|
1124 |
}
|
|
1125 |
|
|
1126 |
//break;
|
|
1127 |
}
|
|
1128 |
|
|
1129 |
case 12:
|
|
1130 |
|
|
1131 |
{
|
|
1132 |
|
|
1133 |
os_printf("********** PltSm TEST END *****************");
|
|
1134 |
|
|
1135 |
state = 0;
|
|
1136 |
ScanResponseCb(WHA::KSuccess);
|
|
1137 |
ScanCompleteCb(TI_OK,POWER_SAVE_802_11_SUCCESS);
|
|
1138 |
return;
|
|
1139 |
}
|
|
1140 |
|
|
1141 |
}
|
|
1142 |
|
|
1143 |
}
|
|
1144 |
#endif /* PLT_TESTER */
|
|
1145 |
|
|
1146 |
/****************************************************************************************************/
|
|
1147 |
/* Function: ConvertTxBip2Nvs */
|
|
1148 |
/****************************************************************************************************/
|
|
1149 |
/* Description: Recreate the NVS array from the result of the Tx BIP and from the */
|
|
1150 |
/* NVS stored for MAC Address restoration */
|
|
1151 |
/* iBipNvsBuffer - is used in order to keep the TxBiP part for future updates */
|
|
1152 |
/* Parameters: pBuf - The original supplied BIP pointer */
|
|
1153 |
/* Return Value: void */
|
|
1154 |
/****************************************************************************************************/
|
|
1155 |
void TIWha::ConvertTxBip2Nvs(void* pBuf)
|
|
1156 |
{
|
|
1157 |
/* The P2GCAL Buffer coming from WHA (not containing the TesCmdID )*/
|
|
1158 |
TTestCmdP2GCal* pTestCmdP2GCal = (TTestCmdP2GCal*)pBuf;
|
|
1159 |
|
|
1160 |
#ifdef TI_TEST
|
|
1161 |
os_printf("Status = %d",pTestCmdP2GCal->oRadioStatus);
|
|
1162 |
#endif
|
|
1163 |
|
|
1164 |
/* Restore back the MAC Address stored from the NVS into the NVS array */
|
|
1165 |
os_memoryCopy(NULL,iBipNvsBuffer,iNvsStart,MAC_ADD_SIZE);
|
|
1166 |
|
|
1167 |
/* Copy the TxBIP data into the NVS */
|
|
1168 |
os_memoryCopy(NULL, &iBipNvsBuffer[TX_VALUE_INDEX], ((TTestCmdP2GCal*)pTestCmdP2GCal)->oNvsStruct.Buffer, ((TTestCmdP2GCal*)pTestCmdP2GCal)->oNvsStruct.Length);
|
|
1169 |
|
|
1170 |
/* Update the Rx & Tx Params type */
|
|
1171 |
iBipNvsBuffer[TX_TYPE_INDEX] = TX_TYPE;
|
|
1172 |
iBipNvsBuffer[TX_LEN_INDEX] = TX_LEN_LS;
|
|
1173 |
iBipNvsBuffer[TX_LEN_INDEX + 1] = TX_LEN_MS;
|
|
1174 |
|
|
1175 |
iBipNvsBuffer[RX_TYPE_INDEX] = RX_TYPE;
|
|
1176 |
iBipNvsBuffer[RX_LEN_INDEX] = RX_LEN;
|
|
1177 |
|
|
1178 |
pTestCmdP2GCal->oNvsStruct.Length = NVS_LEN;
|
|
1179 |
|
|
1180 |
#ifdef TI_TEST
|
|
1181 |
os_printf("NVS Length, After -- %d",pTestCmdP2GCal->oNvsStruct.Length);
|
|
1182 |
#endif
|
|
1183 |
|
|
1184 |
iBipNvsBuffer[NVS_TYPE_INDEX] = NVS_TYPE;
|
|
1185 |
iBipNvsBuffer[NVS_TYPE_INDEX + 1] = 0x03;
|
|
1186 |
iBipNvsBuffer[NVS_TYPE_INDEX + 2] = 0x00;
|
|
1187 |
iBipNvsBuffer[NVS_TYPE_INDEX + 3] = 0x00;
|
|
1188 |
iBipNvsBuffer[NVS_TYPE_INDEX + 4] = 0x00;
|
|
1189 |
iBipNvsBuffer[NVS_TYPE_INDEX + 5] = 0x02;
|
|
1190 |
iBipNvsBuffer[NVS_TYPE_INDEX + 6] = 0xFF;
|
|
1191 |
iBipNvsBuffer[NVS_TYPE_INDEX + 7] = 0xFF;
|
|
1192 |
iBipNvsBuffer[NVS_TYPE_INDEX + 8] = 0x00;
|
|
1193 |
iBipNvsBuffer[NVS_TYPE_INDEX + 9] = 0x00;
|
|
1194 |
|
|
1195 |
/* Copy the TxBIP data into the pBuf */
|
|
1196 |
os_memoryCopy(NULL, pTestCmdP2GCal->oNvsStruct.Buffer, iBipNvsBuffer, pTestCmdP2GCal->oNvsStruct.Length);
|
|
1197 |
|
|
1198 |
|
|
1199 |
#ifdef TI_TEST
|
|
1200 |
os_printf("********** NVS *****************");
|
|
1201 |
|
|
1202 |
for (int i = 0; i < iNVSlength; i++)
|
|
1203 |
{
|
|
1204 |
os_printf("iBipNvsBuffer[%d] = 0x%x",i,((TUint8*)iBipNvsBuffer)[i]);
|
|
1205 |
}
|
|
1206 |
#endif /*TI_TEST*/
|
|
1207 |
}
|
|
1208 |
|
|
1209 |
|
|
1210 |
/****************************************************************************************************/
|
|
1211 |
/* Function: ConvertRxBip2Nvs */
|
|
1212 |
/****************************************************************************************************/
|
|
1213 |
/* Description: Recreate the NVS array from the result of the Rx BIP and from the */
|
|
1214 |
/* NVS stored for MAC Address restoration */
|
|
1215 |
/* iBipNvsBuffer - is used in order to keep the RxBiP part for future updates */
|
|
1216 |
/* Parameters: pBuf - The original supplied BIP pointer */
|
|
1217 |
/* Return Value: void */
|
|
1218 |
/****************************************************************************************************/
|
|
1219 |
void TIWha::ConvertRxBip2Nvs(void* pBuf)
|
|
1220 |
{
|
|
1221 |
/* The P2GCAL Buffer coming from WHA (not containing the TesCmdID )*/
|
|
1222 |
RadioRxPltCal* pTestCmdRxPltCal = (RadioRxPltCal*)pBuf;
|
|
1223 |
|
|
1224 |
#ifdef TI_TEST
|
|
1225 |
os_printf("Status = %d",pTestCmdRxPltCal->oRadioStatus);
|
|
1226 |
#endif
|
|
1227 |
|
|
1228 |
/* Restore back the MAC Address stored from the NVS into the NVS array */
|
|
1229 |
os_memoryCopy(NULL,iBipNvsBuffer,iNvsStart,MAC_ADD_SIZE);
|
|
1230 |
|
|
1231 |
/* Copy the TxBIP data into the NVS */
|
|
1232 |
os_memoryCopy(NULL, &iBipNvsBuffer[RX_VALUE_INDEX], ((RadioRxPltCal*)pTestCmdRxPltCal)->oNvsStruct.Buffer, ((RadioRxPltCal*)pTestCmdRxPltCal)->oNvsStruct.Length);
|
|
1233 |
|
|
1234 |
/* Update the Rx & TX Params type */
|
|
1235 |
iBipNvsBuffer[TX_TYPE_INDEX] = TX_TYPE;
|
|
1236 |
iBipNvsBuffer[TX_LEN_INDEX] = TX_LEN_LS;
|
|
1237 |
iBipNvsBuffer[TX_LEN_INDEX + 1] = TX_LEN_MS;
|
|
1238 |
|
|
1239 |
iBipNvsBuffer[RX_TYPE_INDEX] = RX_TYPE;
|
|
1240 |
iBipNvsBuffer[RX_LEN_INDEX] = RX_LEN;
|
|
1241 |
|
|
1242 |
pTestCmdRxPltCal->oNvsStruct.Length = NVS_LEN;
|
|
1243 |
|
|
1244 |
#ifdef TI_TEST
|
|
1245 |
os_printf("NVS Length, After -- %d",pTestCmdRxPltCal->oNvsStruct.Length);
|
|
1246 |
#endif
|
|
1247 |
|
|
1248 |
|
|
1249 |
iBipNvsBuffer[NVS_TYPE_INDEX] = NVS_TYPE;
|
|
1250 |
iBipNvsBuffer[NVS_TYPE_INDEX + 1] = 0x03;
|
|
1251 |
iBipNvsBuffer[NVS_TYPE_INDEX + 2] = 0x00;
|
|
1252 |
iBipNvsBuffer[NVS_TYPE_INDEX + 3] = 0x00;
|
|
1253 |
iBipNvsBuffer[NVS_TYPE_INDEX + 4] = 0x00;
|
|
1254 |
iBipNvsBuffer[NVS_TYPE_INDEX + 5] = 0x02;
|
|
1255 |
iBipNvsBuffer[NVS_TYPE_INDEX + 6] = 0xFF;
|
|
1256 |
iBipNvsBuffer[NVS_TYPE_INDEX + 7] = 0xFF;
|
|
1257 |
iBipNvsBuffer[NVS_TYPE_INDEX + 8] = 0x00;
|
|
1258 |
iBipNvsBuffer[NVS_TYPE_INDEX + 9] = 0x00;
|
|
1259 |
|
|
1260 |
/* Copy the RxBIP data into the pBuf */
|
|
1261 |
os_memoryCopy(NULL, pBuf, pTestCmdRxPltCal->oNvsStruct.Buffer, pTestCmdRxPltCal->oNvsStruct.Length);
|
|
1262 |
|
|
1263 |
#ifdef TI_TEST
|
|
1264 |
os_printf("********** NVS *****************");
|
|
1265 |
|
|
1266 |
for (int i = 0; i < iNVSlength; i++)
|
|
1267 |
{
|
|
1268 |
os_printf("iBipNvsBuffer[%d] = 0x%x",i,((TUint8*)iBipNvsBuffer)[i]);
|
|
1269 |
}
|
|
1270 |
#endif
|
|
1271 |
}
|
|
1272 |
|
|
1273 |
/****************************************************************************************************/
|
|
1274 |
/* Function: UpdateNVSFile */
|
|
1275 |
/****************************************************************************************************/
|
|
1276 |
/* Description: Create NVS file */
|
|
1277 |
/* Parameters: updatedProtocol - protocol sending BIP if == NVS_FILE_WRONG_UPDATE */
|
|
1278 |
/* will get the previous NVS file */
|
|
1279 |
/* nvsPtr - tx PTL NVS structure */
|
|
1280 |
/* Return Value: True - file created, False - otherwise */
|
|
1281 |
/****************************************************************************************************/
|
|
1282 |
/* 25.05.2008 Efil Function Created */
|
|
1283 |
/****************************************************************************************************/
|
|
1284 |
|
|
1285 |
#if 0
|
|
1286 |
bool TIWha::UpdateNVSFile(const void *nvsPtr)
|
|
1287 |
{
|
|
1288 |
|
|
1289 |
// read previous NVS
|
|
1290 |
nvsFileValid = true;//this->ReadNVSFile(currentNVSbuffer, &lengthOfCurrentNVSBufer);
|
|
1291 |
lengthOfCurrentNVSBufer = iNVSlength;
|
|
1292 |
currentNVSbuffer = ipNVSbuf;
|
|
1293 |
|
|
1294 |
txTypeIndexValue = currentNVSbuffer[NVS_PRE_PARAMETERS_LENGTH + NVS_TX_TYPE_INDEX];
|
|
1295 |
rxTypeIndexValue = currentNVSbuffer[NVS_PRE_PARAMETERS_LENGTH + NVS_RX_TYPE_INDEX];
|
|
1296 |
|
|
1297 |
// if read all the parameter (needed) from the previous NVS
|
|
1298 |
if (!nvsFileValid ||
|
|
1299 |
(lengthOfCurrentNVSBufer >= NVS_TOTAL_LENGTH) ||
|
|
1300 |
(txTypeIndexValue != eNVS_RADIO_TX_PARAMETERS) ||
|
|
1301 |
(rxTypeIndexValue != eNVS_RADIO_RX_PARAMETERS))
|
|
1302 |
{
|
|
1303 |
os_printf("lengthOfCurrentNVSBufer = %d txTypeIndexValue = %d rxTypeIndexValue = %d",lengthOfCurrentNVSBufer,txTypeIndexValue,rxTypeIndexValue);
|
|
1304 |
nvsFileValid = false;
|
|
1305 |
}
|
|
1306 |
|
|
1307 |
//nvsBinFile = fopen(NVS_FILE_NAME, "wb");
|
|
1308 |
|
|
1309 |
/* if (NULL == nvsBinFile)
|
|
1310 |
{
|
|
1311 |
return false;
|
|
1312 |
}*/
|
|
1313 |
|
|
1314 |
// fill MAC Address
|
|
1315 |
//FillMACAddressToNVS(nvsBinFile);
|
|
1316 |
|
|
1317 |
// fill end burst transaction zeros
|
|
1318 |
/*for (index = 0; index < NVS_END_BURST_TRANSACTION_LENGTH; index++)
|
|
1319 |
{
|
|
1320 |
fwrite(&valueToSet, sizeof(uint8), 1, nvsBinFile);
|
|
1321 |
}*/
|
|
1322 |
|
|
1323 |
// fill zeros to Align TLV start address
|
|
1324 |
/*for (index = 0; index < NVS_ALING_TLV_START_ADDRESS_LENGTH; index++)
|
|
1325 |
{
|
|
1326 |
fwrite(&valueToSet, sizeof(uint8), 1, nvsBinFile);
|
|
1327 |
}*/
|
|
1328 |
|
|
1329 |
// Getting from TX BiP Command
|
|
1330 |
// if(updatedProtocol)
|
|
1331 |
// {
|
|
1332 |
// Fill new TX BiP values
|
|
1333 |
FillTXParameterToNVS(currentNVSbuffer,
|
|
1334 |
nvsPtr);
|
|
1335 |
if (nvsFileValid)
|
|
1336 |
{
|
|
1337 |
// set Parameters of RX from the previous file
|
|
1338 |
FillOldRXParameterToNVS(nvsBinFile,
|
|
1339 |
currentNVSbuffer,
|
|
1340 |
lengthOfCurrentNVSBufer);
|
|
1341 |
}
|
|
1342 |
else
|
|
1343 |
{
|
|
1344 |
FillDefaultRXParameterToNVS(nvsBinFile);
|
|
1345 |
}
|
|
1346 |
|
|
1347 |
// }
|
|
1348 |
// Getting from RX BiP Command
|
|
1349 |
else if (NVS_FILE_RX_PARAMETERS_UPDATE == updatedProtocol)
|
|
1350 |
{
|
|
1351 |
if (nvsFileValid)
|
|
1352 |
{
|
|
1353 |
// set Parameters of TX from the previous file
|
|
1354 |
FillOldTXParameterToNVS(nvsBinFile,
|
|
1355 |
currentNVSbuffer,
|
|
1356 |
lengthOfCurrentNVSBufer);
|
|
1357 |
}
|
|
1358 |
else
|
|
1359 |
{
|
|
1360 |
FillDefaultTXParameterToNVS(nvsBinFile);
|
|
1361 |
}
|
|
1362 |
|
|
1363 |
// Fill new RX BiP values
|
|
1364 |
FillRXParameterToNVS(nvsBinFile,
|
|
1365 |
nvsPtr);
|
|
1366 |
|
|
1367 |
}
|
|
1368 |
// Getting error from Sending aider TX or RX BiP
|
|
1369 |
else /* NVS_FILE_WRONG_UPDATE == updatedProtocol */
|
|
1370 |
{
|
|
1371 |
// Fill new TX BiP values
|
|
1372 |
FillTXParameterToNVS(nvsBinFile,
|
|
1373 |
nvsPtr);
|
|
1374 |
|
|
1375 |
// Fill new RX BiP values
|
|
1376 |
FillRXParameterToNVS(nvsBinFile,
|
|
1377 |
nvsPtr);
|
|
1378 |
|
|
1379 |
}
|
|
1380 |
|
|
1381 |
// Fill the NVS version to the NVS
|
|
1382 |
this->FillVersionToNVS(nvsBinFile,
|
|
1383 |
versionStr,
|
|
1384 |
nvsFileValid,
|
|
1385 |
currentNVSbuffer,
|
|
1386 |
lengthOfCurrentNVSBufer);
|
|
1387 |
|
|
1388 |
// End of NVS
|
|
1389 |
this->WriteEndNVSParam(nvsBinFile);
|
|
1390 |
|
|
1391 |
|
|
1392 |
// close the file
|
|
1393 |
fclose(nvsBinFile);
|
|
1394 |
|
|
1395 |
return true;
|
|
1396 |
}
|
|
1397 |
#endif
|
|
1398 |
/*
|
|
1399 |
BipRespons(TI_STATUS aStatus, void *pItrBuf)
|
|
1400 |
Call ConvertBip2Nvs(pItrBuf)
|
|
1401 |
Call PltResponse
|
|
1402 |
*/
|
|
1403 |
|
|
1404 |
/**
|
|
1405 |
* \fn PltResponseCb
|
|
1406 |
* \brief member function.
|
|
1407 |
*
|
|
1408 |
* \note
|
|
1409 |
* \param aStatus - result of sending stop scan command to FW
|
|
1410 |
* \param pItrBuf - buffer for results
|
|
1411 |
* \return
|
|
1412 |
* \sa TIWHA::Plt
|
|
1413 |
*/
|
|
1414 |
void TIWha::PltResponseCb ( TI_STATUS aStatus, void *pItrBuf)
|
|
1415 |
{
|
|
1416 |
WHA::TStatus status = ( aStatus == TI_OK ) ? WHA::KSuccess : WHA::KFailed;
|
|
1417 |
os_printf("*** PltResponseCb status = %d ***",status);
|
|
1418 |
TRACE3(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, " aStatus = %d ptr = %p plt = %d\n", aStatus, pItrBuf, iTwdCtrl.ePlt);
|
|
1419 |
|
|
1420 |
#ifdef PLT_TESTER
|
|
1421 |
os_printf("*** PltResponseCb iRealPlt %d ***",iRealPlt);
|
|
1422 |
if(iRealPlt)
|
|
1423 |
{
|
|
1424 |
if( bErrorIndication == TI_FALSE)
|
|
1425 |
{
|
|
1426 |
WhaCb()->CommandResponse(WHA::EWriteMIBResponse,status,iUCommandResponseParams);
|
|
1427 |
}
|
|
1428 |
#if TI_DBG
|
|
1429 |
else
|
|
1430 |
{
|
|
1431 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
1432 |
}
|
|
1433 |
#endif
|
|
1434 |
}
|
|
1435 |
else
|
|
1436 |
{
|
|
1437 |
PltSm (pItrBuf);
|
|
1438 |
}
|
|
1439 |
#else
|
|
1440 |
/* Note that the results are located in the original given buffer in TIWha::Plt() */
|
|
1441 |
#ifdef TI_TEST
|
|
1442 |
if( bErrorIndication == TI_FALSE)
|
|
1443 |
{
|
|
1444 |
WhaCb()->CommandResponse(WHA::EWriteMIBResponse,status,iUCommandResponseParams);
|
|
1445 |
}
|
|
1446 |
#if TI_DBG
|
|
1447 |
else
|
|
1448 |
{
|
|
1449 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
1450 |
}
|
|
1451 |
#endif
|
|
1452 |
#else
|
|
1453 |
/* in case of using an external tester we have to return response */
|
|
1454 |
if( bErrorIndication == TI_FALSE)
|
|
1455 |
{
|
|
1456 |
WhaCb()->CommandResponse(WHA::EPLtResponse, status, iUCommandResponseParams);
|
|
1457 |
}
|
|
1458 |
#if TI_DBG
|
|
1459 |
else
|
|
1460 |
{
|
|
1461 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
1462 |
}
|
|
1463 |
#endif
|
|
1464 |
#endif
|
|
1465 |
#endif /* PLT_TESTER */
|
|
1466 |
|
|
1467 |
return;
|
|
1468 |
}
|
|
1469 |
|
|
1470 |
/**
|
|
1471 |
* \fn ReadMemResponseCb
|
|
1472 |
* \brief member function.
|
|
1473 |
*
|
|
1474 |
* \note
|
|
1475 |
* \param params - struct of the retrieved results
|
|
1476 |
* \return
|
|
1477 |
* \sa TIWha::WriteMem
|
|
1478 |
*/
|
|
1479 |
void TIWha::ReadMemResponseCb (TFwDebugParams* params)
|
|
1480 |
{
|
|
1481 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, " p = %p\n",params);
|
|
1482 |
|
|
1483 |
#ifdef WRITE_READ_MEM_NEW_API
|
|
1484 |
/* Note that the results are located in the original given buffer in TIWha::ReadMem() */
|
|
1485 |
if( bErrorIndication == TI_FALSE)
|
|
1486 |
{
|
|
1487 |
WhaCb()->CommandResponse(WHA::EReadMemoryResponse, WHA::KSuccess, iUCommandResponseParams);
|
|
1488 |
}
|
|
1489 |
#if TI_DBG
|
|
1490 |
else
|
|
1491 |
{
|
|
1492 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
1493 |
}
|
|
1494 |
#endif
|
|
1495 |
#endif
|
|
1496 |
}
|
|
1497 |
|
|
1498 |
/**
|
|
1499 |
* \fn WriteMemResponseCb
|
|
1500 |
* \brief member function.
|
|
1501 |
*
|
|
1502 |
* \note
|
|
1503 |
* \param params - struct of the retrieved results
|
|
1504 |
* \return
|
|
1505 |
* \sa TIWha::WriteMem
|
|
1506 |
*/
|
|
1507 |
void TIWha::WriteMemResponseCb (TFwDebugParams* params)
|
|
1508 |
{
|
|
1509 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, " p = %p\n", params);
|
|
1510 |
|
|
1511 |
#ifdef WRITE_READ_MEM_API
|
|
1512 |
/* Note that the results are located in the original given buffer in TIWha::WriteMem() */
|
|
1513 |
if( bErrorIndication == TI_FALSE)
|
|
1514 |
{
|
|
1515 |
WhaCb()->CommandResponse(WHA::EWriteMemoryResponse, WHA::KSuccess, iUCommandResponseParams);
|
|
1516 |
}
|
|
1517 |
#if TI_DBG
|
|
1518 |
else
|
|
1519 |
{
|
|
1520 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
1521 |
}
|
|
1522 |
#endif
|
|
1523 |
#endif
|
|
1524 |
}
|
|
1525 |
|
|
1526 |
|
|
1527 |
|
|
1528 |
/****************************************************************************************
|
|
1529 |
* PltPerStartResponse()
|
|
1530 |
****************************************************************************************
|
|
1531 |
DESCRIPTION:
|
|
1532 |
|
|
1533 |
INPUT:
|
|
1534 |
|
|
1535 |
OUTPUT:
|
|
1536 |
|
|
1537 |
RETURN:
|
|
1538 |
|
|
1539 |
************************************************************************/
|
|
1540 |
void TIWha::PltPerStartResponseCb ( TUint16 aStatus, void *pItrBuf)
|
|
1541 |
{
|
|
1542 |
|
|
1543 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "\n");
|
|
1544 |
|
|
1545 |
return;
|
|
1546 |
}
|
|
1547 |
|
|
1548 |
/****************************************************************************************
|
|
1549 |
* PltPerStopResponse()
|
|
1550 |
****************************************************************************************
|
|
1551 |
DESCRIPTION:
|
|
1552 |
|
|
1553 |
INPUT:
|
|
1554 |
|
|
1555 |
OUTPUT:
|
|
1556 |
|
|
1557 |
RETURN:
|
|
1558 |
|
|
1559 |
************************************************************************/
|
|
1560 |
void TIWha::PltPerStopResponseCb ( TUint16 aStatus, void *pItrBuf)
|
|
1561 |
{
|
|
1562 |
|
|
1563 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "\n");
|
|
1564 |
|
|
1565 |
return;
|
|
1566 |
}
|
|
1567 |
|
|
1568 |
|
|
1569 |
/****************************************************************************************
|
|
1570 |
* PltPerClearResponse()
|
|
1571 |
****************************************************************************************
|
|
1572 |
DESCRIPTION:
|
|
1573 |
|
|
1574 |
INPUT:
|
|
1575 |
|
|
1576 |
OUTPUT:
|
|
1577 |
|
|
1578 |
RETURN:
|
|
1579 |
|
|
1580 |
************************************************************************/
|
|
1581 |
void TIWha::PltPerClearResponseCb ( TUint16 aStatus, void *pItrBuf)
|
|
1582 |
{
|
|
1583 |
|
|
1584 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "\n");
|
|
1585 |
|
|
1586 |
return;
|
|
1587 |
}
|
|
1588 |
|
|
1589 |
|
|
1590 |
/****************************************************************************************
|
|
1591 |
* PltPerGetResultResponse()
|
|
1592 |
****************************************************************************************
|
|
1593 |
DESCRIPTION:
|
|
1594 |
|
|
1595 |
INPUT:
|
|
1596 |
|
|
1597 |
OUTPUT:
|
|
1598 |
|
|
1599 |
RETURN:
|
|
1600 |
|
|
1601 |
************************************************************************/
|
|
1602 |
void TIWha::PltPerGetResultResponseCb ( TUint16 aStatus, void *pItrBuf)
|
|
1603 |
{
|
|
1604 |
return;
|
|
1605 |
}
|
|
1606 |
|
|
1607 |
|
|
1608 |
/****************************************************************************************
|
|
1609 |
* PltGainGetResponse()
|
|
1610 |
****************************************************************************************
|
|
1611 |
DESCRIPTION:
|
|
1612 |
|
|
1613 |
INPUT:
|
|
1614 |
|
|
1615 |
OUTPUT:
|
|
1616 |
|
|
1617 |
RETURN:
|
|
1618 |
|
|
1619 |
************************************************************************/
|
|
1620 |
void TIWha::PltGainGetResponseCb ( TUint16 aStatus, void *pItrBuf)
|
|
1621 |
{
|
|
1622 |
return;
|
|
1623 |
}
|
|
1624 |
|
|
1625 |
|
|
1626 |
/****************************************************************************************
|
|
1627 |
* PltGetNVSUpdateBufferResponse()
|
|
1628 |
****************************************************************************************
|
|
1629 |
DESCRIPTION:
|
|
1630 |
|
|
1631 |
INPUT:
|
|
1632 |
|
|
1633 |
OUTPUT:
|
|
1634 |
|
|
1635 |
RETURN:
|
|
1636 |
|
|
1637 |
************************************************************************/
|
|
1638 |
void TIWha::PltGetNVSUpdateBufferResponseCb ( TUint16 aStatus, void *InterrogateParamsBuf)
|
|
1639 |
{
|
|
1640 |
return;
|
|
1641 |
}
|
|
1642 |
|
|
1643 |
|
|
1644 |
/**
|
|
1645 |
* \fn JoinCompleteCb
|
|
1646 |
* \brief Send Join response with the current power level table
|
|
1647 |
*
|
|
1648 |
* \note
|
|
1649 |
* \return
|
|
1650 |
* \sa
|
|
1651 |
*/
|
|
1652 |
void TIWha::JoinCompleteCb ()
|
|
1653 |
{
|
|
1654 |
/* Tx power level for each radio band */
|
|
1655 |
TFwInfo *pFwInfo = TWD_GetFWInfo (iTwdCtrl.hTWD);
|
|
1656 |
|
|
1657 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "JoinCompleteCb \n");
|
|
1658 |
|
|
1659 |
/*
|
|
1660 |
* Note: Only 2.4 band is supported for power level feedback.
|
|
1661 |
*/
|
|
1662 |
iUCommandResponseParams.iJoinResponse.iMinPowerLevel =
|
|
1663 |
pFwInfo->txPowerTable[RADIO_BAND_2_4_GHZ][MIN_POWER_LEVEL-1] / DBM_TO_TX_POWER_FACTOR;
|
|
1664 |
iUCommandResponseParams.iJoinResponse.iMaxPowerLevel=
|
|
1665 |
pFwInfo->txPowerTable[RADIO_BAND_2_4_GHZ][MAX_POWER_LEVEL] / DBM_TO_TX_POWER_FACTOR;
|
|
1666 |
|
|
1667 |
if( bErrorIndication == TI_FALSE)
|
|
1668 |
{
|
|
1669 |
WhaCb()->CommandResponse (WHA::EJoinResponse, WHA::KSuccess, iUCommandResponseParams);
|
|
1670 |
}
|
|
1671 |
#if TI_DBG
|
|
1672 |
else
|
|
1673 |
{
|
|
1674 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
1675 |
}
|
|
1676 |
#endif
|
|
1677 |
}
|
|
1678 |
|
|
1679 |
/**
|
|
1680 |
* \fn ReadMIBResponseCb
|
|
1681 |
* \brief member function.
|
|
1682 |
*
|
|
1683 |
* \note
|
|
1684 |
* \return
|
|
1685 |
* \sa
|
|
1686 |
*/
|
|
1687 |
void TIWha::ReadMIBResponseCb ( TUint16 aStatus, void *pItrBuf)
|
|
1688 |
{
|
|
1689 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, " Mib = %d \n", iTwdCtrl.currentReadMibID);
|
|
1690 |
|
|
1691 |
if (aStatus != TI_OK)
|
|
1692 |
{
|
|
1693 |
TRACE0(iTwdCtrl.hReport, REPORT_SEVERITY_ERROR, "GWSI_AdaptCB_ReadMIBResponse: error received from Mail Box on MIB read");
|
|
1694 |
}
|
|
1695 |
|
|
1696 |
/*
|
|
1697 |
* iData points to the pre-allocated ReadMib buffer. This buffer will be filled with the results
|
|
1698 |
* in the next ReadMIBXXX functions
|
|
1699 |
*/
|
|
1700 |
iUCommandResponseParams.iReadMibResponse.iData = (const void*)iReabMibMem;
|
|
1701 |
|
|
1702 |
/* Fill in iUCommandResponseParams according to the current MIB */
|
|
1703 |
switch (iTwdCtrl.currentReadMibID)
|
|
1704 |
{
|
|
1705 |
case WHA::KMibDot11StationId:
|
|
1706 |
ReadMIBStationIdResponse(aStatus, pItrBuf);
|
|
1707 |
break;
|
|
1708 |
|
|
1709 |
case WHA::KMibStatisticsTable:
|
|
1710 |
ReadMIBstatisticsTableResponse (aStatus, pItrBuf);
|
|
1711 |
break;
|
|
1712 |
|
|
1713 |
case WHA::KMibCountersTable:
|
|
1714 |
ReadMIBcountersTableResponse (aStatus, pItrBuf);
|
|
1715 |
break;
|
|
1716 |
default:
|
|
1717 |
TRACE1(iTwdCtrl.hReport, REPORT_SEVERITY_ERROR, "ReadMIBResponse: error unknown MIB = %d", iTwdCtrl.currentReadMibID);
|
|
1718 |
|
|
1719 |
}
|
|
1720 |
|
|
1721 |
/* Send response to upper layer */
|
|
1722 |
if( bErrorIndication == TI_FALSE)
|
|
1723 |
{
|
|
1724 |
WhaCb()->CommandResponse(WHA::EReadMIBResponse, (WHA::TStatus)aStatus, iUCommandResponseParams);
|
|
1725 |
}
|
|
1726 |
#if TI_DBG
|
|
1727 |
else
|
|
1728 |
{
|
|
1729 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
1730 |
}
|
|
1731 |
#endif
|
|
1732 |
}
|
|
1733 |
|
|
1734 |
/**
|
|
1735 |
* \fn ReadMIBStationIdResponse
|
|
1736 |
* \brief Copy station ID to iReabMibMem buffer
|
|
1737 |
*
|
|
1738 |
* \note
|
|
1739 |
* \return
|
|
1740 |
* \sa
|
|
1741 |
*/
|
|
1742 |
void TIWha::ReadMIBStationIdResponse (TUint16 aStatus, void *pItrBuf)
|
|
1743 |
{
|
|
1744 |
iUCommandResponseParams.iReadMibResponse.iLength = sizeof(WHA::Sdot11StationId);
|
|
1745 |
iUCommandResponseParams.iReadMibResponse.iMib = WHA::KMibDot11StationId;
|
|
1746 |
MAC_COPY (iReabMibMem, ((TI_UINT8*)pItrBuf));
|
|
1747 |
|
|
1748 |
TRACE6(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, " 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", iReabMibMem[0],iReabMibMem[1],iReabMibMem[2], iReabMibMem[3],iReabMibMem[4],iReabMibMem[5]);
|
|
1749 |
}
|
|
1750 |
|
|
1751 |
|
|
1752 |
/**
|
|
1753 |
* \fn ReadMIBstatisticsTableResponse
|
|
1754 |
* \brief Copy statistics table to iReabMibMem buffer
|
|
1755 |
*
|
|
1756 |
* \note
|
|
1757 |
* \return
|
|
1758 |
* \sa
|
|
1759 |
*/
|
|
1760 |
void TIWha::ReadMIBstatisticsTableResponse (TUint16 aStatus, void *pItrBuf)
|
|
1761 |
{
|
|
1762 |
WHA::SstatisticsTable *pStatisticsTable = (WHA::SstatisticsTable* )iReabMibMem;
|
|
1763 |
ACXRoamingStatisticsTable_t *pRetreivedResult = (ACXRoamingStatisticsTable_t *)pItrBuf;
|
|
1764 |
|
|
1765 |
pStatisticsTable->iSnr = pRetreivedResult->snrData;
|
|
1766 |
/*
|
|
1767 |
* Temporary, use RSSI value instead of RCPI. Make it positive.
|
|
1768 |
* In case the RSSI is positive already (odd but theoretically
|
|
1769 |
* possible result), set it to 0
|
|
1770 |
*/
|
|
1771 |
if ((pRetreivedResult->rssiData < TIWha_MAX_RSSI_VAL) && (pRetreivedResult->rssiData > TIWha_MIN_RSSI_VAL))
|
|
1772 |
{
|
|
1773 |
pStatisticsTable->iRcpi = (pRetreivedResult->rssiBeacon - TIWha_MIN_RSSI_VAL) * 2;
|
|
1774 |
}
|
|
1775 |
else
|
|
1776 |
{
|
|
1777 |
/* incase that the RSSI value shifted we fixed it to -45db (130 incase of RCPI) */
|
|
1778 |
if (pRetreivedResult->rssiData < 0) {
|
|
1779 |
pStatisticsTable->iRcpi = 130;
|
|
1780 |
}
|
|
1781 |
pStatisticsTable->iRcpi = 0;
|
|
1782 |
}
|
|
1783 |
|
|
1784 |
TRACE3(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "ReadMIBstatisticsTableResponse: status = %d SNR=0x%x, RCPI=0x%x\n", aStatus, pStatisticsTable->iSnr, pStatisticsTable->iRcpi);
|
|
1785 |
|
|
1786 |
iUCommandResponseParams.iReadMibResponse.iLength = sizeof(WHA::SstatisticsTable);
|
|
1787 |
iUCommandResponseParams.iReadMibResponse.iMib = WHA::KMibStatisticsTable;
|
|
1788 |
}
|
|
1789 |
|
|
1790 |
|
|
1791 |
/**
|
|
1792 |
* \fn ReadMIBcountersTableResponse
|
|
1793 |
* \brief Copy counters table to iReabMibMem buffer
|
|
1794 |
*
|
|
1795 |
* \note
|
|
1796 |
* \return
|
|
1797 |
* \sa
|
|
1798 |
*/
|
|
1799 |
void TIWha::ReadMIBcountersTableResponse (TUint16 aStatus, void *pItrBuf)
|
|
1800 |
{
|
|
1801 |
WHA::ScountersTable *pCountersTable = (WHA::ScountersTable*)iReabMibMem;
|
|
1802 |
ACXErrorCounters_t *pRetreivedResult = (ACXErrorCounters_t *)pItrBuf;
|
|
1803 |
|
|
1804 |
pCountersTable->iPlcpError = pRetreivedResult->PLCPErrorCount;
|
|
1805 |
pCountersTable->iFcsError = pRetreivedResult->FCSErrorCount;
|
|
1806 |
|
|
1807 |
TRACE2(iTwdCtrl.hReport, REPORT_SEVERITY_INFORMATION, "ReadMIBcountersTableResponse: FCSErrorCount = 0x%x, PLCPErrorCount = 0x%x \n", pCountersTable->iFcsError, pCountersTable->iPlcpError);
|
|
1808 |
|
|
1809 |
iUCommandResponseParams.iReadMibResponse.iLength = sizeof(WHA::SstatisticsTable);
|
|
1810 |
iUCommandResponseParams.iReadMibResponse.iMib = WHA::KMibCountersTable;
|
|
1811 |
}
|
|
1812 |
|
|
1813 |
|
|
1814 |
/****************************************************************************************
|
|
1815 |
* ReadMIBBtCoexParamsResponse() *
|
|
1816 |
****************************************************************************************
|
|
1817 |
DESCRIPTION: result of Read counters Table
|
|
1818 |
|
|
1819 |
INPUT:
|
|
1820 |
|
|
1821 |
OUTPUT:
|
|
1822 |
|
|
1823 |
RETURN:
|
|
1824 |
|
|
1825 |
************************************************************************/
|
|
1826 |
void TIWha::ReadMIBBtCoexParamsResponse (TUint16 aStatus, void *pItrBuf)
|
|
1827 |
{
|
|
1828 |
return;
|
|
1829 |
}
|
|
1830 |
|
|
1831 |
|
|
1832 |
/****************************************************************************************
|
|
1833 |
* ReadMIBVersion() *
|
|
1834 |
****************************************************************************************
|
|
1835 |
DESCRIPTION: result of Read counters Table
|
|
1836 |
|
|
1837 |
INPUT:
|
|
1838 |
|
|
1839 |
OUTPUT:
|
|
1840 |
|
|
1841 |
RETURN:
|
|
1842 |
|
|
1843 |
************************************************************************/
|
|
1844 |
void TIWha::ReadMIBVersion (TUint16 aStatus, void *pItrBuf)
|
|
1845 |
{
|
|
1846 |
return;
|
|
1847 |
}
|
|
1848 |
|
|
1849 |
|
|
1850 |
/****************************************************************************************
|
|
1851 |
* LostBssIndication() *
|
|
1852 |
****************************************************************************************
|
|
1853 |
DESCRIPTION: LostBss Event Callback
|
|
1854 |
|
|
1855 |
INPUT:
|
|
1856 |
|
|
1857 |
OUTPUT:
|
|
1858 |
|
|
1859 |
RETURN:
|
|
1860 |
|
|
1861 |
************************************************************************/
|
|
1862 |
void TIWha::LostBssIndicationCb ()
|
|
1863 |
{
|
|
1864 |
WHA::UIndicationParams *pParams = NULL;
|
|
1865 |
|
|
1866 |
if( bErrorIndication == TI_FALSE)
|
|
1867 |
{
|
|
1868 |
WhaCb()->Indication(WHA::EBssLost,*pParams);
|
|
1869 |
}
|
|
1870 |
#if TI_DBG
|
|
1871 |
else
|
|
1872 |
{
|
|
1873 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
1874 |
}
|
|
1875 |
#endif
|
|
1876 |
|
|
1877 |
#ifdef TI_DBG
|
|
1878 |
WLAN_OS_REPORT(("TIWha::LostBssIndicationCb () --"));
|
|
1879 |
#endif
|
|
1880 |
}
|
|
1881 |
|
|
1882 |
|
|
1883 |
/****************************************************************************************
|
|
1884 |
* RegainBssIndication() *
|
|
1885 |
****************************************************************************************
|
|
1886 |
DESCRIPTION: RegainBss Event Callback
|
|
1887 |
|
|
1888 |
INPUT:
|
|
1889 |
|
|
1890 |
OUTPUT:
|
|
1891 |
|
|
1892 |
RETURN:
|
|
1893 |
|
|
1894 |
************************************************************************/
|
|
1895 |
void TIWha::RegainBssIndicationCb ()
|
|
1896 |
{
|
|
1897 |
return;
|
|
1898 |
}
|
|
1899 |
|
|
1900 |
|
|
1901 |
/****************************************************************************************
|
|
1902 |
* btCoexSenseIndication() *
|
|
1903 |
****************************************************************************************
|
|
1904 |
DESCRIPTION: Bt Coexistence Sense CB (In auto mode: whether we are active or not)
|
|
1905 |
|
|
1906 |
INPUT:
|
|
1907 |
|
|
1908 |
OUTPUT:
|
|
1909 |
|
|
1910 |
RETURN:
|
|
1911 |
|
|
1912 |
************************************************************************/
|
|
1913 |
void TIWha::btCoexSenseIndicationCb ( TUint8* buffer, TUint32 len)
|
|
1914 |
{
|
|
1915 |
return;
|
|
1916 |
}
|
|
1917 |
|
|
1918 |
|
|
1919 |
/****************************************************************************************
|
|
1920 |
* btCoexProtectiveIndication() *
|
|
1921 |
****************************************************************************************
|
|
1922 |
DESCRIPTION: Bt Coexistence Protective mode CB (whether BT is in protective mode)
|
|
1923 |
|
|
1924 |
INPUT:
|
|
1925 |
|
|
1926 |
OUTPUT:
|
|
1927 |
|
|
1928 |
RETURN:
|
|
1929 |
|
|
1930 |
************************************************************************/
|
|
1931 |
void TIWha::btCoexProtectiveIndicationCb ( TUint8* buffer, TUint32 len)
|
|
1932 |
{
|
|
1933 |
return;
|
|
1934 |
}
|
|
1935 |
|
|
1936 |
|
|
1937 |
/****************************************************************************************
|
|
1938 |
* btCoexAvalancheIndication() *
|
|
1939 |
****************************************************************************************
|
|
1940 |
DESCRIPTION: Bt Coexistence avalanche CB (Indicate that the quality of connection with the AP is
|
|
1941 |
reducing and we should reconnect)
|
|
1942 |
INPUT:
|
|
1943 |
|
|
1944 |
OUTPUT:
|
|
1945 |
|
|
1946 |
RETURN:
|
|
1947 |
|
|
1948 |
************************************************************************/
|
|
1949 |
void TIWha::btCoexAvalancheIndicationCb ( TUint8* buffer, TUint32 len)
|
|
1950 |
{
|
|
1951 |
return;
|
|
1952 |
}
|
|
1953 |
|
|
1954 |
|
|
1955 |
/****************************************************************************
|
|
1956 |
* TWD_StatisticsReadCB ()
|
|
1957 |
****************************************************************************
|
|
1958 |
* DESCRIPTION: Interrogate Statistics from the wlan hardware
|
|
1959 |
*
|
|
1960 |
* INPUTS: None
|
|
1961 |
*
|
|
1962 |
* OUTPUT: None
|
|
1963 |
*
|
|
1964 |
* RETURNS: TI_OK or TI_NOK
|
|
1965 |
****************************************************************************/
|
|
1966 |
void TIWha::TWD_AvrRssiReadCB (TI_HANDLE hCb, TI_UINT16 MboxStatus, ACXRoamingStatisticsTable_t* roamingStatistics)
|
|
1967 |
{
|
|
1968 |
/* Call MIB Response befor printing to release system while traffic */
|
|
1969 |
if( bErrorIndication == TI_FALSE)
|
|
1970 |
{
|
|
1971 |
((TIWha*)(hCb))->WhaCb()->CommandResponse(WHA::EWriteMIBResponse,TI_OK,((TIWha*)(hCb))->iUCommandResponseParams);
|
|
1972 |
}
|
|
1973 |
#if TI_DBG
|
|
1974 |
else
|
|
1975 |
{
|
|
1976 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
1977 |
}
|
|
1978 |
#endif
|
|
1979 |
|
|
1980 |
#if TI_DBG
|
|
1981 |
WLAN_OS_REPORT(("Avr beacon Rssi = %d\n", roamingStatistics->rssiBeacon));
|
|
1982 |
WLAN_OS_REPORT(("Avr data Rssi = %d\n", roamingStatistics->rssiData));
|
|
1983 |
#endif
|
|
1984 |
}
|
|
1985 |
|
|
1986 |
|
|
1987 |
|
|
1988 |
/****************************************************************************
|
|
1989 |
* TWD_StatisticsReadCB ()
|
|
1990 |
****************************************************************************
|
|
1991 |
* DESCRIPTION: Interrogate Statistics from the wlan hardware
|
|
1992 |
*
|
|
1993 |
* INPUTS: None
|
|
1994 |
*
|
|
1995 |
* OUTPUT: None
|
|
1996 |
*
|
|
1997 |
* RETURNS: TI_OK or TI_NOK
|
|
1998 |
****************************************************************************/
|
|
1999 |
void TIWha::TWD_StatisticsReadCB (TI_HANDLE hCb, TI_UINT16 MboxStatus, ACXStatistics_t* pElem)
|
|
2000 |
{
|
|
2001 |
/* Call MIB Response befor printing to release system while traffic */
|
|
2002 |
if( bErrorIndication == TI_FALSE)
|
|
2003 |
{
|
|
2004 |
((TIWha*)(hCb))->WhaCb()->CommandResponse(WHA::EWriteMIBResponse,TI_OK,((TIWha*)(hCb))->iUCommandResponseParams);
|
|
2005 |
}
|
|
2006 |
#if TI_DBG
|
|
2007 |
else
|
|
2008 |
{
|
|
2009 |
WLAN_OS_REPORT(("%s : CommandResponse Block call to LDD response \n",__FUNCTION__));
|
|
2010 |
}
|
|
2011 |
#endif
|
|
2012 |
|
|
2013 |
/*
|
|
2014 |
* Handle FW statistics endianess
|
|
2015 |
* ==============================
|
|
2016 |
*/
|
|
2017 |
|
|
2018 |
/* Ring */
|
|
2019 |
pElem->ringStat.numOfTxProcs = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxProcs);
|
|
2020 |
pElem->ringStat.numOfPreparedDescs = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfPreparedDescs);
|
|
2021 |
pElem->ringStat.numOfTxXfr = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxXfr);
|
|
2022 |
pElem->ringStat.numOfTxDma = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxDma);
|
|
2023 |
pElem->ringStat.numOfTxCmplt = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfTxCmplt);
|
|
2024 |
pElem->ringStat.numOfRxProcs = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfRxProcs);
|
|
2025 |
pElem->ringStat.numOfRxData = ENDIAN_HANDLE_LONG(pElem->ringStat.numOfRxData);
|
|
2026 |
|
|
2027 |
/* Debug */
|
|
2028 |
pElem->debug.debug1 = ENDIAN_HANDLE_LONG(pElem->debug.debug1);
|
|
2029 |
pElem->debug.debug2 = ENDIAN_HANDLE_LONG(pElem->debug.debug2);
|
|
2030 |
pElem->debug.debug3 = ENDIAN_HANDLE_LONG(pElem->debug.debug3);
|
|
2031 |
pElem->debug.debug4 = ENDIAN_HANDLE_LONG(pElem->debug.debug4);
|
|
2032 |
pElem->debug.debug5 = ENDIAN_HANDLE_LONG(pElem->debug.debug5);
|
|
2033 |
pElem->debug.debug6 = ENDIAN_HANDLE_LONG(pElem->debug.debug6);
|
|
2034 |
|
|
2035 |
/* Isr */
|
|
2036 |
pElem->isr.IRQs = ENDIAN_HANDLE_LONG(pElem->isr.IRQs);
|
|
2037 |
|
|
2038 |
/* Rx */
|
|
2039 |
pElem->rx.RxDroppedFrame = ENDIAN_HANDLE_LONG(pElem->rx.RxDroppedFrame);
|
|
2040 |
pElem->rx.RxCompleteDroppedFrame = ENDIAN_HANDLE_LONG(pElem->rx.RxCompleteDroppedFrame);
|
|
2041 |
|
|
2042 |
pElem->rx.RxHdrOverflow = ENDIAN_HANDLE_LONG(pElem->rx.RxHdrOverflow);
|
|
2043 |
pElem->rx.RxHWStuck = ENDIAN_HANDLE_LONG(pElem->rx.RxHWStuck);
|
|
2044 |
pElem->rx.RxOutOfMem = ENDIAN_HANDLE_LONG(pElem->rx.RxOutOfMem);
|
|
2045 |
pElem->rx.RxAllocFrame = ENDIAN_HANDLE_LONG(pElem->rx.RxAllocFrame);
|
|
2046 |
|
|
2047 |
/* Tx */
|
|
2048 |
pElem->tx.numOfTxTemplatePrepared = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxTemplatePrepared);
|
|
2049 |
pElem->tx.numOfTxDataPrepared = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDataPrepared);
|
|
2050 |
pElem->tx.numOfTxTemplateProgrammed = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxTemplateProgrammed);
|
|
2051 |
pElem->tx.numOfTxDataProgrammed = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDataProgrammed);
|
|
2052 |
pElem->tx.numOfTxBurstProgrammed = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxBurstProgrammed);
|
|
2053 |
pElem->tx.numOfTxStarts = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStarts);
|
|
2054 |
pElem->tx.numOfTxImmResp = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxImmResp);
|
|
2055 |
pElem->tx.numOfTxStartTempaltes = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartTempaltes);
|
|
2056 |
pElem->tx.numOfTxStartIntTemplate = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartIntTemplate);
|
|
2057 |
pElem->tx.numOfTxStartFwGen = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartFwGen);
|
|
2058 |
pElem->tx.numOfTxStartData = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartData);
|
|
2059 |
pElem->tx.numOfTxStartNullFrame = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxStartNullFrame);
|
|
2060 |
pElem->tx.numOfTxExch = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExch);
|
|
2061 |
pElem->tx.numOfTxRetryTemplate = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxRetryTemplate);
|
|
2062 |
pElem->tx.numOfTxRetryData = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxRetryData);
|
|
2063 |
pElem->tx.numOfTxExchPending = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExchPending);
|
|
2064 |
pElem->tx.numOfTxExchExpiry = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExchExpiry);
|
|
2065 |
pElem->tx.numOfTxExchMismatch = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxExchMismatch);
|
|
2066 |
pElem->tx.numOfTxDoneTemplate = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDoneTemplate);
|
|
2067 |
pElem->tx.numOfTxDoneData = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDoneData);
|
|
2068 |
pElem->tx.numOfTxDoneIntTemplate = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDoneIntTemplate);
|
|
2069 |
pElem->tx.numOfTxPreXfr = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxPreXfr);
|
|
2070 |
pElem->tx.numOfTxXfr = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxXfr);
|
|
2071 |
pElem->tx.numOfTxXfrOutOfMem = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxXfrOutOfMem);
|
|
2072 |
pElem->tx.numOfTxDmaProgrammed = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDmaProgrammed);
|
|
2073 |
pElem->tx.numOfTxDmaDone = ENDIAN_HANDLE_LONG(pElem->tx.numOfTxDmaDone);
|
|
2074 |
|
|
2075 |
/* Dma */
|
|
2076 |
pElem->dma.RxDMAErrors = ENDIAN_HANDLE_LONG(pElem->dma.RxDMAErrors);
|
|
2077 |
pElem->dma.TxDMAErrors = ENDIAN_HANDLE_LONG(pElem->dma.TxDMAErrors);
|
|
2078 |
|
|
2079 |
/* Wep */
|
|
2080 |
pElem->wep.WepAddrKeyCount = ENDIAN_HANDLE_LONG(pElem->wep.WepAddrKeyCount);
|
|
2081 |
pElem->wep.WepDefaultKeyCount = ENDIAN_HANDLE_LONG(pElem->wep.WepDefaultKeyCount);
|
|
2082 |
pElem->wep.WepKeyNotFound = ENDIAN_HANDLE_LONG(pElem->wep.WepKeyNotFound);
|
|
2083 |
pElem->wep.WepDecryptFail = ENDIAN_HANDLE_LONG(pElem->wep.WepDecryptFail);
|
|
2084 |
|
|
2085 |
/* AES */
|
|
2086 |
pElem->aes.AesEncryptFail = ENDIAN_HANDLE_LONG(pElem->aes.AesEncryptFail);
|
|
2087 |
pElem->aes.AesDecryptFail = ENDIAN_HANDLE_LONG(pElem->aes.AesDecryptFail);
|
|
2088 |
pElem->aes.AesEncryptPackets = ENDIAN_HANDLE_LONG(pElem->aes.AesEncryptPackets);
|
|
2089 |
pElem->aes.AesDecryptPackets = ENDIAN_HANDLE_LONG(pElem->aes.AesDecryptPackets);
|
|
2090 |
pElem->aes.AesEncryptInterrupt = ENDIAN_HANDLE_LONG(pElem->aes.AesEncryptInterrupt);
|
|
2091 |
pElem->aes.AesDecryptInterrupt = ENDIAN_HANDLE_LONG(pElem->aes.AesDecryptInterrupt);
|
|
2092 |
|
|
2093 |
/* Events */
|
|
2094 |
pElem->event.calibration = ENDIAN_HANDLE_LONG(pElem->event.calibration);
|
|
2095 |
pElem->event.rxMismatch = ENDIAN_HANDLE_LONG(pElem->event.rxMismatch);
|
|
2096 |
pElem->event.rxMemEmpty = ENDIAN_HANDLE_LONG(pElem->event.rxMemEmpty);
|
|
2097 |
|
|
2098 |
/* PS */
|
|
2099 |
pElem->pwr.MissingBcnsCnt = ENDIAN_HANDLE_LONG(pElem->pwr.MissingBcnsCnt);
|
|
2100 |
pElem->pwr.RcvdBeaconsCnt = ENDIAN_HANDLE_LONG(pElem->pwr.RcvdBeaconsCnt);
|
|
2101 |
pElem->pwr.ConnectionOutOfSync = ENDIAN_HANDLE_LONG(pElem->pwr.ConnectionOutOfSync);
|
|
2102 |
pElem->pwr.ContMissBcnsSpread[0] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[0]);
|
|
2103 |
pElem->pwr.ContMissBcnsSpread[1] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[1]);
|
|
2104 |
pElem->pwr.ContMissBcnsSpread[2] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[2]);
|
|
2105 |
pElem->pwr.ContMissBcnsSpread[3] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[3]);
|
|
2106 |
pElem->pwr.ContMissBcnsSpread[4] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[4]);
|
|
2107 |
pElem->pwr.ContMissBcnsSpread[5] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[5]);
|
|
2108 |
pElem->pwr.ContMissBcnsSpread[6] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[6]);
|
|
2109 |
pElem->pwr.ContMissBcnsSpread[7] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[7]);
|
|
2110 |
pElem->pwr.ContMissBcnsSpread[8] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[8]);
|
|
2111 |
pElem->pwr.ContMissBcnsSpread[9] = ENDIAN_HANDLE_LONG(pElem->pwr.ContMissBcnsSpread[9]);
|
|
2112 |
|
|
2113 |
pElem->ps.psPollTimeOuts = ENDIAN_HANDLE_LONG(pElem->ps.psPollTimeOuts);
|
|
2114 |
pElem->ps.upsdTimeOuts = ENDIAN_HANDLE_LONG(pElem->ps.upsdTimeOuts);
|
|
2115 |
pElem->ps.upsdMaxAPturn = ENDIAN_HANDLE_LONG(pElem->ps.upsdMaxAPturn);
|
|
2116 |
pElem->ps.psPollMaxAPturn = ENDIAN_HANDLE_LONG(pElem->ps.psPollMaxAPturn);
|
|
2117 |
pElem->ps.psPollUtilization = ENDIAN_HANDLE_LONG(pElem->ps.psPollUtilization);
|
|
2118 |
pElem->ps.upsdUtilization = ENDIAN_HANDLE_LONG(pElem->ps.upsdUtilization);
|
|
2119 |
|
|
2120 |
pElem->rxFilter.arpFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.arpFilter);
|
|
2121 |
pElem->rxFilter.beaconFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.beaconFilter);
|
|
2122 |
pElem->rxFilter.dataFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.dataFilter);
|
|
2123 |
pElem->rxFilter.dupFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.dupFilter);
|
|
2124 |
pElem->rxFilter.MCFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.MCFilter);
|
|
2125 |
pElem->rxFilter.ibssFilter = ENDIAN_HANDLE_LONG(pElem->rxFilter.ibssFilter);
|
|
2126 |
|
|
2127 |
pElem->radioCal.calStateFail = ENDIAN_HANDLE_LONG(pElem->radioCal.calStateFail);
|
|
2128 |
pElem->radioCal.initCalTotal = ENDIAN_HANDLE_LONG(pElem->radioCal.initCalTotal);
|
|
2129 |
pElem->radioCal.initRadioBandsFail = ENDIAN_HANDLE_LONG(pElem->radioCal.initRadioBandsFail);
|
|
2130 |
pElem->radioCal.initRxIqMmFail = ENDIAN_HANDLE_LONG(pElem->radioCal.initRxIqMmFail);
|
|
2131 |
pElem->radioCal.initSetParams = ENDIAN_HANDLE_LONG(pElem->radioCal.initSetParams);
|
|
2132 |
pElem->radioCal.initTxClpcFail = ENDIAN_HANDLE_LONG(pElem->radioCal.initTxClpcFail);
|
|
2133 |
pElem->radioCal.tuneCalTotal = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneCalTotal);
|
|
2134 |
pElem->radioCal.tuneDrpwChanTune = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwChanTune);
|
|
2135 |
pElem->radioCal.tuneDrpwLnaTank = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwLnaTank);
|
|
2136 |
pElem->radioCal.tuneDrpwPdBufFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwPdBufFail);
|
|
2137 |
pElem->radioCal.tuneDrpwRTrimFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRTrimFail);
|
|
2138 |
pElem->radioCal.tuneDrpwRxDac = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRxDac);
|
|
2139 |
pElem->radioCal.tuneDrpwRxIf2Gain = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRxIf2Gain);
|
|
2140 |
pElem->radioCal.tuneDrpwRxTxLpf = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwRxTxLpf);
|
|
2141 |
pElem->radioCal.tuneDrpwTaCal = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwTaCal);
|
|
2142 |
pElem->radioCal.tuneDrpwTxMixFreqFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneDrpwTxMixFreqFail);
|
|
2143 |
pElem->radioCal.tuneRxAnaDcFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneRxAnaDcFail);
|
|
2144 |
pElem->radioCal.tuneRxIqMmFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneRxIqMmFail);
|
|
2145 |
pElem->radioCal.tuneTxClpcFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxClpcFail);
|
|
2146 |
pElem->radioCal.tuneTxIqMmFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxIqMmFail);
|
|
2147 |
pElem->radioCal.tuneTxLOLeakFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxLOLeakFail);
|
|
2148 |
pElem->radioCal.tuneTxPdetFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxPdetFail);
|
|
2149 |
pElem->radioCal.tuneTxPPAFail = ENDIAN_HANDLE_LONG(pElem->radioCal.tuneTxPPAFail);
|
|
2150 |
|
|
2151 |
#if TI_DBG
|
|
2152 |
/*
|
|
2153 |
* Print FW statistics
|
|
2154 |
* ===================
|
|
2155 |
*/
|
|
2156 |
|
|
2157 |
/* Ring */
|
|
2158 |
WLAN_OS_REPORT(("------ Ring statistics -------------------\n"));
|
|
2159 |
WLAN_OS_REPORT(("numOfTxProcs = %d\n", pElem->ringStat.numOfTxProcs));
|
|
2160 |
WLAN_OS_REPORT(("numOfPreparedDescs = %d\n", pElem->ringStat.numOfPreparedDescs));
|
|
2161 |
WLAN_OS_REPORT(("numOfTxXfr = %d\n", pElem->ringStat.numOfTxXfr));
|
|
2162 |
WLAN_OS_REPORT(("numOfTxDma = %d\n", pElem->ringStat.numOfTxDma));
|
|
2163 |
WLAN_OS_REPORT(("numOfTxCmplt = %d\n", pElem->ringStat.numOfTxCmplt));
|
|
2164 |
WLAN_OS_REPORT(("numOfRxProcs = %d\n", pElem->ringStat.numOfRxProcs));
|
|
2165 |
WLAN_OS_REPORT(("numOfRxData = %d\n", pElem->ringStat.numOfRxData));
|
|
2166 |
|
|
2167 |
/* Debug */
|
|
2168 |
WLAN_OS_REPORT(("------ Debug statistics -------------------\n"));
|
|
2169 |
WLAN_OS_REPORT(("debug1 = %d\n", pElem->debug.debug1));
|
|
2170 |
WLAN_OS_REPORT(("debug2 = %d\n", pElem->debug.debug2));
|
|
2171 |
WLAN_OS_REPORT(("debug3 = %d\n", pElem->debug.debug3));
|
|
2172 |
WLAN_OS_REPORT(("debug4 = %d\n", pElem->debug.debug4));
|
|
2173 |
WLAN_OS_REPORT(("debug5 = %d\n", pElem->debug.debug5));
|
|
2174 |
WLAN_OS_REPORT(("debug6 = %d\n", pElem->debug.debug6));
|
|
2175 |
|
|
2176 |
/* Isr */
|
|
2177 |
WLAN_OS_REPORT(("------ Isr statistics -------------------\n"));
|
|
2178 |
WLAN_OS_REPORT(("IRQs = %d\n", pElem->isr.IRQs));
|
|
2179 |
|
|
2180 |
/* Rx */
|
|
2181 |
WLAN_OS_REPORT(("------ Rx statistics -------------------\n"));
|
|
2182 |
WLAN_OS_REPORT(("RxDroppedFrame = %d\n", pElem->rx.RxDroppedFrame));
|
|
2183 |
WLAN_OS_REPORT(("RxHdrOverflow = %d\n", pElem->rx.RxHdrOverflow));
|
|
2184 |
WLAN_OS_REPORT(("RxHWStuck = %d\n", pElem->rx.RxHWStuck));
|
|
2185 |
WLAN_OS_REPORT(("RxOutOfMem = %d\n", pElem->rx.RxOutOfMem));
|
|
2186 |
WLAN_OS_REPORT(("RxAllocFrame = %d\n", pElem->rx.RxAllocFrame));
|
|
2187 |
WLAN_OS_REPORT(("pElem->rx.RxCompleteDroppedFrame = %d\n", pElem->rx.RxCompleteDroppedFrame));
|
|
2188 |
|
|
2189 |
WLAN_OS_REPORT(("------ RxFilters statistics --------------\n"));
|
|
2190 |
WLAN_OS_REPORT(("arpFilter = %d\n", pElem->rxFilter.arpFilter));
|
|
2191 |
WLAN_OS_REPORT(("beaconFilter = %d\n", pElem->rxFilter.beaconFilter));
|
|
2192 |
WLAN_OS_REPORT(("dataFilter = %d\n", pElem->rxFilter.dataFilter));
|
|
2193 |
WLAN_OS_REPORT(("dupFilter = %d\n", pElem->rxFilter.dupFilter));
|
|
2194 |
WLAN_OS_REPORT(("MCFilter = %d\n", pElem->rxFilter.MCFilter));
|
|
2195 |
WLAN_OS_REPORT(("ibssFilter = %d\n", pElem->rxFilter.ibssFilter));
|
|
2196 |
|
|
2197 |
/* Tx */
|
|
2198 |
WLAN_OS_REPORT(("------ Tx statistics -------------------\n"));
|
|
2199 |
WLAN_OS_REPORT(("numOfTxTemplatePrepared = %d\n", pElem->tx.numOfTxTemplatePrepared));
|
|
2200 |
WLAN_OS_REPORT(("numOfTxDataPrepared = %d\n", pElem->tx.numOfTxDataPrepared));
|
|
2201 |
WLAN_OS_REPORT(("numOfTxTemplateProgrammed = %d\n", pElem->tx.numOfTxTemplateProgrammed));
|
|
2202 |
WLAN_OS_REPORT(("numOfTxDataProgrammed = %d\n", pElem->tx.numOfTxDataProgrammed));
|
|
2203 |
WLAN_OS_REPORT(("numOfTxBurstProgrammed = %d\n", pElem->tx.numOfTxBurstProgrammed));
|
|
2204 |
WLAN_OS_REPORT(("numOfTxStarts = %d\n", pElem->tx.numOfTxStarts));
|
|
2205 |
WLAN_OS_REPORT(("numOfTxImmResp = %d\n", pElem->tx.numOfTxImmResp));
|
|
2206 |
WLAN_OS_REPORT(("numOfTxStartTempaltes = %d\n", pElem->tx.numOfTxStartTempaltes));
|
|
2207 |
WLAN_OS_REPORT(("numOfTxStartIntTemplate = %d\n", pElem->tx.numOfTxStartIntTemplate));
|
|
2208 |
WLAN_OS_REPORT(("numOfTxStartFwGen = %d\n", pElem->tx.numOfTxStartFwGen));
|
|
2209 |
WLAN_OS_REPORT(("numOfTxStartData = %d\n", pElem->tx.numOfTxStartData));
|
|
2210 |
WLAN_OS_REPORT(("numOfTxStartNullFrame = %d\n", pElem->tx.numOfTxStartNullFrame));
|
|
2211 |
WLAN_OS_REPORT(("numOfTxExch = %d\n", pElem->tx.numOfTxExch));
|
|
2212 |
WLAN_OS_REPORT(("numOfTxRetryTemplate = %d\n", pElem->tx.numOfTxRetryTemplate));
|
|
2213 |
WLAN_OS_REPORT(("numOfTxRetryData = %d\n", pElem->tx.numOfTxRetryData));
|
|
2214 |
WLAN_OS_REPORT(("numOfTxExchPending = %d\n", pElem->tx.numOfTxExchPending));
|
|
2215 |
WLAN_OS_REPORT(("numOfTxExchExpiry = %d\n", pElem->tx.numOfTxExchExpiry));
|
|
2216 |
WLAN_OS_REPORT(("numOfTxExchMismatch = %d\n", pElem->tx.numOfTxExchMismatch));
|
|
2217 |
WLAN_OS_REPORT(("numOfTxDoneTemplate = %d\n", pElem->tx.numOfTxDoneTemplate));
|
|
2218 |
WLAN_OS_REPORT(("numOfTxDoneData = %d\n", pElem->tx.numOfTxDoneData));
|
|
2219 |
WLAN_OS_REPORT(("numOfTxDoneIntTemplate = %d\n", pElem->tx.numOfTxDoneIntTemplate));
|
|
2220 |
WLAN_OS_REPORT(("numOfTxPreXfr = %d\n", pElem->tx.numOfTxPreXfr));
|
|
2221 |
WLAN_OS_REPORT(("numOfTxXfr = %d\n", pElem->tx.numOfTxXfr));
|
|
2222 |
WLAN_OS_REPORT(("numOfTxXfrOutOfMem = %d\n", pElem->tx.numOfTxXfrOutOfMem));
|
|
2223 |
WLAN_OS_REPORT(("numOfTxDmaProgrammed = %d\n", pElem->tx.numOfTxDmaProgrammed));
|
|
2224 |
WLAN_OS_REPORT(("numOfTxDmaDone = %d\n", pElem->tx.numOfTxDmaDone));
|
|
2225 |
|
|
2226 |
/* Dma */
|
|
2227 |
WLAN_OS_REPORT(("------ Dma statistics -------------------\n"));
|
|
2228 |
WLAN_OS_REPORT(("RxDMAErrors = %d\n", pElem->dma.RxDMAErrors));
|
|
2229 |
WLAN_OS_REPORT(("TxDMAErrors = %d\n", pElem->dma.TxDMAErrors));
|
|
2230 |
|
|
2231 |
/* Wep */
|
|
2232 |
WLAN_OS_REPORT(("------ Wep statistics -------------------\n"));
|
|
2233 |
WLAN_OS_REPORT(("WepAddrKeyCount = %d\n", pElem->wep.WepAddrKeyCount));
|
|
2234 |
WLAN_OS_REPORT(("WepDefaultKeyCount= %d\n", pElem->wep.WepDefaultKeyCount));
|
|
2235 |
WLAN_OS_REPORT(("WepKeyNotFound = %d\n", pElem->wep.WepKeyNotFound));
|
|
2236 |
WLAN_OS_REPORT(("WepDecryptFail = %d\n", pElem->wep.WepDecryptFail));
|
|
2237 |
|
|
2238 |
/* AES */
|
|
2239 |
WLAN_OS_REPORT(("------------ AES Statistics --------------\n"));
|
|
2240 |
WLAN_OS_REPORT(("AesEncryptFail = %d\n", pElem->aes.AesEncryptFail));
|
|
2241 |
WLAN_OS_REPORT(("AesDecryptFail = %d\n", pElem->aes.AesDecryptFail));
|
|
2242 |
WLAN_OS_REPORT(("AesEncryptPackets = %d\n", pElem->aes.AesEncryptPackets));
|
|
2243 |
WLAN_OS_REPORT(("AesDecryptPackets = %d\n", pElem->aes.AesDecryptPackets));
|
|
2244 |
WLAN_OS_REPORT(("AesEncryptInterrupt = %d\n", pElem->aes.AesEncryptInterrupt));
|
|
2245 |
WLAN_OS_REPORT(("AesDecryptInterrupt = %d\n", pElem->aes.AesDecryptInterrupt));
|
|
2246 |
|
|
2247 |
/* Events */
|
|
2248 |
WLAN_OS_REPORT(("------ Events -------------------\n"));
|
|
2249 |
WLAN_OS_REPORT(("Calibration = %d\n", pElem->event.calibration));
|
|
2250 |
WLAN_OS_REPORT(("rxMismatch = %d\n", pElem->event.rxMismatch));
|
|
2251 |
WLAN_OS_REPORT(("rxMemEmpty = %d\n", pElem->event.rxMemEmpty));
|
|
2252 |
|
|
2253 |
/* PsPoll/Upsd */
|
|
2254 |
WLAN_OS_REPORT(("----------- PsPoll / Upsd -----------\n"));
|
|
2255 |
WLAN_OS_REPORT(("psPollTimeOuts = %d\n",pElem->ps.psPollTimeOuts));
|
|
2256 |
WLAN_OS_REPORT(("upsdTimeOuts = %d\n",pElem->ps.upsdTimeOuts));
|
|
2257 |
WLAN_OS_REPORT(("upsdMaxAPturn = %d\n",pElem->ps.upsdMaxAPturn));
|
|
2258 |
WLAN_OS_REPORT(("psPollMaxAPturn = %d\n",pElem->ps.psPollMaxAPturn));
|
|
2259 |
WLAN_OS_REPORT(("psPollUtilization = %d\n",pElem->ps.psPollUtilization));
|
|
2260 |
WLAN_OS_REPORT(("upsdUtilization = %d\n",pElem->ps.upsdUtilization));
|
|
2261 |
|
|
2262 |
|
|
2263 |
|
|
2264 |
/* Calibration */
|
|
2265 |
WLAN_OS_REPORT(("----------- Calibrations -------------\n"));
|
|
2266 |
WLAN_OS_REPORT(("calStateFail = %d\n", pElem->radioCal.calStateFail));
|
|
2267 |
WLAN_OS_REPORT(("initCalTotal = %d\n", pElem->radioCal.initCalTotal));
|
|
2268 |
WLAN_OS_REPORT(("initRadioBandsFail = %d\n", pElem->radioCal.initRadioBandsFail));
|
|
2269 |
WLAN_OS_REPORT(("initRxIqMmFail = %d\n", pElem->radioCal.initRxIqMmFail));
|
|
2270 |
WLAN_OS_REPORT(("initSetParams = %d\n", pElem->radioCal.initSetParams));
|
|
2271 |
WLAN_OS_REPORT(("initTxClpcFail = %d\n", pElem->radioCal.initTxClpcFail));
|
|
2272 |
WLAN_OS_REPORT(("tuneCalTotal = %d\n", pElem->radioCal.tuneCalTotal));
|
|
2273 |
WLAN_OS_REPORT(("tuneDrpwChanTune = %d\n", pElem->radioCal.tuneDrpwChanTune));
|
|
2274 |
WLAN_OS_REPORT(("tuneDrpwLnaTank = %d\n", pElem->radioCal.tuneDrpwLnaTank));
|
|
2275 |
WLAN_OS_REPORT(("tuneDrpwPdBufFail = %d\n", pElem->radioCal.tuneDrpwPdBufFail));
|
|
2276 |
WLAN_OS_REPORT(("tuneDrpwRTrimFail = %d\n", pElem->radioCal.tuneDrpwRTrimFail));
|
|
2277 |
WLAN_OS_REPORT(("tuneDrpwRxDac = %d\n", pElem->radioCal.tuneDrpwRxDac));
|
|
2278 |
WLAN_OS_REPORT(("tuneDrpwRxIf2Gain = %d\n", pElem->radioCal.tuneDrpwRxIf2Gain));
|
|
2279 |
WLAN_OS_REPORT(("tuneDrpwRxTxLpf = %d\n", pElem->radioCal.tuneDrpwRxTxLpf));
|
|
2280 |
WLAN_OS_REPORT(("tuneDrpwTaCal = %d\n", pElem->radioCal.tuneDrpwTaCal));
|
|
2281 |
WLAN_OS_REPORT(("tuneDrpwTxMixFreqFail = %d\n", pElem->radioCal.tuneDrpwTxMixFreqFail));
|
|
2282 |
WLAN_OS_REPORT(("tuneRxAnaDcFail = %d\n", pElem->radioCal.tuneRxAnaDcFail));
|
|
2283 |
WLAN_OS_REPORT(("tuneRxIqMmFail = %d\n", pElem->radioCal.tuneRxIqMmFail));
|
|
2284 |
WLAN_OS_REPORT(("tuneTxClpcFail = %d\n", pElem->radioCal.tuneTxClpcFail));
|
|
2285 |
WLAN_OS_REPORT(("tuneTxIqMmFail = %d\n", pElem->radioCal.tuneTxIqMmFail));
|
|
2286 |
WLAN_OS_REPORT(("tuneTxLOLeakFail = %d\n", pElem->radioCal.tuneTxLOLeakFail));
|
|
2287 |
WLAN_OS_REPORT(("tuneTxPdetFail = %d\n", pElem->radioCal.tuneTxPdetFail));
|
|
2288 |
WLAN_OS_REPORT(("tuneTxPPAFail = %d\n", pElem->radioCal.tuneTxPPAFail));
|
|
2289 |
|
|
2290 |
|
|
2291 |
|
|
2292 |
/* Power Save Counters */
|
|
2293 |
WLAN_OS_REPORT(("------ Power management ----------\n"));
|
|
2294 |
if(pElem->pwr.RcvdBeaconsCnt != 0)
|
|
2295 |
{
|
|
2296 |
WLAN_OS_REPORT(("MissingBcnsCnt = %d (percentage <= %d) \n",
|
|
2297 |
pElem->pwr.MissingBcnsCnt,
|
|
2298 |
((pElem->pwr.MissingBcnsCnt * 100) / (pElem->pwr.RcvdBeaconsCnt + pElem->pwr.MissingBcnsCnt)) ));
|
|
2299 |
}
|
|
2300 |
else
|
|
2301 |
{
|
|
2302 |
WLAN_OS_REPORT(("MissingBcnsCnt = %d (percentage = 0) \n", pElem->pwr.MissingBcnsCnt));
|
|
2303 |
}
|
|
2304 |
WLAN_OS_REPORT(("RcvdBeaconsCnt = %d\n", pElem->pwr.RcvdBeaconsCnt));
|
|
2305 |
WLAN_OS_REPORT(("ConnectionOutOfSync = %d\n\n", pElem->pwr.ConnectionOutOfSync));
|
|
2306 |
WLAN_OS_REPORT(("Single Missed Beacon = %d\n", (pElem->pwr.ContMissBcnsSpread[0] & 0xFFFF)));
|
|
2307 |
WLAN_OS_REPORT(("2 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[1] & 0xFFFF)));
|
|
2308 |
WLAN_OS_REPORT(("3 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[2] & 0xFFFF)));
|
|
2309 |
WLAN_OS_REPORT(("4 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[3] & 0xFFFF)));
|
|
2310 |
WLAN_OS_REPORT(("5 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[4] & 0xFFFF)));
|
|
2311 |
WLAN_OS_REPORT(("6 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[5] & 0xFFFF)));
|
|
2312 |
WLAN_OS_REPORT(("7 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[6] & 0xFFFF)));
|
|
2313 |
WLAN_OS_REPORT(("8 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[7] & 0xFFFF)));
|
|
2314 |
WLAN_OS_REPORT(("9 Continuous Missed Beacons = %d\n", (pElem->pwr.ContMissBcnsSpread[8] & 0xFFFF)));
|
|
2315 |
WLAN_OS_REPORT((">=10 Continuous Missed Beacons = %d\n\n", (pElem->pwr.ContMissBcnsSpread[9] & 0xFFFF)));
|
|
2316 |
|
|
2317 |
WLAN_OS_REPORT(("RcvdAwakeBeaconsCnt = %d\n", pElem->pwr.RcvdAwakeBeaconsCnt));
|
|
2318 |
WLAN_OS_REPORT(("Single Missed Beacon [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[0] >> 16)));
|
|
2319 |
WLAN_OS_REPORT(("2 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[1] >> 16)));
|
|
2320 |
WLAN_OS_REPORT(("3 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[2] >> 16)));
|
|
2321 |
WLAN_OS_REPORT(("4 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[3] >> 16)));
|
|
2322 |
WLAN_OS_REPORT(("5 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[4] >> 16)));
|
|
2323 |
WLAN_OS_REPORT(("6 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[5] >> 16)));
|
|
2324 |
WLAN_OS_REPORT(("7 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[6] >> 16)));
|
|
2325 |
WLAN_OS_REPORT(("8 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[7] >> 16)));
|
|
2326 |
WLAN_OS_REPORT(("9 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[8] >> 16)));
|
|
2327 |
WLAN_OS_REPORT((">=10 Continuous Missed Beacons [Awake] = %d\n", (pElem->pwr.ContMissBcnsSpread[9] >> 16)));
|
|
2328 |
#endif
|
|
2329 |
}
|
|
2330 |
|
|
2331 |
|
|
2332 |
|