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