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