blob: 81cb8f25f4986e92eac33f2176048ea70de7420d [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
41
42#ifndef _ANIDBGTEST_H_
43#define _ANIDBGTEST_H_
44
45#include "sirTypes.h"
46
47#define MAX_PARMS_SIZE 256
48#define MAX_RESPONSE_SIZE 512
49#define MAX_PCI_CFG_WRDS 19
50#define MAX_NUM_TST_STAS_PER_AP 3
51
52#define ANI_PCI_CFG_MIN_GNT 4
53#define ANI_PCI_CFG_MAX_LAT 32
54/// EEPROM Product Ids for different types of NICs.
55#define EEP_PRODUCT_ID_MPCI_3_2 1
56#define EEP_PRODUCT_ID_MPCI_2_2 2
57#define EEP_PRODUCT_ID_CARDBUS 3
58#define EEP_PRODUCT_ID_HEAP_W_INT 4
59#define EEP_PRODUCT_ID_HEAP_W_EXT 5
60#define EEP_PRODUCT_ID_MRAP 6
61
62#define ANI_CARDBUS_EXPECTED_CIS \
63 (((0x3416 + sizeof(tPolSystemParameters)) << 3)|1)
64
65
66/// Here is an example of a test structure
67typedef enum sANI_TEST_ID
68{
69 // All DVT test Ids, beginning with BMU, INT, HIF, SP, TFP, RHP,
70 // RFP, SYS, PHY, SPI, CYG, LO, and EEPROM in the order specified.
71 ANI_TESTID_NONE = 0,
72
73 // PLEASE PRESERVE THE ORDER; IF YOU NEED TO CHANGE.
74 // TEST SCRIPTS DEPEND ON THIS ORDER.
75
76 ANI_BUS_ACCESS_TEST,
77 ANI_MEMORY_TEST,
78 ANI_INTERRUPT_TEST,
79 ANI_REG_READ_WRITE_TEST,
80 ANI_BMU_INIT_PDU_TEST,
81 ANI_HASH_TBL_ADD_DEL_GET_TEST_ID,
82 ANI_HASH_TBL_MULT_ENTRY_TEST_ID,
83
84 // Data path tests
85 ANI_SEND_CONTINUOUS_TEST,
86 ANI_PKT_ROUTING_TEST,
87
88 ANI_ADD_STA_TEST_ID,
89 ANI_DELETE_STA_TEST_ID,
90
91 // HIF Tests
92 ANI_BURST_READ_WRITE_TEST_ID,
93 ANI_MOVE_ACK_TEST_ID,
94 ANI_RESET_WQ_TEST_ID,
95 ANI_HIF_LPBK_TEST_ID,
96
97 // SP Tests
98
99 // TFP Tests
100 ANI_BCN_GEN_TEST_ID,
101
102 // RHP Tests
103
104 ANI_HASH_TBL_DELETE_TEST_ID,
105 ANI_HASH_TBL_GET_TEST_ID,
106
107 // RHP Tests
108 ANI_AGING_TEST_ID,
109 ANI_COUNTERS_TEST_ID,
110
111 // SYS Tests
112 ANI_SET_PROMOSCOUS_MODE_TEST_ID,
113 ANI_SET_SCAN_MODE_TEST_ID,
114
115 // SPI Tests
116 ANI_SET_CYG_REG_READ_WRITE_TEST_ID,
117
118 // CYG Tests
119 ANI_SET_BB_CAL_TEST_ID,
120
121 // LO Tests
122 ANI_SET_LO_CHAN_TEST_ID,
123
124 // EEPROM Tests
125
126 // Cal test
127 ANI_CAL_TEST_ID,
128
129 // HIF Burst DMA test
130 ANI_HIF_BURST_DMA_TEST_ID,
131
132 // Add all your test Ids above this.
133 ANI_TESTS_MAX
134} tANI_TEST_ID;
135
136/// Test IDs for tests directly handled by the HDD
137typedef enum sANI_HDD_TEST_ID {
138 ANI_HDD_TESTS_START = 0x10000,
139 ANI_PCI_CFG_TEST = ANI_HDD_TESTS_START,
140 ANI_EEPROM_TEST,
141
142 // Add all your HDD test Ids above this.
143 ANI_HDD_TESTS_MAX
144
145} tANI_HDD_TEST_ID;
146
147/// Test trigger types can be enhanced with this enumeration
148typedef enum sANI_TEST_TRIG_TYPE
149{
150 ANI_TRIG_TYPE_NONE = 0,
151
152 ANI_TRIG_TYPE_CFG,
153 ANI_TRIG_TYPE_START,
154 ANI_TRIG_TYPE_GET_RESULTS,
155 ANI_TRIG_TYPE_STOP,
156
157 ANI_TRIG_TYPE_MAX
158} tANI_TEST_TRIG_TYPE;
159
160/// Test states
161typedef enum sANI_DBG_TEST_STATE
162{
163 ANI_TEST_STATE_IDLE = 0,
164 ANI_TEST_STATE_IN_PROGRESS,
165 ANI_TEST_STATE_DONE
166
167} tANI_DBG_TEST_STATE;
168
169/**
170 * The following CFG Types are defined for each type of a parameter that can
171 * be independently set
172 */
173typedef enum sANI_DBG_CFG_TYPES
174{
175 ANI_DBG_CFG_PHY_MODE_RATE,
176 ANI_DBG_CFG_ROUTING_FLAGS,
177 ANI_DBG_CFG_STA_ID,
178 ANI_DBG_CFG_IS_INFRASTRUCTURE_MODE,
179 ANI_DBG_CFG_USE_REAL_PHY,
180 ANI_DBG_CFG_PHY_DROPS,
181 ANI_DBG_CFG_ADD_STA,
182 ANI_DBG_CFG_DEL_STA,
183 ANI_DBG_CFG_ENABLE_STA_TX,
184 ANI_DBG_CFG_DISABLE_STA_TX,
185 ANI_DBG_CFG_READ_REGISTER,
186 ANI_DBG_CFG_WRITE_REGISTER,
187 ANI_DBG_CFG_GET_ARQ_WINDOW_SIZE,
188 ANI_DBG_CFG_SET_ARQ_WINDOW_SIZE,
189 ANI_DBG_CFG_SET_CHANNEL,
190 ANI_DBG_CFG_SET_MAC_ADDRESS,
191 ANI_DBG_CFG_SET_MEM,
192 ANI_DBG_CFG_GET_MEM,
193 ANI_DBG_CFG_CTRL_TXWQ,
194 ANI_DBG_CFG_GET_ACTIVITY_SET,
195 ANI_DBG_CFG_SET_ACK_POLICY,
196 ANI_DBG_CFG_AGING_CMD,
197 ANI_DBG_CFG_SET_KEY,
198 ANI_DBG_CFG_SET_PER_STA_KEY,
199 ANI_DBG_CFG_TFP_ABORT,
200 ANI_DBG_CFG_GET_ACT_CHAINS,
201 ANI_DBG_CFG_IS_CHAIN_ACTIVE,
202 ANI_DBG_CFG_BB_FILTER_CAL,
203 ANI_DBG_CFG_DCO_CAL,
204 ANI_DBG_CFG_IQ_CAL,
205 ANI_DBG_CFG_TX_LO_LEAKAGE_CAL,
206 ANI_DBG_CFG_SEND_PKTS,
207 ANI_DBG_CFG_STOP_PKTS,
208 ANI_DBG_CFG_ENABLE_DISABLE_BEACON_GEN,
209 ANI_DBG_CFG_DCO_GET,
210 ANI_DBG_CFG_DCO_SET,
211 ANI_DBG_CFG_SET_PWR_TEMPL,
212 ANI_DBG_CFG_GET_PWR_TEMPL,
213 ANI_DBG_CFG_INIT,
214 ANI_DBG_CFG_SET_EEPROM_FLD,
215 ANI_DBG_CFG_GET_EEPROM_FLD,
216 ANI_DBG_CFG_SET_NUM_TRANSMITTERS,
217 ANI_DBG_CFG_SET_RX_CHAINS,
218 ANI_DBG_CFG_HCF_TEST,
219 ANI_DBG_CFG_POLARIS_REV_ID,
220 ANI_DBG_CFG_UPDATE_DATA_FROM_EEPROM,
221 ANI_DBG_CFG_GET_TEMP,
222 ANI_DBG_CFG_SET_STA_ADDRLST,
223 ANI_DBG_CFG_GET_PWR_GAIN,
224 ANI_DBG_CFG_SW_CLOSED_LOOP_TPC,
225
226 ANI_DBG_CFG_TYPE_MAX
227} tANI_DBG_CFG_TYPES;
228
229/**
230 * The following are the length definitions for each CFG TYPE defined
231 * in earlier Type enum.
232 */
233
234// first byte mode and second rate
235# define ANI_DBG_CFG_PHY_MODE_RATE_LEN 2
236
237// MSN is type and LSN is sub-type in the MSB. 4 LSBs are routing flags
238# define ANI_DBG_CFG_ROUTING_FLAGS_LEN 5
239
240# define ANI_DBG_CFG_STA_ID_LEN 2
241
242// ======================================================================
243//
244// Following are the structure definitions for the config input parameters
245//
246// ======================================================================
247//
248// --------------------------------------------------------
249
250// --------------------------------------------------------
251// Output Params for Read Register Config request
252typedef struct sAniDbgCfgGetPolarisVersionResponse
253{
254 // Output parameters
255 unsigned int rc; // 0 - SUCCESS
256 unsigned long version;
257} tAniDbgCfgGetPolarisVersionResponse, *tpAniDbgCfgGetPolarisVersionResponse;
258
259// -------------------------------------------------------------
260// Input Params for the Phy Mode Rate
261
262typedef struct sAniDbgCfgPhyModeRateParams
263{
264 unsigned int phyMode;
265 unsigned int phyRate;
266} tAniDbgCfgPhyModeRateParams, *tpAniDbgCfgPhyModeRateParams;
267
268// --------------------------------------------------------
269// Input Params for the Routing Flags
270typedef struct sAniDbgCfgRoutingFlagsParams
271{
272 unsigned int type;
273 unsigned int subType;
274 unsigned int routingFlags;
275} tAniDbgCfgRoutingFlagsParams, *tpAniDbgCfgRoutingFlagsParams;
276
277// --------------------------------------------------------
278// Input Params for the STA ID
279typedef struct sAniDbgCfgStaIdParams
280{
281 unsigned int staId;
282} tAniDbgCfgStaIdParams, *tpAniDbgCfgStaIdParams;
283
284// --------------------------------------------------------
285// Input Params for "Is Infrastructure Mode"
286typedef struct sAniDbgCfgIsInfrastructureParams
287{
288 unsigned int isInfrastructureMode;
289} tAniDbgCfgIsInfrastructureParams, *tpAniDbgCfgIsInfrastructureParams;
290
291// --------------------------------------------------------
292// Input Params for the Real Phy
293typedef struct sAniDbgCfgRealPhyParams
294{
295 unsigned int useRealPhy;
296} tAniDbgCfgRealPhyParams, *tpAniDbgCfgRealPhyParams;
297
298// --------------------------------------------------------
299// Input Params for Phy Drops
300typedef struct sAniDbgCfgPhyDropParams
301{
302 unsigned int usePhyDrops;
303 unsigned int rate;
304 unsigned int burstSize;
305 unsigned int mode;
306} tAniDbgCfgPhyDropParams, *tpAniDbgCfgPhyDropParams;
307
308// --------------------------------------------------------
309// Input Params for Add Sta
310typedef struct sAniDbgCfgAddStaParams
311{
312 unsigned int staId;
313 unsigned char macAddr[6];
314 unsigned int phyMode;
315 unsigned int rate;
316 unsigned int skipSP;
317 unsigned int ackPolicy;
318} tAniDbgCfgAddStaParams, *tpAniDbgCfgAddStaParams;
319
320// --------------------------------------------------------
321// Input Params for Delete Sta
322typedef struct sAniDbgCfgDelStaParams
323{
324 unsigned int staId;
325 unsigned char macAddr[6];
326} tAniDbgCfgDelStaParams, *tpAniDbgCfgDelStaParams;
327
328// --------------------------------------------------------
329// Lowest register address allowable for the Read Register calls
330#define ANI_TIT_MIN_REG_ADDR 0x02000000
331
332
333// --------------------------------------------------------
334// Highest register address allowable for the Read Register call
335#define ANI_TIT_MAX_REG_ADDR 0x0203ffff
336
337// --------------------------------------------------------
338// Input Params for Read Register Config request
339typedef struct sAniDbgCfgReadRegParams
340{
341 unsigned long regAddr;
342} tAniDbgCfgReadRegParams, *tpAniDbgCfgReadRegParams;
343
344// --------------------------------------------------------
345// Input Params for Write Register Config request
346typedef struct sAniDbgCfgWriteRegParams
347{
348 unsigned long regAddr;
349 unsigned long regVal;
350} tAniDbgCfgWriteRegParams, *tpAniDbgCfgWriteRegParams;
351
352
353
354
355// --------------------------------------------------------
356// ANI_DBG_CFG_SET_CAL_TONE,
357typedef struct
358{
359 unsigned long toneID; //0 = -28, 1 = -24, ..., 6 = -4, 7 = +4, 8 = +8, 9 = +12, ..., 13 = +28
360}tAniDbgCfgSetToneId, *tpAniDbgCfgSetToneId;
361
362
363// --------------------------------------------------------
364// Output Params for Read Register Config request
365typedef struct sAniDbgCfgRegReadResponse
366{
367 // Output parameters
368 unsigned int rc; // 0 - SUCCESS
369 unsigned long regVal;
370} tAniDbgCfgReadRegResponse, *tpAniDbgCfgReadRegResponse;
371
372// --------------------------------------------------------
373// Output Params for getting ARQ Window
374typedef struct sAniDbgCfgGetArqWindowResponse
375{
376 unsigned int rc; // 0 - SUCCESS
377 unsigned long val;
378} tAniDbgCfgGetArqWindowResponse, *tpAniDbgCfgGetArqWindowResponse;
379
380// --------------------------------------------------------
381// Input Params for Write Register Config request
382typedef struct sAniDbgCfgSetArqWindowParams
383{
384 unsigned long windowSize;
385} tAniDbgCfgSetArqWindowRegParams, *tpAniDbgCfgSetArqWindowParams;
386
387// --------------------------------------------------------
388// Input Params for Write Register Config request
389typedef struct sAniDbgCfgSetChanParams
390{
391 unsigned long chId;
392} tAniDbgCfgSetChanParams, *tpAniDbgCfgSetChanParams;
393
394
395// --------------------------------------------------------
396// Input Params for Write Register Config request
397typedef struct sAniDbgCfgSetMacAddrParams
398{
399 unsigned char macAddr[6];
400 unsigned int flag; // 0 - BSSID; 1 - MAC Address of DUT
401} tAniDbgCfgSetMacAddrParams, *tpAniDbgCfgSetMacAddrParams;
402
403// --------------------------------------------------------
404// Input Params for Set Memory request
405typedef struct sAniDbgCfgSetMemoryParams
406{
407 unsigned int fUseBurstDma;
408 unsigned int numOfWords;
409 unsigned int ahbAddr;
410 unsigned int writeData; // Pattern to be written out in memory
411} tAniDbgCfgSetMemoryParams, *tpAniDbgCfgSetMemoryParams;
412
413// --------------------------------------------------------
414// Input Params for Get Memory request
415typedef struct sAniDbgCfgGetMemoryParams
416{
417 unsigned int fUseBurstDma;
418 unsigned int numOfWords;
419 unsigned int ahbAddr;
420} tAniDbgCfgGetMemoryParams, *tpAniDbgCfgGetMemoryParams;
421
422// --------------------------------------------------------
423// Response structure for the Get Memory request
424typedef struct sAniDbgCfgGetMemoryResponse
425{
426 unsigned int rc; // 0 - SUCCESS; Otherwise FAILED
427 unsigned int readData[1];
428} tAniDbgCfgGetMemoryResponse, *tpAniDbgCfgGetMemoryResponse;
429
430
431// --------------------------------------------------------
432// Input Params for Controls Enable/Disable of TX WQ
433typedef struct sAniDbgCfgCtrlTxWqParams
434{
435 unsigned int staId;
436 unsigned int wqId;
437 unsigned int action; // 0 - Disable; 1 - Enable
438
439} tAniDbgCfgCtrlTxWqParams, *tpAniDbgCfgCtrlTxWqParams;
440
441// --------------------------------------------------------
442// Input Params for Getting TX/RX Activity Set
443typedef struct sAniDbgCfgGetAsParams
444{
445 unsigned int id; // 0 - tx; 1 - rx
446
447} tAniDbgCfgGetAsParams, *tpAniDbgCfgGetAsParams;
448
449// Input Params for Getting TX/RX Activity Set
450typedef struct sAniDbgCfgGetAsResponse
451{
452 unsigned int rc; // 0 - Success
453 unsigned int nEntries;
454 unsigned int entries[64];
455
456} tAniDbgCfgGetAsResponse, *tpAniDbgCfgGetAsResponse;
457
458// --------------------------------------------------------
459// Input Params for Set ACK Policy
460typedef struct sAniDbgCfgSetAckPolicyParams
461{
462 unsigned int id; // 0 - tx; 1 - rx
463 unsigned int policy;
464 unsigned int staId;
465 unsigned int tcId;
466
467} tAniDbgCfgSetAckPolicyParams, *tpAniDbgCfgSetAckPolicyParams;
468
469// --------------------------------------------------------
470// Input Params to Run AGING command
471typedef struct sAniDbgCfgAgingCmdParams
472{
473 unsigned int staId;
474 unsigned int tcId;
475
476} tAniDbgCfgAgingCmdParams, *tpAniDbgCfgAgingCmdParams;
477
478// --------------------------------------------------------
479// Input Params to TFP Abort command
480typedef struct sAniDbgCfgTfpAbortParams
481{
482 unsigned int staId;
483
484} tAniDbgCfgTfpAbortParams, *tpAniDbgCfgTfpAbortParams;
485
486// --------------------------------------------------------
487// Input Params to Enable/Disable Beacon command
488typedef struct sAniDbgCfgEnableBeaconParams
489{
490 unsigned int fEnableBeacons;
491
492} tAniDbgCfgEnableBeaconParams, *tpAniDbgCfgEnableBeaconParams;
493
494// --------------------------------------------------------
495// Input Params to SET WEP / AES MULTICAST KEY
496typedef struct sAniDbgCfgSetKeyParams
497{
498 unsigned int type; // 0 - WEP; 1 - AES
499 unsigned int keyId; // If AES, 0 - TX; 1 - RX
500 unsigned int keyLen;
501 unsigned char key[16];
502
503} tAniDbgCfgSetKeyParams, *tpAniDbgCfgSetKeyParams;
504
505// --------------------------------------------------------
506// Input Params to SET per STA keys
507typedef struct sAniDbgCfgSetPerStaKeyParams
508{
509 unsigned int staId;
510 unsigned int id0;
511 unsigned int id1;
512 unsigned int keyValid; // 0 - Tx; Anything else Rx
513 unsigned int useDefaultKey;
514 unsigned int defaultKeyId;
515 unsigned int edPolicy;
516 unsigned char key[16];
517 unsigned char keylen;
518
519} tAniDbgCfgSetPerStaKeyParams, *tpAniDbgCfgSetPerStaKeyParams;
520
521// --------------------------------------------------------
522// Cal test and Set Chan functions
523typedef struct sAniDbgCalTestParams
524{
525 unsigned int id; // 0 - Cal; 1 - Set Channel
526 unsigned int chId; // if id == 1; then chId is 1 - 14 or 36 - end of 11a
527}tAniDbgCalTestParams, *tpAniDbgCalTestParams;
528
529typedef struct sAniDbgCalTestResponse
530{
531 unsigned int rc;
532}tAniDbgCalTestResponse, *tpAniDbgCalTestResponse;
533
534// ---------------------------------------------------------
535// Input params to Get DCO params
536typedef struct sAniDbgCfgGetDcoParams
537{
538 unsigned int chain;
539 unsigned int address;
540} tAniDbgCfgGetDcoParams, *tpAniDbgCfgGetDcoParams;
541
542typedef struct sAniDbgCfgGetDcoResponse
543{
544 unsigned int rc;
545 unsigned int val;
546} tAniDbgCfgGetDcoResponse, *tpAniDbgCfgGetDcoResponse;
547
548// --------------------------------------------------------
549// Input params to Get DCO params
550typedef struct sAniDbgCfgSetDcoParams
551{
552 unsigned int chain;
553 unsigned int address;
554 unsigned int val;
555} tAniDbgCfgSetDcoParams, *tpAniDbgCfgSetDcoParams;
556
557// --------------------------------------------------------
558// Input params to setting power template
559typedef struct sAniDbgCfgSetPwrTemplParams
560{
561 unsigned int staId;
562 unsigned int mode;
563 unsigned int rate;
564} tAniDbgCfgSetPwrTemplParams, *tpAniDbgCfgSetPwrTemplParams;
565
566
567// Response struct for Getting power template
568typedef struct sAniDbgCfgGetPwrTemplParams
569{
570 unsigned int staId;
571} tAniDbgCfgGetPwrTemplParams, *tpAniDbgCfgGetPwrTemplParams;
572
573// --------------------------------------------------------
574// Request struct for Setting the init config parameters
575typedef struct sAniDbgCfgInitParams
576{
577 unsigned int mode; // default mode
578 unsigned int rate; // default rate
579 unsigned int fIsInfMode; // Set 1 for infrastructure mode
580 unsigned int staId;
581 unsigned char ownMacAddr[6]; // Set the configured MAC address
582 unsigned int fFwd2Host; // Set 1 to Forward data to host
583 unsigned int fUseRealPhy; // Set 1 to use the real Phy
584 unsigned int fEnablePhyDrops; // Set 1 to enable Phy drops
585 unsigned int dropModeRate; // Set this when Phy drops are enabled
586 unsigned int dropModeSize; // Set this when Phy drops are enabled
587 unsigned int dropModeMode; // Set this when Phy drops are enabled
588} tAniDbgCfgInitParams, *tpAniDbgCfgInitParams;
589
590
591// Response struct for Getting power template
592typedef struct sAniDbgCfgGetPwrTemplResponse
593{
594 unsigned int rc;
595 unsigned int val;
596} tAniDbgCfgGetPwrTemplResponse, *tpAniDbgCfgGetPwrTemplResponse;
597
598
599// --------------------------------------------------------
600// Input params for setting a field in the EEPROM
601
602typedef union sAniDbgCfgEepByteSetParams
603{
604 unsigned char mask;
605 unsigned char value;
606
607} tAniDbgCfgEepByteSetParams, *tpAniDbgCfgEepByteSetParams;
608
609
610// Request struct for Setting the EEPROM field
611typedef struct sAniDbgCfgEepSetParams
612{
613 unsigned int offset;
614 unsigned int size;
615 unsigned int fIsMaskPresent;
616 unsigned char setParams[1];
617} tAniDbgCfgEepSetParams, *tpAniDbgCfgEepSetParams;
618
619// The response structure for this particular request is same as
620// the generic response structure.
621
622// ------------------------------------------------------------
623// Input params for getting the value of a field in the EEPROM
624
625// Request struct for Getting the EEPROM field
626typedef struct sAniDbgCfgEepGetParams
627{
628 unsigned int offset;
629 unsigned int size;
630} tAniDbgCfgEepGetParams, *tpAniDbgCfgEepGetParams;
631
632
633// Response struct for Getting the EEPROM field
634typedef struct sAniDbgCfgEepGetResponse
635{
636 unsigned int rc;
637 unsigned char value[1];
638} tAniDbgCfgEepGetResponse, *tpAniDbgCfgEepGetResponse;
639
640// --------------------------------------------------------
641// Input params for setting the number of transmitters
642
643// Request struct for setting the number of transmitters
644typedef struct sAniDbgCfgSetNumTransmitters
645{
646 unsigned int numTransmitters;
647
648} tAniDbgCfgSetNumTransmitters, *tpAniDbgCfgSetNumTransmitters;
649
650// --------------------------------------------------------
651// Input params for Enabling/Disabling Rx chains
652
653// Request struct for Enabling/Disabling Rx chains
654typedef struct sAniDbgCfgSetRxChains
655{
656 unsigned int numChains;
657 unsigned char chainIndices[3];
658} tAniDbgCfgSetRxChains, *tpAniDbgCfgSetRxChains;
659
660// --------------------------------------------------------
661// Input params for enable/disable SW closed loop TPC
662
663// Request struct for enable/disable SW closed loop TPC
664typedef struct sAniDbgCfgSwClosedLoopTpc
665{
666 unsigned int action;
667} tAniDbgCfgSwClosedLoopTpc, *tpAniDbgCfgSwClosedLoopTpc;
668
669// --------------------------------------------------------
670// Input params for setting the list of test STA MAC address,
671// that will be operating with the AP, for the Multi-NIC tests.
672typedef struct sAniDbgCfgSetStaAddrLst
673{
674 unsigned long numStas;
675 unsigned char macAddrLst[MAX_NUM_TST_STAS_PER_AP][6];
676} tAniDbgCfgSetStaAddrLst, *tpAniDbgCfgSetStaAddrLst;
677
678// --------------------------------------------------------
679// Output Params for getting the current Power and Gain settings
680// for a particular STA.
681typedef struct sAniDbgCfgGetPwrGainResponse
682{
683 unsigned int rc; // 0 - SUCCESS
684 unsigned long pwrCode;
685 unsigned long gain0;
686 unsigned long gain1;
687} tAniDbgCfgGetPwrGainResponse, *tpAniDbgCfgGetPwrGainResponse;
688
689// --------------------------------------------------------
690// Input Params containing the STAID for getting the current Power and Gain settings.
691typedef struct sAniDbgCfgGetPwrGainParams
692{
693 unsigned long staID;
694} tAniDbgCfgGetPwrGainParams, *tpAniDbgCfgGetPwrGainParams;
695
696
697// --------------------------------------------------------
698// Output params for getting temperature
699
700// Response struct for getting temperature of the radio card
701// NOTE:- Stop the traffic to measure temperature
702typedef struct sAniDbgCfgGetTempRsp
703{
704 unsigned int rc; // 0 - SUCCESS; Otherwise FAILED
705 unsigned int temp0; // Chain 0 temperature
706 unsigned int temp1; // Chain 1 temperature
707} tAniDbgCfgGetTempRsp, *tpAniDbgCfgGetTempRsp;
708
709
710// --------------------------------------------------------
711// Generic Response structure for Config requests
712typedef struct sAniDbgCfgResponse
713{
714 unsigned int rc; // 0 - SUCCESS; Otherwise FAILED
715} tAniDbgCfgResponse, *tpAniDbgCfgResponse;
716
717// ====================================================================
718/*
719 For each test there will be a structure defined in this file with
720 the following test descriptions of testId, test trigger type, input
721 parameters and expected output
722
723 This is a template for DBG test structure
724
725 typedef struct sANIAPI_XXXX_TEST_PARAMS
726 {
727 // Input paramters
728 int xyz; // Test specific
729 } tANIAPI_XXXX_TEST_PARAMS;
730
731 typedef struct sANIAPI_XXXX_TEST_RESPONSE
732 {
733 // Output parameters
734 int rc; // Must be ZERO for success and must have error code
735 // for failure
736 int zyx; // Any counters or any debug these will be test spefics
737 } tANIAPI_XXXX_TEST_RESPONSE;
738
739 ********************************************* */
740// =====================================================================
741
742#define ANI_CFG_OPER_GET 0x0
743#define ANI_CFG_OPER_SET 0x1
744
745
746typedef struct sAniDbgCfg
747{
748 unsigned char oper;
749 unsigned char data[124]; // total parms structure must be MAX 128 bytes
750} tAniDbgCfg;
751
752// --------------------------------------------------------------------
753
754// Response structures for InitPdu test
755// No Input Params for this test
756typedef struct sAniDbgInitPduTestResponse
757{
758 // Output parameters
759 unsigned int rc; // Must be ZERO for success and must have error code
760 // for failure
761
762 unsigned int expected;
763 unsigned int i_current;
764 unsigned int totalPduCount;
765} tAniDbgInitPduTestResponse, *tpAniDbgInitPduTestResponse;
766
767
768// --------------------------------------------------------
769// Response structures for BusAccess/RegReadWrite tests
770// No Input Params for this test
771
772typedef struct sAniDbgRegReadWriteTestResponse
773{
774 // Output parameters
775 unsigned int rc; // 0 - SUCCESS; Anything else is an ERROR
776 unsigned int registerAddress;
777 unsigned int expected;
778 unsigned int i_current;
779} tAniDbgRegReadWriteTestResponse, *tpAniDbgRegReadWriteTestResponse;
780
781// --------------------------------------------------------
782// Response structures for Interrupt test
783// No Input Params for this test
784
785typedef struct sAniDbgIntrTestResponse
786{
787 // Output parameters
788 unsigned int rc; // 0 - SUCCESS; Anything else is an ERROR
789 unsigned int status; // Interrupt status register
790 unsigned int mask; // Interrupt mask in test
791 unsigned int bmu; // BMU MB status register contents
792
793} tAniDbgIntrTestResponse, *tpAniDbgIntrTestResponse;
794
795// --------------------------------------------------------
796// No Input Params for this test
797
798typedef struct sAniDbgMemoryTestParams
799{
800 unsigned int startAddress;
801 unsigned int endAddress;
802 unsigned int pattern;
803 unsigned int testLevel;
804} tAniDbgMemoryTestParams, *tpAniDbgMemoryTestParams;
805
806// ---------------------------------------------------------------------
807
808// Response structures for RegReadWrite test
809
810typedef struct sAniDbgMemoryTestResponse
811{
812 // Output parameters
813 unsigned int rc; // Must be ZERO for success and must have error code
814 // for failure
815 unsigned int expected;
816 unsigned int i_current;
817 unsigned int currentAddress;
818 unsigned int testAddress;
819} tAniDbgMemoryTestResponse, *tpAniDbgMemoryTestResponse;
820
821// --------------------------------------------------------
822// Input Parameters for the HIF Burst Read Write test
823
824typedef struct sAniDbgHIFBurstRdWrtTestParams
825{
826 unsigned int AHBAddr;
827 unsigned int size;
828 unsigned char data[1];
829
830} tAniDbgHIFBurstRdWrtTestParams, *tpAniDbgHIFBurstRdWrtTestParams;
831
832// ---------------------------------------------------------------------
833
834// Response structure for the HIF Burst Read Write test
835
836typedef struct sAniDbgHIFBurstRdWrtTestResponse
837{
838 // Output parameters
839 unsigned int rc; // Must be ZERO for success and must have error code
840 // for failure
841 unsigned char readData[1];
842
843} tAniDbgHIFBurstRdWrtTestResponse, *tpAniDbgHIFBurstRdWrtTestResponse;
844
845
846// --------------------------------------------------------
847
848// Take the routing flags and number of frames, as Params for this test
849
850typedef struct sAniDbgSendContinuousTestParams
851{
852 unsigned int routingFlags;
853
854 // 0 - continuously send packets till it is instructed to stop.
855 unsigned int numFramesToSend;
856
857 // 1 - TM ring, otherwise the TD ring will be used.
858 unsigned int fUseTMRing;
859
860 // 1 - loopback packets through the MAC
861 unsigned int fLoopBkPkts;
862} tAniDbgSendContinuousTestParams, *tpAniDbgSendContinuousTestParams;
863
864// Response structures for SendContinuous test
865
866typedef struct sAniDbgSendContinuousTestResponse
867{
868 unsigned int rc; // 0 - Success and anything else is a failure
869
870 unsigned int numPktsSent;
871 unsigned int numPktsFailed;
872 // Size of the last frame attempted to be sent, in case of a failure
873 unsigned int lastFailedPayloadSize;
874} tAniDbgSendContinuousTestResponse, *tpAniDbgSendContinuousTestResponse;
875
876// --------------------------------------------------------
877// Input parameters for the Packet Routing test
878typedef struct sAniDbgPktRoutingTestParams
879{
880 // Routing flags for the test
881 unsigned int routingFlags;
882
883 // Enter 1 for Hardware Seqno
884 unsigned int hsBit;
885
886 // Enter unicast ackPolicy(4 for random)
887 unsigned int ackPolicy;
888
889 // RTS (2 for random)
890 unsigned int rtsFlag;
891
892 // 0 - continuously send packets till it is instructed to stop.
893 unsigned int numPktsToSend;
894
895 // 0xffffffff - For random frame types.
896 unsigned int frameType;
897
898 // 0xffffffff - generates random frame sub-types.
899 unsigned int frmSubType;
900
901 // 1 - TM ring; Otherwise the TD ring will be used.
902 unsigned int fUseTMRing;
903
904 // 0 - random payload sizes
905 unsigned int payloadSize;
906
907 // If "payloadSize" above is set to zero then this is ignored
908 unsigned int fragSize;
909
910 // This parameter specifies whether a unicast packet should be fragmented.
911 // Ignored, if "payloadSize" above is set to a non-zero value.
912 unsigned int fragment;
913
914 // Use a value >3 for random staId generation
915 unsigned int staId;
916
917 // Use a value >7 for random tcId generation
918 unsigned int tcId;
919
920 // Enter random STA range (1 for STAs(0-1),3 for STAs(0-3))
921 unsigned int staRange;
922
923 // TC range (1 for TCs(0-1),3 for TCs(0-3),7 for TCs(0-7)
924 unsigned int tcRange;
925
926 // burst size (< 11)
927 unsigned int burst;
928
929 // Enter 1 to compute CRC
930 unsigned int crc;
931
932 // Enter 1 to loopback packets through the MAC
933 unsigned int fLoopBkPkts;
934
935} tAniDbgPktRoutingTestParams, *tpAniDbgPktRoutingTestParams;
936
937// Structures where response parameters are constructed by the
938// dvtSendPackets() routine
939
940typedef struct sAniDbgSendPktResponse
941{
942 // Total packets sent
943 unsigned int pktGenCount;
944
945 unsigned int fragCnt;
946
947 unsigned int byteCnt;
948
949 unsigned int lowPduCnt;
950
951 unsigned int qFullCnt;
952
953 // Specifies the size of the last frame attempted to be sent
954 unsigned int lastPayloadSize;
955
956 // Specifies the size of the last frame's fragment size
957 unsigned int lastFragSize;
958
959 // Immediate ACK
960 unsigned int cumImmAck;
961
962 // NoACK
963 unsigned int cumNoAck;
964
965 // RTS
966 unsigned int cumRTS;
967
968 // No ACK
969 unsigned int cumNoRTS;
970
971 // TC histogram (pkts)
972 unsigned int cumTC[8];
973
974 //Fragments histogram (frags)
975 unsigned int cumFrag[16];
976
977 // STA histogram (pkts,frags)
978 unsigned int cumSTA[4];
979 unsigned int cumSTAFrags[4];
980
981} tAniDbgSendPktResponse, *tpAniDbgSendPktResponse;
982
983// Response structures for the Packet Routing test
984typedef struct sAniDbgPktRoutingTestResponse
985{
986 // Output parameters
987 unsigned int rc; // Must be ZERO for success and must have error code
988 // for failure
989
990 // Field where response parameters are constructed by the
991 // dvtSendPackets() routine
992 tAniDbgSendPktResponse sendPktsRsp;
993
994} tAniDbgPktRoutingTestResponse, *tpAniDbgPktRoutingTestResponse;
995
996// --------------------------------------------------------
997
998typedef enum sPciCfgTestStatus
999{
1000 ePCI_CFG_TEST_SUCCESS,
1001 ePCI_CFG_TEST_READ_FAILURE,
1002 ePCI_CFG_TEST_VEN_DEV_ID_MISMATCH,
1003 ePCI_CFG_TEST_MIN_GNT_MISMATCH,
1004 ePCI_CFG_TEST_MAX_LAT_MISMATCH,
1005 ePCI_CFG_TEST_CIS_PTR_MISMATCH,
1006 ePCI_CFG_TEST_CIS_CONTENTS_MISMATCH
1007} tPciCfgTestStatus;
1008
1009// Response structures for the PCI Config test
1010typedef struct sAniDbgPciCfgTestResponse
1011{
1012 // Output parameters
1013 unsigned int rc; // Must be ZERO for success and must have error code
1014 // for failure
1015
1016 // Field where the PCI config words, for Polaris are returned by the HDD
1017 unsigned int pciConfig[MAX_PCI_CFG_WRDS];
1018
1019} tAniDbgPciCfgTestResponse, *tpAniDbgPciCfgTestResponse;
1020
1021// --------------------------------------------------------
1022
1023// Various return codes returned for the EEPROM test.
1024typedef enum sEepromTestStatus
1025{
1026 eEEPROM_TEST_SUCCESS,
1027 eEEPROM_TEST_FILE_OPEN_FAILURE,
1028 eEEPROM_TEST_FILE_MAP_FAILURE,
1029 eEEPROM_TEST_INVALID_FILE_SIZE,
1030 eEEPROM_TEST_MEMORY_ALLOC_FAILURE,
1031 eEEPROM_TEST_CRC_MISMATCH_FAILURE
1032} tEepromTestStatus;
1033
1034
1035// Take the EEPROM filename, as Params for this test
1036
1037typedef struct sAniDbgEepromTestParams
1038{
1039 // EEPROM File Name.
1040 char eepromFilename[256];
1041
1042} tAniDbgEepromTestParams, *tpAniDbgEepromTestParams;
1043
1044// Response structures for SendContinuous test
1045
1046typedef struct sAniDbgEepromTestResponse
1047{
1048 unsigned int rc; // 0 - Success and anything else is a failure
1049
1050} tAniDbgEepromTestResponse, *tpAniDbgEepromTestResponse;
1051
1052// ---------------------------------------------------------------------
1053
1054// input params for RHP HASH TBL tests
1055
1056typedef struct sAniDbgRhpHashTblMultipleEntryTestParams
1057{
1058 unsigned int n; // number of entries
1059
1060} tAniDbgRhpHashTblMultipleEntryTestParams,
1061 *tpAniDbgRhpHashTblMultipleEntryTestParams;
1062
1063typedef struct sAniDbgRhpHashTblTestParams
1064{
1065 unsigned int staId;
1066 unsigned char macAddr[6];
1067 unsigned int flags;
1068 unsigned int hashFlagRsvd;
1069 unsigned int rsvdField;
1070
1071} tAniDbgRhpHashTblTestParams, *tpAniDbgRhpHashTblTestParams;
1072
1073
1074typedef struct sAniDbgRhpHashTblTestResponse
1075{
1076 unsigned int rc; // 0 For Success
1077} tAniDbgRhpHashTblTestResponse, *tpAniDbgRhpHashTblTestResponse;
1078
1079
1080// -----------------------------------------------------------
1081
1082// Here both pParms and pResponse structures are interpreted by the
1083// User of the API based on testId
1084
1085typedef struct sANI_DBG_TEST_INFO {
1086
1087 tANI_TEST_ID testId;
1088
1089 // This field indicates this test runs synchronously or not.
1090 // If it is not, then, the test originator will have the
1091 // ability to query for intermediate results.
1092 // ANI_START = 1; ANI_GET_RESULTS = 2; ANI_STOP = 3
1093 tANI_TEST_TRIG_TYPE testTriggerType;
1094
1095 // test state
1096 tANI_DBG_TEST_STATE testState;
1097
1098 // This points to a structure which contains parameters for
1099 // test defined by dvtTestId. May be NULL if no parameters
1100 // are needed
1101 unsigned long sizeOfParms;
1102 unsigned char parms[MAX_PARMS_SIZE];
1103
1104 // This points to a buffer to hold response from the test
1105 // Response shall be there from the test and it MUST have
1106 // return code ZERO for SUCCESS and error code for test
1107 // failure
1108 unsigned long sizeOfResponse;
1109 unsigned char response[MAX_RESPONSE_SIZE];
1110
1111} tANI_DBG_TEST_INFO;
1112
1113// Returns test start function pointer or stop function pointer or
1114// get info on test function pointer from the function pointer array
1115// that is initialized during the dvtInitGlobal routine.
1116#ifdef __cplusplus
1117extern "C" void* dvtGetFuncPtr(void *, int, int );
1118#else
1119extern void* dvtGetFuncPtr(void *, int, int );
1120#endif
1121
1122
1123// declare a function prototype for 'start', 'update' and 'stop' routines
1124typedef void t_DbgTestRoutine(void *);
1125
1126// called by the test routine when it completes
1127extern void dbgTestCompleted(void *mpAdapterPtr);
1128
1129
1130// DBG/DVT dump information structures & defines
1131
1132#define ANI_DBG_GRP_INFO_TYPE_MISC 0x00000001
1133#define ANI_DBG_GRP_INFO_TYPE_BMU 0x00000002
1134#define ANI_DBG_GRP_INFO_TYPE_TFP 0x00000004
1135#define ANI_DBG_GRP_INFO_TYPE_RHP 0x00000008
1136#define ANI_DBG_GRP_INFO_TYPE_RFP 0x00000010
1137#define ANI_DBG_GRP_INFO_TYPE_STA 0x00000020
1138#define ANI_DBG_GRP_INFO_TYPE_FPHY 0x00000040
1139#define ANI_DBG_GRP_INFO_TYPE_FPHY_FIFO 0x00000080
1140#define ANI_DBG_GRP_INFO_TYPE_RPHY 0x00000100
1141#define ANI_DBG_GRP_INFO_TYPE_HCF 0x00000200
1142#define ANI_DBG_GRP_INFO_TYPE_SP 0x00000400
1143#define ANI_DBG_GRP_INFO_TYPE_CP 0x00000800
1144
1145
1146#define ANI_DBG_GRP_INFO_TYPE_ALL (ANI_DBG_GRP_INFO_TYPE_MISC | \
1147 ANI_DBG_GRP_INFO_TYPE_BMU | \
1148 ANI_DBG_GRP_INFO_TYPE_TFP | \
1149 ANI_DBG_GRP_INFO_TYPE_RHP | \
1150 ANI_DBG_GRP_INFO_TYPE_RFP | \
1151 ANI_DBG_GRP_INFO_TYPE_STA | \
1152 ANI_DBG_GRP_INFO_TYPE_FPHY| \
1153 ANI_DBG_GRP_INFO_TYPE_FPHY_FIFO | \
1154 ANI_DBG_GRP_INFO_TYPE_RPHY | \
1155 ANI_DBG_GRP_INFO_TYPE_HCF | \
1156 ANI_DBG_GRP_INFO_TYPE_SP)
1157
1158
1159
1160typedef struct sANI_DBG_MISC_INFO {
1161
1162 unsigned long sysMode;
1163 unsigned long sysIntrMask;
1164 unsigned long intrMask;
1165 unsigned long phyIntrMask;
1166 unsigned long intrStatus[32];
1167 unsigned long phyIntrStatus[16];
1168 unsigned long eofSofExceptionResets;
1169 unsigned long bmuExceptionResets;
1170 unsigned long lowPduExceptionResets;
1171 unsigned long userTriggeredResets;
1172 unsigned long logPExceptionResets;
1173
1174} tANI_DBG_MISC_INFO;
1175
1176
1177typedef struct sANI_DBG_BMU_INFO {
1178
1179 unsigned long control;
1180 unsigned long fp_hptr;
1181 unsigned long tptr;
1182 unsigned long pdu;
1183 unsigned long exception;
1184 unsigned long exceptionMaster;
1185 unsigned long dropCount;
1186 unsigned long workQueue[10][4];
1187
1188} tANI_DBG_BMU_INFO;
1189
1190
1191typedef struct sANI_DBG_TFP_INFO {
1192
1193 unsigned long control;
1194 unsigned long modeEnable;
1195 unsigned long templEnable;
1196 unsigned long retryQid;
1197 unsigned long tsfHi;
1198 unsigned long tsfLo;
1199 unsigned long beacon;
1200 unsigned long probeDelay;
1201 unsigned long tbttHi;
1202 unsigned long tbttLo;
1203 unsigned long nav;
1204 unsigned long listenInterval;
1205 unsigned long delayTx;
1206 unsigned long dtimPeriod;
1207 unsigned long rtsCount;
1208 unsigned long rtsFailure;
1209
1210} tANI_DBG_TFP_INFO;
1211
1212
1213typedef struct sANI_DBG_RHP_INFO {
1214
1215 unsigned long sof;
1216 unsigned long sof_chunk;
1217 unsigned long fragCount;
1218 unsigned long dropCount;
1219 unsigned long fcsCount;
1220 unsigned long bssIdMismatch;
1221 unsigned long destMismatch;
1222 unsigned long lengthError;
1223 unsigned long pduError;
1224 unsigned long abortCount;
1225 unsigned long reqRate;
1226 unsigned long delayAB;
1227 unsigned long macAddrHi;
1228 unsigned long macAddrLo;
1229 unsigned long bssIdHi;
1230 unsigned long bssIdLo;
1231 unsigned long relayCount;
1232 unsigned long hash_MissCount;
1233 unsigned long hash_srcHi;
1234 unsigned long hash_srcLo;
1235 unsigned long hash_type;
1236 unsigned long hash_subType;
1237 unsigned long dbg_hangStatus;
1238 unsigned long dbg_fragIgnoreCount;
1239 unsigned long pduCount;
1240
1241} tANI_DBG_RHP_INFO;
1242
1243
1244typedef struct sANI_DBG_RFP_INFO {
1245
1246 unsigned long packets;
1247 unsigned long multicastPackets;
1248 unsigned long dupPackets;
1249 unsigned long byteCount;
1250 unsigned long dropCount;
1251 unsigned long byte64;
1252 unsigned long byte128;
1253 unsigned long byte256;
1254 unsigned long byte512;
1255 unsigned long byte1024;
1256 unsigned long byte1519;
1257 unsigned long byte2048;
1258 unsigned long byte4096;
1259
1260} tANI_DBG_RFP_INFO;
1261
1262typedef struct sANI_DBG_SP_INFO {
1263
1264 unsigned long wep_dky0_w0;
1265 unsigned long wep_dky0_w1;
1266 unsigned long wep_default_rc0;
1267
1268 unsigned long wep_dky1_w0;
1269 unsigned long wep_dky1_w1;
1270 unsigned long wep_default_rc1;
1271
1272 unsigned long wep_dky2_w0;
1273 unsigned long wep_dky2_w1;
1274 unsigned long wep_default_rc2;
1275
1276 unsigned long wep_dky3_w0;
1277 unsigned long wep_dky3_w1;
1278 unsigned long wep_default_rc3;
1279
1280} tANI_DBG_SP_INFO;
1281
1282typedef struct sANI_DBG_CP_INFO {
1283
1284 unsigned long cp_control;
1285 unsigned long Compression_Expansion_Cnt;
1286 unsigned long Compression_NUM_pkts;
1287
1288 unsigned long Decompression_NUM_pkts;
1289 unsigned long Compression_50p_NUM_pkts;
1290 unsigned long CP_Error_status;
1291
1292 unsigned long Cp_maximum_pkt_len;
1293
1294} tANI_DBG_CP_INFO;
1295
1296
1297typedef struct sANI_DBG_STA_TX_WQ_INFO {
1298
1299 unsigned long txWqAddr;
1300 unsigned long txWqDump[4];
1301
1302 unsigned long tptr;
1303 unsigned long hptr;
1304 unsigned long aptr;
1305 unsigned long a_tpkts;
1306 unsigned long h_tpkts;
1307 unsigned long frag;
1308 unsigned long bytes;
1309 unsigned long ack;
1310 unsigned long valid;
1311
1312} tANI_DBG_STA_TX_WQ_INFO;
1313
1314
1315
1316typedef struct sANI_DBG_TC_DESC {
1317
1318 unsigned long valid;
1319 unsigned long rxAckType;
1320 unsigned long newPkt;
1321 unsigned long rxSeqNum;
1322 unsigned long rxPktTimeStamp;
1323 unsigned long SV;
1324 unsigned long ackTimeout;
1325 unsigned long numOfFragsSucessful;
1326 unsigned long rxBDPtr;
1327 unsigned long txReplayCountHi;
1328 unsigned long txReplayCountLo;
1329 unsigned long rxReplayCountHi;
1330 unsigned long rxReplayCountLo;
1331
1332} tANI_DBG_TC_DESC;
1333
1334
1335typedef struct sANI_DBG_PWR_TEMPL {
1336
1337 unsigned long retryPhyMode;
1338 unsigned long retryCb;
1339 unsigned long retryEsf;
1340 unsigned long sb;
1341 unsigned long rate;
1342 unsigned long esf;
1343 unsigned long tifs;
1344 unsigned long edcf;
1345 unsigned long cb;
1346 unsigned long mode;
1347 unsigned long pwrLvl;
1348 unsigned long nTransmitters;
1349 unsigned long retry1rate;
1350 unsigned long retry2rate;
1351
1352 unsigned long pwrTemplate; //entire value
1353
1354} tANI_DBG_PWR_TEMPL;
1355
1356
1357typedef struct sANI_DBG_STA {
1358
1359 unsigned long staDescAddr;
1360 unsigned long staDump[256];
1361
1362 tANI_DBG_TC_DESC tcDesc[9]; // 8 tc Ids and 9th mgmt TC
1363
1364 unsigned long cbits_hcf;
1365 unsigned long cbits_ps;
1366 unsigned long cbits_ps1;
1367 unsigned long cbits_tx_en;
1368
1369 unsigned long descStat_aes_sent;
1370 unsigned long descStat_aes_recv;
1371 unsigned long descStat_replays;
1372 unsigned long descStat_formaterr;
1373 unsigned long descStat_aes_decypterr_default;
1374 unsigned long descStat_aes_decypterr_ucast;
1375
1376 unsigned long tfpStat_failed;
1377 unsigned long tfpStat_retry;
1378 unsigned long tfpStat_multiretry;
1379 unsigned long tfpStat_ackto;
1380 unsigned long tfpStat_frags;
1381 unsigned long tfpStat_rtsBrqs;
1382 unsigned long tfpStat_pkts;
1383 unsigned long tfpStat_ctsBackTimeouts;
1384
1385
1386 unsigned long phyStatHi;
1387 unsigned long phyStatLo;
1388
1389 unsigned long ackToNonPrimRates;
1390 unsigned long nFragSuccNonPrimRates;
1391
1392} tANI_DBG_STA;
1393
1394
1395typedef struct sANI_DBG_STA_INFO {
1396
1397 unsigned long staId; // input
1398
1399 tANI_DBG_STA sta;
1400
1401 tANI_DBG_STA_TX_WQ_INFO txwq[8];
1402
1403 tANI_DBG_PWR_TEMPL pwrTempl;
1404
1405} tANI_DBG_STA_INFO;
1406
1407
1408typedef struct sANI_DBG_FPHY_INFO {
1409
1410 unsigned long fphy_symPer;
1411 unsigned long cca_delayOffset;
1412 unsigned long cca_startDelay;
1413 unsigned long timeStamp_Hi;
1414 unsigned long timeStamp_Lo;
1415 unsigned long dropRate;
1416 unsigned long burstSize;
1417 unsigned long reg;
1418 unsigned long stat_bytes01;
1419 unsigned long stat_bytes23;
1420 unsigned long stat_bytes45;
1421 unsigned long pkts_tx;
1422 unsigned long pkts_rx;
1423 unsigned long pkts_drops;
1424 unsigned long rxin_sof;
1425 unsigned long rxin_eof;
1426 unsigned long rxout_sof;
1427 unsigned long rxout_eof;
1428 unsigned long txin_sof;
1429 unsigned long txin_eof;
1430 unsigned long txout_sof;
1431 unsigned long txout_eof;
1432
1433} tANI_DBG_FPHY_INFO;
1434
1435
1436#define MAX_FIFO_ENTRIES_PER_REQUEST 200
1437
1438typedef struct sAniDvtPhyfEntry
1439{
1440 unsigned char bytes[50];
1441 unsigned char len;
1442 unsigned char mode;
1443 unsigned char phyLen;
1444 unsigned char macLen;
1445 unsigned char dropByte;
1446 unsigned char reserved;
1447 unsigned long sof;
1448 unsigned long eof;
1449} tAniDvtPhyfEntry;
1450
1451
1452#define ANI_DBG_FIFO_CMD_GET 0x1
1453#define ANI_DBG_FIFO_CMD_CLEAR 0x2
1454
1455
1456typedef struct sANI_DBG_FPHY_FIFO {
1457
1458 unsigned long command; // set to either 'get' of 'clear' fifo
1459 unsigned long entries; // entries to read
1460 unsigned long offset; // offset to read from
1461
1462 unsigned long totalBytes;
1463 unsigned long approxEntries;
1464
1465 unsigned long validEntries;
1466 tAniDvtPhyfEntry Fifo[MAX_FIFO_ENTRIES_PER_REQUEST];
1467
1468} tANI_DBG_FPHY_FIFO;
1469
1470
1471typedef struct sANI_DBG_RPHY_MPI_INFO {
1472
1473 unsigned long tfp_phy_sof;
1474 unsigned long tfp_phy_eof;
1475 unsigned long phy_tfp_req;
1476 unsigned long txa_mpi_data_req;
1477 unsigned long txb_mpi_data_req;
1478 unsigned long mpi_txa_data_val;
1479 unsigned long mpi_txb_data_val;
1480 unsigned long mpi_txa_pktend;
1481 unsigned long mpi_txb_pktend;
1482 unsigned long mpi_txctl_pktend;
1483 unsigned long mpi_txctl_ctlbytes_val;
1484
1485} tANI_DBG_RPHY_MPI_INFO;
1486
1487
1488typedef struct sANI_DBG_RPHY_PMI_INFO {
1489
1490 unsigned long rxa_mpi_pktstart;
1491 unsigned long rxb_mpi_pktstart;
1492 unsigned long rxa_mpi_pktend;
1493 unsigned long rxb_mpi_pktend;
1494 unsigned long rxa_mpi_data_val;
1495 unsigned long rxb_mpi_data_val;
1496 unsigned long rhp_phy_shutoff;
1497 unsigned long rhp_phy_sof_c;
1498 unsigned long rhp_phy_sof_p;
1499 unsigned long rhp_phy_eof_c;
1500 unsigned long rhp_phy_eof_p;
1501 unsigned long phy_rhp_data_val;
1502 unsigned long pmi_int;
1503
1504} tANI_DBG_RPHY_PMI_INFO;
1505
1506typedef struct sANI_DBG_RPHY_PHYINT_INFO {
1507
1508 unsigned long status;
1509 unsigned long fast_mask;
1510 unsigned long slow_mask;
1511 unsigned long host_mask;
1512
1513} tANI_DBG_RPHY_PHYINT_INFO;
1514
1515
1516typedef struct sANI_DBG_RPHY_INFO {
1517
1518 tANI_DBG_RPHY_MPI_INFO mpi;
1519 tANI_DBG_RPHY_PMI_INFO pmi;
1520 tANI_DBG_RPHY_PHYINT_INFO phyint;
1521
1522} tANI_DBG_RPHY_INFO;
1523
1524
1525typedef struct sANI_DBG_SCH_INFO
1526{
1527 unsigned long curSch; // RO
1528 unsigned long numSch; // RO
1529 unsigned long numInt; // RO
1530 unsigned long numEndInt; // RO
1531 unsigned long numCFB; // RO
1532 unsigned long firstCFB; // RO
1533
1534 unsigned long fixedSch; // RW
1535 unsigned long gDvtPoll; // RW
1536 unsigned long maxTimeout; // RW
1537 unsigned long minTxop; // RW
1538 unsigned long maxTxop; // RW
1539 unsigned long maxTcid; // RW
1540 unsigned long maxSta; // RW
1541 unsigned long minSta; // RW
1542 unsigned long maxInst; // RW
1543
1544 unsigned long firstSch; // RO
1545 unsigned long cfbStart; // RO
1546 unsigned long cfbEnd; // RO
1547 unsigned long cumCFB; // RO
1548 unsigned long cumCP; // RO
1549
1550 unsigned long haltSch; // RW
1551 unsigned long numTim; // RO
1552} tANI_DBG_SCH_INFO;
1553
1554
1555typedef struct sANI_DBG_HCF_INFO {
1556
1557 unsigned long bSetInfo; // 0 = read info, 1 = set info
1558 tANI_DBG_SCH_INFO schInfo;
1559
1560} tANI_DBG_HCF_INFO;
1561
1562typedef struct sANI_DBG_AP_SWITCH_INFO {
1563
1564
1565 // Space to hold the SSIDList and the BSSID.
1566 unsigned char SSID_BSSID_BUF[262]; // 262 == WNIAPI_MAX_SSID_LIST_STR + WNIAPI_BSSID_SIZE
1567
1568
1569} tANI_DBG_AP_SWITCH_INFO;
1570
1571
1572typedef struct sANI_DBG_INFO {
1573
1574 unsigned long dbgInfoMask; // indicates which members are valid
1575
1576 tANI_DBG_MISC_INFO miscInfo;
1577 tANI_DBG_BMU_INFO bmuInfo;
1578 tANI_DBG_TFP_INFO tfpInfo;
1579 tANI_DBG_RHP_INFO rhpInfo;
1580 tANI_DBG_RFP_INFO rfpInfo;
1581 tANI_DBG_STA_INFO staInfo;
1582 tANI_DBG_FPHY_INFO fphyInfo;
1583 tANI_DBG_FPHY_FIFO fphyFifo;
1584 tANI_DBG_RPHY_INFO rphyInfo;
1585 tANI_DBG_HCF_INFO hcfInfo;
1586 tANI_DBG_SP_INFO spInfo;
1587 tANI_DBG_CP_INFO cpInfo;
1588
1589} tANI_DBG_INFO;
1590
1591extern tSirRetStatus dvtGetDumpInfo(void *pMac, tANI_DBG_INFO *pDbgInfo );
1592
1593extern tSirRetStatus dvtGetConfigInfo(void *pMac, tANI_DBG_TEST_INFO *pTestInfo );
1594
1595#ifdef __cplusplus
1596extern "C" void dvtSetStopTestFlag( unsigned char stopTest );
1597#else
1598extern void dvtSetStopTestFlag( unsigned char stopTest );
1599#endif
1600
1601
1602#endif // _ANIDBGTEST_H_