if_atureg.h revision 1.1 1 1.1 joff /* $NetBSD: if_atureg.h,v 1.1 2005/01/24 01:17:03 joff Exp $ */
2 1.1 joff /* $OpenBSD: if_atureg.h,v 1.21 2004/12/23 13:19:38 dlg Exp $ */
3 1.1 joff /*
4 1.1 joff * Copyright (c) 2003
5 1.1 joff * Daan Vreeken <Danovitsch (at) Vitsch.net>. All rights reserved.
6 1.1 joff *
7 1.1 joff * Redistribution and use in source and binary forms, with or without
8 1.1 joff * modification, are permitted provided that the following conditions
9 1.1 joff * are met:
10 1.1 joff * 1. Redistributions of source code must retain the above copyright
11 1.1 joff * notice, this list of conditions and the following disclaimer.
12 1.1 joff * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 joff * notice, this list of conditions and the following disclaimer in the
14 1.1 joff * documentation and/or other materials provided with the distribution.
15 1.1 joff * 3. All advertising materials mentioning features or use of this software
16 1.1 joff * must display the following acknowledgement:
17 1.1 joff * This product includes software developed by Daan Vreeken.
18 1.1 joff * 4. Neither the name of the author nor the names of any co-contributors
19 1.1 joff * may be used to endorse or promote products derived from this software
20 1.1 joff * without specific prior written permission.
21 1.1 joff *
22 1.1 joff * THIS SOFTWARE IS PROVIDED BY DAAN VREEKEN AND CONTRIBUTORS ``AS IS'' AND
23 1.1 joff * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 1.1 joff * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 1.1 joff * ARE DISCLAIMED. IN NO EVENT SHALL Daan Vreeken OR THE VOICES IN HIS HEAD
26 1.1 joff * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 1.1 joff * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 1.1 joff * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 1.1 joff * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 1.1 joff * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 1.1 joff * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32 1.1 joff * THE POSSIBILITY OF SUCH DAMAGE.
33 1.1 joff *
34 1.1 joff */
35 1.1 joff
36 1.1 joff #define ATU_CONFIG_NO 1
37 1.1 joff #define ATU_IFACE_IDX 0
38 1.1 joff
39 1.1 joff /* the number of simultaniuously requested RX transfers */
40 1.1 joff #define ATU_RX_LIST_CNT 1
41 1.1 joff
42 1.1 joff /*
43 1.1 joff * the number of simultaniously started TX transfers
44 1.1 joff * my measurements :
45 1.1 joff * 1 430.82 KB/sec
46 1.1 joff * 2 534.66 KB/sec
47 1.1 joff * 3 536.23 KB/sec
48 1.1 joff * 4 537.80 KB/sec
49 1.1 joff * 6 537.30 KB/sec
50 1.1 joff * 8 535.31 KB/sec
51 1.1 joff * 16 535.68 KB/sec
52 1.1 joff * 128 535.67 KB/sec (before you ask : yes, 128 is silly :)
53 1.1 joff * (+/- 24% increase)
54 1.1 joff */
55 1.1 joff #define ATU_TX_LIST_CNT 8
56 1.1 joff
57 1.1 joff /*
58 1.1 joff * According to the 802.11 spec (7.1.2) the frame body can be up to 2312 bytes
59 1.1 joff */
60 1.1 joff #define ATU_RX_BUFSZ (ATU_RX_HDRLEN + \
61 1.1 joff sizeof(struct ieee80211_frame_addr4) + 2312 + 4)
62 1.1 joff /* BE CAREFULL! should add ATU_TX_PADDING */
63 1.1 joff #define ATU_TX_BUFSZ (ATU_TX_HDRLEN + \
64 1.1 joff sizeof(struct ieee80211_frame_addr4) + 2312)
65 1.1 joff
66 1.1 joff #define ATU_MIN_FRAMELEN 60
67 1.1 joff
68 1.1 joff /*
69 1.1 joff * Sending packets of more than 1500 bytes confuses some access points, so the
70 1.1 joff * default MTU is set to 1500 but can be increased up to 2310 bytes using
71 1.1 joff * ifconfig
72 1.1 joff */
73 1.1 joff #define ATU_DEFAULT_MTU 1500
74 1.1 joff #define ATU_MAX_MTU (2312 - 2)
75 1.1 joff
76 1.1 joff #define ATU_ENDPT_RX 0x0
77 1.1 joff #define ATU_ENDPT_TX 0x1
78 1.1 joff #define ATU_ENDPT_MAX 0x2
79 1.1 joff
80 1.1 joff #define ATU_TX_TIMEOUT 10000
81 1.1 joff #define ATU_JOIN_TIMEOUT 2000
82 1.1 joff
83 1.1 joff #define ATU_NO_QUIRK 0x0000
84 1.1 joff #define ATU_QUIRK_NO_REMAP 0x0001
85 1.1 joff #define ATU_QUIRK_FW_DELAY 0x0002
86 1.1 joff
87 1.1 joff #define ATU_DEFAULT_SSID ""
88 1.1 joff #define ATU_DEFAULT_CHANNEL 10
89 1.1 joff
90 1.1 joff enum atu_radio_type {
91 1.1 joff RadioRFMD = 0,
92 1.1 joff RadioRFMD2958,
93 1.1 joff RadioRFMD2958_SMC,
94 1.1 joff RadioIntersil
95 1.1 joff };
96 1.1 joff
97 1.1 joff struct atu_type {
98 1.1 joff u_int16_t atu_vid;
99 1.1 joff u_int16_t atu_pid;
100 1.1 joff enum atu_radio_type atu_radio;
101 1.1 joff u_int16_t atu_quirk;
102 1.1 joff };
103 1.1 joff
104 1.1 joff struct atu_softc;
105 1.1 joff
106 1.1 joff struct atu_chain {
107 1.1 joff struct atu_softc *atu_sc;
108 1.1 joff usbd_xfer_handle atu_xfer;
109 1.1 joff char *atu_buf;
110 1.1 joff struct mbuf *atu_mbuf;
111 1.1 joff u_int8_t atu_idx;
112 1.1 joff u_int16_t atu_length;
113 1.1 joff int atu_in_xfer;
114 1.1 joff SLIST_ENTRY(atu_chain) atu_list;
115 1.1 joff };
116 1.1 joff
117 1.1 joff struct atu_cdata {
118 1.1 joff struct atu_chain atu_tx_chain[ATU_TX_LIST_CNT];
119 1.1 joff struct atu_chain atu_rx_chain[ATU_RX_LIST_CNT];
120 1.1 joff
121 1.1 joff SLIST_HEAD(atu_list_head, atu_chain) atu_rx_free;
122 1.1 joff struct atu_list_head atu_tx_free;
123 1.1 joff
124 1.1 joff u_int8_t atu_tx_inuse;
125 1.1 joff u_int8_t atu_tx_last_idx;
126 1.1 joff };
127 1.1 joff
128 1.1 joff #define MAX_SSID_LEN 32
129 1.1 joff #define ATU_AVG_TIME 20
130 1.1 joff
131 1.1 joff struct atu_softc {
132 1.1 joff USBBASEDEVICE atu_dev;
133 1.1 joff struct ieee80211com sc_ic;
134 1.1 joff int (*sc_newstate)(struct ieee80211com *,
135 1.1 joff enum ieee80211_state, int);
136 1.1 joff
137 1.1 joff char sc_state;
138 1.1 joff #define ATU_S_DEAD 0
139 1.1 joff #define ATU_S_OK 1
140 1.1 joff #define ATU_S_UNCONFIG 2
141 1.1 joff char sc_cmd;
142 1.1 joff #define ATU_C_NONE 0
143 1.1 joff #define ATU_C_SCAN 1
144 1.1 joff #define ATU_C_JOIN 2
145 1.1 joff struct usb_task sc_task;
146 1.1 joff
147 1.1 joff usbd_device_handle atu_udev;
148 1.1 joff usbd_interface_handle atu_iface;
149 1.1 joff struct ethercom atu_ec;
150 1.1 joff struct ifmedia atu_media;
151 1.1 joff int atu_ed[ATU_ENDPT_MAX];
152 1.1 joff usbd_pipe_handle atu_ep[ATU_ENDPT_MAX];
153 1.1 joff int atu_unit;
154 1.1 joff int atu_if_flags;
155 1.1 joff
156 1.1 joff struct atu_cdata atu_cdata;
157 1.1 joff
158 1.1 joff struct timeval atu_rx_notice;
159 1.1 joff
160 1.1 joff u_int8_t atu_bssid[ETHER_ADDR_LEN];
161 1.1 joff enum atu_radio_type atu_radio;
162 1.1 joff u_int16_t atu_quirk;
163 1.1 joff
164 1.1 joff u_int8_t atu_ssid[MAX_SSID_LEN];
165 1.1 joff u_int8_t atu_ssidlen;
166 1.1 joff u_int8_t atu_channel;
167 1.1 joff u_int16_t atu_desired_channel;
168 1.1 joff u_int8_t atu_mode;
169 1.1 joff #define NO_MODE_YET 0
170 1.1 joff #define AD_HOC_MODE 1
171 1.1 joff #define INFRASTRUCTURE_MODE 2
172 1.1 joff
173 1.1 joff u_int8_t atu_radio_on;
174 1.1 joff u_int8_t atu_encrypt;
175 1.1 joff #define ATU_WEP_RX 0x01
176 1.1 joff #define ATU_WEP_TX 0x02
177 1.1 joff #define ATU_WEP_TXRX (ATU_WEP_RX | ATU_WEP_TX)
178 1.1 joff int atu_wepkey;
179 1.1 joff int atu_wepkeylen;
180 1.1 joff u_int8_t atu_wepkeys[4][13];
181 1.1 joff };
182 1.1 joff
183 1.1 joff /* Commands for uploading the firmware (standard DFU interface) */
184 1.1 joff #define DFU_DNLOAD UT_WRITE_CLASS_INTERFACE, 0x01
185 1.1 joff #define DFU_GETSTATUS UT_READ_CLASS_INTERFACE, 0x03
186 1.1 joff #define DFU_GETSTATE UT_READ_CLASS_INTERFACE, 0x05
187 1.1 joff #define DFU_REMAP UT_WRITE_VENDOR_INTERFACE, 0x0a
188 1.1 joff
189 1.1 joff /* DFU states */
190 1.1 joff #define DFUState_AppIdle 0
191 1.1 joff #define DFUState_AppDetach 1
192 1.1 joff #define DFUState_DFUIdle 2
193 1.1 joff #define DFUState_DnLoadSync 3
194 1.1 joff #define DFUState_DnLoadBusy 4
195 1.1 joff #define DFUState_DnLoadIdle 5
196 1.1 joff #define DFUState_ManifestSync 6
197 1.1 joff #define DFUState_Manifest 7
198 1.1 joff #define DFUState_ManifestWait 8
199 1.1 joff #define DFUState_UploadIdle 9
200 1.1 joff #define DFUState_DFUError 10
201 1.1 joff
202 1.1 joff #define DFU_MaxBlockSize 1024
203 1.1 joff
204 1.1 joff /* AT76c503 operating modes */
205 1.1 joff #define MODE_NONE 0x00
206 1.1 joff #define MODE_NETCARD 0x01
207 1.1 joff #define MODE_CONFIG 0x02
208 1.1 joff #define MODE_DFU 0x03
209 1.1 joff #define MODE_NOFLASHNETCARD 0x04
210 1.1 joff
211 1.1 joff /* AT76c503 commands */
212 1.1 joff #define CMD_SET_MIB 0x01
213 1.1 joff #define CMD_START_SCAN 0x03
214 1.1 joff #define CMD_JOIN 0x04
215 1.1 joff #define CMD_START_IBSS 0x05
216 1.1 joff #define CMD_RADIO 0x06
217 1.1 joff #define CMD_RADIO_ON 0x06
218 1.1 joff #define CMD_RADIO_OFF 0x07
219 1.1 joff #define CMD_STARTUP 0x0b
220 1.1 joff
221 1.1 joff /* AT76c503 status messages - used in atu_wait_completion */
222 1.1 joff #define STATUS_IDLE 0x00
223 1.1 joff #define STATUS_COMPLETE 0x01
224 1.1 joff #define STATUS_UNKNOWN 0x02
225 1.1 joff #define STATUS_INVALID_PARAMETER 0x03
226 1.1 joff #define STATUS_FUNCTION_NOT_SUPPORTED 0x04
227 1.1 joff #define STATUS_TIME_OUT 0x07
228 1.1 joff #define STATUS_IN_PROGRESS 0x08
229 1.1 joff #define STATUS_HOST_FAILURE 0xff
230 1.1 joff #define STATUS_SCAN_FAILED 0xf0
231 1.1 joff
232 1.1 joff /* AT76c503 command header */
233 1.1 joff struct atu_cmd {
234 1.1 joff uByte Cmd;
235 1.1 joff uByte Reserved;
236 1.1 joff uWord Size;
237 1.1 joff } UPACKED;
238 1.1 joff
239 1.1 joff /* CMD_SET_MIB command (0x01) */
240 1.1 joff struct atu_cmd_set_mib {
241 1.1 joff /* AT76c503 command header */
242 1.1 joff uByte AtCmd;
243 1.1 joff uByte AtReserved;
244 1.1 joff uWord AtSize;
245 1.1 joff
246 1.1 joff /* MIB header */
247 1.1 joff uByte MIBType;
248 1.1 joff uByte MIBSize;
249 1.1 joff uByte MIBIndex;
250 1.1 joff uByte MIBReserved;
251 1.1 joff
252 1.1 joff /* MIB data */
253 1.1 joff uByte data[72];
254 1.1 joff } UPACKED;
255 1.1 joff
256 1.1 joff /* CMD_STARTUP command (0x0b) */
257 1.1 joff struct atu_cmd_card_config {
258 1.1 joff uByte Cmd;
259 1.1 joff uByte Reserved;
260 1.1 joff uWord Size;
261 1.1 joff
262 1.1 joff uByte ExcludeUnencrypted;
263 1.1 joff uByte PromiscuousMode;
264 1.1 joff uByte ShortRetryLimit;
265 1.1 joff uByte EncryptionType;
266 1.1 joff uWord RTS_Threshold;
267 1.1 joff uWord FragThreshold; /* 256 .. 2346 */
268 1.1 joff uByte BasicRateSet[4];
269 1.1 joff uByte AutoRateFallback;
270 1.1 joff uByte Channel;
271 1.1 joff uByte PrivacyInvoked; /* wep */
272 1.1 joff uByte WEP_DefaultKeyID; /* 0 .. 3 */
273 1.1 joff uByte SSID[MAX_SSID_LEN];
274 1.1 joff uByte WEP_DefaultKey[4][13];
275 1.1 joff uByte SSID_Len;
276 1.1 joff uByte ShortPreamble;
277 1.1 joff uWord BeaconPeriod;
278 1.1 joff } UPACKED;
279 1.1 joff
280 1.1 joff /* CMD_SCAN command (0x03) */
281 1.1 joff struct atu_cmd_do_scan {
282 1.1 joff uByte Cmd;
283 1.1 joff uByte Reserved;
284 1.1 joff uWord Size;
285 1.1 joff
286 1.1 joff uByte BSSID[ETHER_ADDR_LEN];
287 1.1 joff uByte SSID[MAX_SSID_LEN];
288 1.1 joff uByte ScanType;
289 1.1 joff uByte Channel;
290 1.1 joff uWord ProbeDelay;
291 1.1 joff uWord MinChannelTime;
292 1.1 joff uWord MaxChannelTime;
293 1.1 joff uByte SSID_Len;
294 1.1 joff uByte InternationalScan;
295 1.1 joff } UPACKED;
296 1.1 joff
297 1.1 joff #define ATU_SCAN_ACTIVE 0x00
298 1.1 joff #define ATU_SCAN_PASSIVE 0x01
299 1.1 joff
300 1.1 joff /* CMD_JOIN command (0x04) */
301 1.1 joff struct atu_cmd_join {
302 1.1 joff uByte Cmd;
303 1.1 joff uByte Reserved;
304 1.1 joff uWord Size;
305 1.1 joff
306 1.1 joff uByte bssid[ETHER_ADDR_LEN];
307 1.1 joff uByte essid[32];
308 1.1 joff uByte bss_type;
309 1.1 joff uByte channel;
310 1.1 joff uWord timeout;
311 1.1 joff uByte essid_size;
312 1.1 joff uByte reserved;
313 1.1 joff } UPACKED;
314 1.1 joff
315 1.1 joff /* CMD_START_IBSS (0x05) */
316 1.1 joff struct atu_cmd_start_ibss {
317 1.1 joff uByte Cmd;
318 1.1 joff uByte Reserved;
319 1.1 joff uWord Size;
320 1.1 joff
321 1.1 joff uByte BSSID[ETHER_ADDR_LEN];
322 1.1 joff uByte SSID[32];
323 1.1 joff uByte BSSType;
324 1.1 joff uByte Channel;
325 1.1 joff uByte SSIDSize;
326 1.1 joff uByte Res[3];
327 1.1 joff } UPACKED;
328 1.1 joff
329 1.1 joff /*
330 1.1 joff * The At76c503 adapters come with different types of radios on them.
331 1.1 joff * At this moment the driver supports adapters with RFMD and Intersil radios.
332 1.1 joff */
333 1.1 joff
334 1.1 joff /* The config structure of an RFMD radio */
335 1.1 joff struct atu_rfmd_conf {
336 1.1 joff u_int8_t CR20[14];
337 1.1 joff u_int8_t CR21[14];
338 1.1 joff u_int8_t BB_CR[14];
339 1.1 joff u_int8_t PidVid[4];
340 1.1 joff u_int8_t MACAddr[ETHER_ADDR_LEN];
341 1.1 joff u_int8_t RegulatoryDomain;
342 1.1 joff u_int8_t LowPowerValues[14];
343 1.1 joff u_int8_t NormalPowerValues[14];
344 1.1 joff u_int8_t Reserved[3];
345 1.1 joff /* then we have 84 bytes, somehow Windows reads 95?? */
346 1.1 joff u_int8_t Rest[11];
347 1.1 joff } UPACKED;
348 1.1 joff
349 1.1 joff /* The config structure of an Intersil radio */
350 1.1 joff struct atu_intersil_conf {
351 1.1 joff u_int8_t MACAddr[ETHER_ADDR_LEN];
352 1.1 joff /* From the HFA3861B manual : */
353 1.1 joff /* Manual TX power control (7bit : -64 to 63) */
354 1.1 joff u_int8_t CR31[14];
355 1.1 joff /* TX power measurement */
356 1.1 joff u_int8_t CR58[14];
357 1.1 joff u_int8_t PidVid[4];
358 1.1 joff u_int8_t RegulatoryDomain;
359 1.1 joff u_int8_t Reserved[1];
360 1.1 joff } UPACKED;
361 1.1 joff
362 1.1 joff
363 1.1 joff /* Firmware information request */
364 1.1 joff struct atu_fw {
365 1.1 joff u_int8_t major;
366 1.1 joff u_int8_t minor;
367 1.1 joff u_int8_t patch;
368 1.1 joff u_int8_t build;
369 1.1 joff } UPACKED;
370 1.1 joff
371 1.1 joff /*
372 1.1 joff * The header the AT76c503 puts in front of RX packets (for both managment &
373 1.1 joff * data)
374 1.1 joff */
375 1.1 joff struct atu_rx_hdr {
376 1.1 joff uWord length;
377 1.1 joff uByte rx_rate;
378 1.1 joff uByte newbss;
379 1.1 joff uByte fragmentation;
380 1.1 joff uByte rssi;
381 1.1 joff uByte link_quality;
382 1.1 joff uByte noise_level;
383 1.1 joff uDWord rx_time;
384 1.1 joff } UPACKED;
385 1.1 joff #define ATU_RX_HDRLEN sizeof(struct atu_rx_hdr)
386 1.1 joff
387 1.1 joff /*
388 1.1 joff * The header we have to put in front of a TX packet before sending it to the
389 1.1 joff * AT76c503
390 1.1 joff */
391 1.1 joff struct atu_tx_hdr {
392 1.1 joff uWord length;
393 1.1 joff uByte tx_rate;
394 1.1 joff uByte padding;
395 1.1 joff uByte reserved[4];
396 1.1 joff } UPACKED;
397 1.1 joff #define ATU_TX_HDRLEN sizeof(struct atu_tx_hdr)
398 1.1 joff
399 1.1 joff #define NR(x) (void *)((long)x)
400 1.1 joff
401 1.1 joff /*
402 1.1 joff * The linux driver uses seperate routines for every mib request they do
403 1.1 joff * (eg. set_radio / set_preamble / set_frag / etc etc )
404 1.1 joff * We just define a list of types, sizes and offsets and use those
405 1.1 joff */
406 1.1 joff
407 1.1 joff /* Name Type Size Index */
408 1.1 joff #define MIB_LOCAL 0x01
409 1.1 joff #define MIB_LOCAL__BEACON_ENABLE MIB_LOCAL, 1, 2
410 1.1 joff #define MIB_LOCAL__AUTO_RATE_FALLBACK MIB_LOCAL, 1, 3
411 1.1 joff #define MIB_LOCAL__SSID_SIZE MIB_LOCAL, 1, 5
412 1.1 joff #define MIB_LOCAL__PREAMBLE MIB_LOCAL, 1, 9
413 1.1 joff #define MIB_MAC_ADDR 0x02
414 1.1 joff #define MIB_MAC_ADDR__ADDR MIB_MAC_ADDR, 6, 0
415 1.1 joff #define MIB_MAC 0x03
416 1.1 joff #define MIB_MAC__FRAG MIB_MAC, 2, 8
417 1.1 joff #define MIB_MAC__RTS MIB_MAC, 2, 10
418 1.1 joff #define MIB_MAC__DESIRED_SSID MIB_MAC, 32, 28
419 1.1 joff #define MIB_MAC_MGMT 0x05
420 1.1 joff #define MIB_MAC_MGMT__BEACON_PERIOD MIB_MAC_MGMT, 2, 0
421 1.1 joff #define MIB_MAC_MGMT__CURRENT_BSSID MIB_MAC_MGMT, 6, 14
422 1.1 joff #define MIB_MAC_MGMT__CURRENT_ESSID MIB_MAC_MGMT, 32, 20
423 1.1 joff #define MIB_MAC_MGMT__POWER_MODE MIB_MAC_MGMT, 1, 53
424 1.1 joff #define MIB_MAC_MGMT__IBSS_CHANGE MIB_MAC_MGMT, 1, 54
425 1.1 joff #define MIB_MAC_WEP 0x06
426 1.1 joff #define MIB_MAC_WEP__PRIVACY_INVOKED MIB_MAC_WEP, 1, 0
427 1.1 joff #define MIB_MAC_WEP__KEY_ID MIB_MAC_WEP, 1, 1
428 1.1 joff #define MIB_MAC_WEP__ICV_ERROR_COUNT MIB_MAC_WEP, 4, 4
429 1.1 joff #define MIB_MAC_WEP__EXCLUDED_COUNT MIB_MAC_WEP, 4, 8
430 1.1 joff #define MIB_MAC_WEP__KEYS(nr) MIB_MAC_WEP, 13, 12+(nr)*13
431 1.1 joff #define MIB_MAC_WEP__ENCR_LEVEL MIB_MAC_WEP, 1, 64
432 1.1 joff #define MIB_PHY 0x07
433 1.1 joff #define MIB_PHY__CHANNEL MIB_PHY, 1, 20
434 1.1 joff #define MIB_PHY__REG_DOMAIN MIB_PHY, 1, 23
435 1.1 joff #define MIB_FW_VERSION 0x08
436 1.1 joff #define MIB_DOMAIN 0x09
437 1.1 joff #define MIB_DOMAIN__POWER_LEVELS MIB_DOMAIN, 14, 0
438 1.1 joff #define MIB_DOMAIN__CHANNELS MIB_DOMAIN, 14, 14
439 1.1 joff
440 1.1 joff #define ATU_WEP_OFF 0
441 1.1 joff #define ATU_WEP_40BITS 1
442 1.1 joff #define ATU_WEP_104BITS 2
443 1.1 joff
444 1.1 joff #define POWER_MODE_ACTIVE 1
445 1.1 joff #define POWER_MODE_SAVE 2
446 1.1 joff #define POWER_MODE_SMART 3
447 1.1 joff
448 1.1 joff #define PREAMBLE_SHORT 1
449 1.1 joff #define PREAMBLE_LONG 0
450