Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: chromeos/drivers/ath6kl/include/testcmd.h

Issue 646055: Atheros AR600x driver + build glue (Closed)
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 //------------------------------------------------------------------------------
2 // <copyright file="testcmd.h" company="Atheros">
3 // Copyright (c) 2004-2005 Atheros Corporation. All rights reserved.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License version 2 as
7 // published by the Free Software Foundation;
8 //
9 // Software distributed under the License is distributed on an "AS
10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
11 // implied. See the License for the specific language governing
12 // rights and limitations under the License.
13 //
14 //
15 //------------------------------------------------------------------------------
16 //==============================================================================
17 // Author(s): ="Atheros"
18 //==============================================================================
19
20 #ifndef TESTCMD_H_
21 #define TESTCMD_H_
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #define TCMD_MAX_RATES 20
28
29 typedef enum {
30 ZEROES_PATTERN = 0,
31 ONES_PATTERN,
32 REPEATING_10,
33 PN7_PATTERN,
34 PN9_PATTERN,
35 PN15_PATTERN
36 }TX_DATA_PATTERN;
37
38 /* Continous tx
39 mode : TCMD_CONT_TX_OFF - Disabling continous tx
40 TCMD_CONT_TX_SINE - Enable continuous unmodulated tx
41 TCMD_CONT_TX_FRAME- Enable continuous modulated tx
42 freq : Channel freq in Mhz. (e.g 2412 for channel 1 in 11 g)
43 dataRate: 0 - 1 Mbps
44 1 - 2 Mbps
45 2 - 5.5 Mbps
46 3 - 11 Mbps
47 4 - 6 Mbps
48 5 - 9 Mbps
49 6 - 12 Mbps
50 7 - 18 Mbps
51 8 - 24 Mbps
52 9 - 36 Mbps
53 10 - 28 Mbps
54 11 - 54 Mbps
55 txPwr: Tx power in dBm[5 -11] for unmod Tx, [5-14] for mod Tx
56 antenna: 1 - one antenna
57 2 - two antenna
58 Note : Enable/disable continuous tx test cmd works only when target is awake.
59 */
60
61 typedef enum {
62 TCMD_CONT_TX_OFF = 0,
63 TCMD_CONT_TX_SINE,
64 TCMD_CONT_TX_FRAME,
65 TCMD_CONT_TX_TX99,
66 TCMD_CONT_TX_TX100
67 } TCMD_CONT_TX_MODE;
68
69 typedef PREPACK struct {
70 A_UINT32 testCmdId;
71 A_UINT32 mode;
72 A_UINT32 freq;
73 A_UINT32 dataRate;
74 A_INT32 txPwr;
75 A_UINT32 antenna;
76 A_UINT32 enANI;
77 A_UINT32 scramblerOff;
78 A_UINT32 aifsn;
79 A_UINT16 pktSz;
80 A_UINT16 txPattern;
81 A_UINT32 shortGuard;
82 A_UINT32 numPackets;
83 } POSTPACK TCMD_CONT_TX;
84
85 #define TCMD_TXPATTERN_ZERONE 0x1
86 #define TCMD_TXPATTERN_ZERONE_DIS_SCRAMBLE 0x2
87
88 /* Continuous Rx
89 act: TCMD_CONT_RX_PROMIS - promiscuous mode (accept all incoming frames)
90 TCMD_CONT_RX_FILTER - filter mode (accept only frames with dest
91 address equal specified
92 mac address (set via act =3)
93 TCMD_CONT_RX_REPORT off mode (disable cont rx mode and get the
94 report from the last cont
95 Rx test)
96
97 TCMD_CONT_RX_SETMAC - set MacAddr mode (sets the MAC address for the
98 target. This Overrides
99 the default MAC address.)
100
101 */
102 typedef enum {
103 TCMD_CONT_RX_PROMIS =0,
104 TCMD_CONT_RX_FILTER,
105 TCMD_CONT_RX_REPORT,
106 TCMD_CONT_RX_SETMAC,
107 TCMD_CONT_RX_SET_ANT_SWITCH_TABLE
108 } TCMD_CONT_RX_ACT;
109
110 typedef PREPACK struct {
111 A_UINT32 testCmdId;
112 A_UINT32 act;
113 A_UINT32 enANI;
114 PREPACK union {
115 struct PREPACK TCMD_CONT_RX_PARA {
116 A_UINT32 freq;
117 A_UINT32 antenna;
118 } POSTPACK para;
119 struct PREPACK TCMD_CONT_RX_REPORT {
120 A_UINT32 totalPkt;
121 A_INT32 rssiInDBm;
122 A_UINT32 crcErrPkt;
123 A_UINT32 secErrPkt;
124 A_UINT16 rateCnt[TCMD_MAX_RATES];
125 A_UINT16 rateCntShortGuard[TCMD_MAX_RATES];
126 } POSTPACK report;
127 struct PREPACK TCMD_CONT_RX_MAC {
128 A_UCHAR addr[ATH_MAC_LEN];
129 } POSTPACK mac;
130 struct PREPACK TCMD_CONT_RX_ANT_SWITCH_TABLE {
131 A_UINT32 antswitch1;
132 A_UINT32 antswitch2;
133 }POSTPACK antswitchtable;
134 } POSTPACK u;
135 } POSTPACK TCMD_CONT_RX;
136
137 /* Force sleep/wake test cmd
138 mode: TCMD_PM_WAKEUP - Wakeup the target
139 TCMD_PM_SLEEP - Force the target to sleep.
140 */
141 typedef enum {
142 TCMD_PM_WAKEUP = 1, /* be consistent with target */
143 TCMD_PM_SLEEP
144 } TCMD_PM_MODE;
145
146 typedef PREPACK struct {
147 A_UINT32 testCmdId;
148 A_UINT32 mode;
149 } POSTPACK TCMD_PM;
150
151 typedef enum {
152 TCMD_CONT_TX_ID,
153 TCMD_CONT_RX_ID,
154 TCMD_PM_ID
155 } TCMD_ID;
156
157 typedef PREPACK union {
158 TCMD_CONT_TX contTx;
159 TCMD_CONT_RX contRx;
160 TCMD_PM pm;
161 } POSTPACK TEST_CMD;
162
163 #ifdef __cplusplus
164 }
165 #endif
166
167 #endif /* TESTCMD_H_ */
OLDNEW
« no previous file with comments | « chromeos/drivers/ath6kl/include/target_reg_table.h ('k') | chromeos/drivers/ath6kl/include/wlan_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698