3 * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the author nor the names of any co-contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY DUNCAN BARCLAY AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL DUNCAN BARCLAY OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * Bit mask definitions for firmware versioning
44 struct ray_mib_common_head { /*Offset*/ /*Size*/
45 u_int8_t mib_net_type; /*00*/
46 u_int8_t mib_ap_status; /*01*/
47 u_int8_t mib_ssid[IEEE80211_NWID_LEN]; /*02*/ /*20*/
48 u_int8_t mib_scan_mode; /*22*/
49 u_int8_t mib_apm_mode; /*23*/
50 u_int8_t mib_mac_addr[ETHER_ADDR_LEN]; /*24*/ /*06*/
51 u_int8_t mib_frag_thresh[2]; /*2a*/ /*02*/
52 u_int8_t mib_dwell_time[2]; /*2c*/ /*02*/
53 u_int8_t mib_beacon_period[2]; /*2e*/ /*02*/
54 u_int8_t mib_dtim_interval; /*30*/
55 u_int8_t mib_max_retry; /*31*/
56 u_int8_t mib_ack_timo; /*32*/
57 u_int8_t mib_sifs; /*33*/
58 u_int8_t mib_difs; /*34*/
59 u_int8_t mib_pifs; /*35*/
60 u_int8_t mib_rts_thresh[2]; /*36*/ /*02*/
61 u_int8_t mib_scan_dwell[2]; /*38*/ /*02*/
62 u_int8_t mib_scan_max_dwell[2]; /*3a*/ /*02*/
63 u_int8_t mib_assoc_timo; /*3c*/
64 u_int8_t mib_adhoc_scan_cycle; /*3d*/
65 u_int8_t mib_infra_scan_cycle; /*3e*/
66 u_int8_t mib_infra_super_scan_cycle; /*3f*/
67 u_int8_t mib_promisc; /*40*/
68 u_int8_t mib_uniq_word[2]; /*41*/ /*02*/
69 u_int8_t mib_slot_time; /*43*/
70 u_int8_t mib_roam_low_snr_thresh; /*44*/
71 u_int8_t mib_low_snr_count; /*45*/
72 u_int8_t mib_infra_missed_beacon_count; /*46*/
73 u_int8_t mib_adhoc_missed_beacon_count; /*47*/
74 u_int8_t mib_country_code; /*48*/
75 u_int8_t mib_hop_seq; /*49*/
76 u_int8_t mib_hop_seq_len; /*4a*/
79 struct ray_mib_common_tail {
80 u_int8_t mib_noise_filter_gain; /*00*/
81 u_int8_t mib_noise_limit_offset; /*01*/
82 u_int8_t mib_rssi_thresh_offset; /*02*/
83 u_int8_t mib_busy_thresh_offset; /*03*/
84 u_int8_t mib_sync_thresh; /*04*/
85 u_int8_t mib_test_mode; /*05*/
86 u_int8_t mib_test_min_chan; /*06*/
87 u_int8_t mib_test_max_chan; /*07*/
91 struct ray_mib_common_head mib_head; /*00*/
92 u_int8_t mib_cw_max; /*4b*/
93 u_int8_t mib_cw_min; /*4c*/
94 struct ray_mib_common_tail mib_tail; /*4d*/
98 struct ray_mib_common_head mib_head; /*00*/
99 u_int8_t mib_cw_max[2]; /*4b*/ /*02*/
100 u_int8_t mib_cw_min[2]; /*4d*/ /*02*/
101 struct ray_mib_common_tail mib_tail; /*4f*/
102 u_int8_t mib_allow_probe_resp; /*57*/
103 u_int8_t mib_privacy_must_start; /*58*/
104 u_int8_t mib_privacy_can_join; /*59*/
105 u_int8_t mib_basic_rate_set[8]; /*5a*/ /*08*/
108 #define mib_net_type mib_head.mib_net_type
109 #define mib_ap_status mib_head.mib_ap_status
110 #define mib_ssid mib_head.mib_ssid
111 #define mib_scan_mode mib_head.mib_scan_mode
112 #define mib_apm_mode mib_head.mib_apm_mode
113 #define mib_mac_addr mib_head.mib_mac_addr
114 #define mib_frag_thresh mib_head.mib_frag_thresh
115 #define mib_dwell_time mib_head.mib_dwell_time
116 #define mib_beacon_period mib_head.mib_beacon_period
117 #define mib_dtim_interval mib_head.mib_dtim_interval
118 #define mib_max_retry mib_head.mib_max_retry
119 #define mib_ack_timo mib_head.mib_ack_timo
120 #define mib_sifs mib_head.mib_sifs
121 #define mib_difs mib_head.mib_difs
122 #define mib_pifs mib_head.mib_pifs
123 #define mib_rts_thresh mib_head.mib_rts_thresh
124 #define mib_scan_dwell mib_head.mib_scan_dwell
125 #define mib_scan_max_dwell mib_head.mib_scan_max_dwell
126 #define mib_assoc_timo mib_head.mib_assoc_timo
127 #define mib_adhoc_scan_cycle mib_head.mib_adhoc_scan_cycle
128 #define mib_infra_scan_cycle mib_head.mib_infra_scan_cycle
129 #define mib_infra_super_scan_cycle \
130 mib_head.mib_infra_super_scan_cycle
131 #define mib_promisc mib_head.mib_promisc
132 #define mib_uniq_word mib_head.mib_uniq_word
133 #define mib_slot_time mib_head.mib_slot_time
134 #define mib_roam_low_snr_thresh mib_head.mib_roam_low_snr_thresh
135 #define mib_low_snr_count mib_head.mib_low_snr_count
136 #define mib_infra_missed_beacon_count \
137 mib_head.mib_infra_missed_beacon_count
138 #define mib_adhoc_missed_beacon_count \
139 mib_head.mib_adhoc_missed_beacon_count
140 #define mib_country_code mib_head.mib_country_code
141 #define mib_hop_seq mib_head.mib_hop_seq
142 #define mib_hop_seq_len mib_head.mib_hop_seq_len
144 #define mib_noise_filter_gain mib_tail.mib_noise_filter_gain
145 #define mib_noise_limit_offset mib_tail.mib_noise_limit_offset
146 #define mib_rssi_thresh_offset mib_tail.mib_rssi_thresh_offset
147 #define mib_busy_thresh_offset mib_tail.mib_busy_thresh_offset
148 #define mib_sync_thresh mib_tail.mib_sync_thresh
149 #define mib_test_mode mib_tail.mib_test_mode
150 #define mib_test_min_chan mib_tail.mib_test_min_chan
151 #define mib_test_max_chan mib_tail.mib_test_max_chan
154 * MIB IDs for the update/report param commands
156 #define RAY_MIB_NET_TYPE 0
157 #define RAY_MIB_AP_STATUS 1
158 #define RAY_MIB_SSID 2
159 #define RAY_MIB_SCAN_MODE 3
160 #define RAY_MIB_APM_MODE 4
161 #define RAY_MIB_MAC_ADDR 5
162 #define RAY_MIB_FRAG_THRESH 6
163 #define RAY_MIB_DWELL_TIME 7
164 #define RAY_MIB_BEACON_PERIOD 8
165 #define RAY_MIB_DTIM_INTERVAL 9
166 #define RAY_MIB_MAX_RETRY 10
167 #define RAY_MIB_ACK_TIMO 11
168 #define RAY_MIB_SIFS 12
169 #define RAY_MIB_DIFS 13
170 #define RAY_MIB_PIFS 14
171 #define RAY_MIB_RTS_THRESH 15
172 #define RAY_MIB_SCAN_DWELL 16
173 #define RAY_MIB_SCAN_MAX_DWELL 17
174 #define RAY_MIB_ASSOC_TIMO 18
175 #define RAY_MIB_ADHOC_SCAN_CYCLE 19
176 #define RAY_MIB_INFRA_SCAN_CYCLE 20
177 #define RAY_MIB_INFRA_SUPER_SCAN_CYCLE 21
178 #define RAY_MIB_PROMISC 22
179 #define RAY_MIB_UNIQ_WORD 23
180 #define RAY_MIB_SLOT_TIME 24
181 #define RAY_MIB_ROAM_LOW_SNR_THRESH 25
182 #define RAY_MIB_LOW_SNR_COUNT 26
183 #define RAY_MIB_INFRA_MISSED_BEACON_COUNT 27
184 #define RAY_MIB_ADHOC_MISSED_BEACON_COUNT 28
185 #define RAY_MIB_COUNTRY_CODE 29
186 #define RAY_MIB_HOP_SEQ 30
187 #define RAY_MIB_HOP_SEQ_LEN 31
188 #define RAY_MIB_CW_MAX 32
189 #define RAY_MIB_CW_MIN 33
190 #define RAY_MIB_NOISE_FILTER_GAIN 34
191 #define RAY_MIB_NOISE_LIMIT_OFFSET 35
192 #define RAY_MIB_RSSI_THRESH_OFFSET 36
193 #define RAY_MIB_BUSY_THRESH_OFFSET 37
194 #define RAY_MIB_SYNC_THRESH 38
195 #define RAY_MIB_TEST_MODE 39
196 #define RAY_MIB_TEST_MIN_CHAN 40
197 #define RAY_MIB_TEST_MAX_CHAN 41
198 #define RAY_MIB_ALLOW_PROBE_RESP 42
199 #define RAY_MIB_PRIVACY_MUST_START 43
200 #define RAY_MIB_PRIVACY_CAN_JOIN 44
201 #define RAY_MIB_BASIC_RATE_SET 45
202 #define RAY_MIB_VERSION 46
203 #define RAY_MIB_CUR_BSSID 47
204 #define RAY_MIB_CUR_INITED 48
205 #define RAY_MIB_CUR_DEF_TXRATE 49
206 #define RAY_MIB_CUR_ENCRYPT 50
207 #define RAY_MIB_CUR_NET_TYPE 51
208 #define RAY_MIB_CUR_SSID 52
209 #define RAY_MIB_CUR_PRIV_START 53
210 #define RAY_MIB_CUR_PRIV_JOIN 54
211 #define RAY_MIB_DES_BSSID 55
212 #define RAY_MIB_DES_INITED 56
213 #define RAY_MIB_DES_DEF_TXRATE 57
214 #define RAY_MIB_DES_ENCRYPT 58
215 #define RAY_MIB_DES_NET_TYPE 59
216 #define RAY_MIB_DES_SSID 60
217 #define RAY_MIB_DES_PRIV_START 61
218 #define RAY_MIB_DES_PRIV_JOIN 62
219 #define RAY_MIB_CUR_AP_STATUS 63
220 #define RAY_MIB_CUR_PROMISC 64
221 #define RAY_MIB_DES_AP_STATUS 65
222 #define RAY_MIB_DES_PROMISC 66
223 #define RAY_MIB_CUR_FRAMING 67
224 #define RAY_MIB_DES_FRAMING 68
226 #define RAY_MIB_LASTUSER 45
227 #define RAY_MIB_MAX 68
230 * Strings for the MIB
232 #define RAY_MIB_STRINGS { \
239 "Fragmentation threshold", \
252 "ADHOC_SCAN_CYCLE", \
253 "INFRA_SCAN_CYCLE", \
254 "INFRA_SUPER_SCAN_CYCLE", \
258 "ROAM_LOW_SNR_THRESH", \
260 "INFRA_MISSED_BEACON_COUNT", \
261 "ADHOC_MISSED_BEACON_COUNT", \
267 "NOISE_FILTER_GAIN", \
268 "NOISE_LIMIT_OFFSET", \
269 "RSSI_THRESH_OFFSET", \
270 "BUSY_THRESH_OFFSET", \
275 "ALLOW_PROBE_RESP", \
276 "PRIVACY_MUST_START", \
277 "PRIVACY_CAN_JOIN", \
279 "Firmware version", \
282 "Current DEF_TXRATE", \
284 "Current NET_TYPE", \
286 "Current PRIV_START", \
287 "Current PRIV_JOIN", \
290 "Desired DEF_TXRATE", \
292 "Desired NET_TYPE", \
294 "Desired PRIV_START", \
295 "Desired PRIV_JOIN", \
296 "Current AP_STATUS", \
298 "Desired AP_STATUS", \
304 #define RAY_MIB_HELP_STRINGS { \
305 "0 Ad hoc, 1 Infrastructure", \
306 "0 Station, 1 Access Point", \
308 "0 Passive, 1 Active", \
324 "ADHOC_SCAN_CYCLE", \
325 "INFRA_SCAN_CYCLE", \
326 "INFRA_SUPER_SCAN_CYCLE", \
330 "ROAM_LOW_SNR_THRESH", \
332 "INFRA_MISSED_BEACON_COUNT", \
333 "ADHOC_MISSED_BEACON_COUNT", \
339 "NOISE_FILTER_GAIN", \
340 "NOISE_LIMIT_OFFSET", \
341 "RSSI_THRESH_OFFSET", \
342 "BUSY_THRESH_OFFSET", \
347 "ALLOW_PROBE_RESP", \
348 "PRIVACY_MUST_START", \
349 "PRIVACY_CAN_JOIN", \
353 "0 Joined a net, 1 Created a net", \
354 "Current DEF_TXRATE", \
356 "Current NET_TYPE", \
358 "Current PRIV_START", \
359 "Current PRIV_JOIN", \
362 "Desired DEF_TXRATE", \
364 "Desired NET_TYPE", \
366 "Desired PRIV_START", \
367 "Desired PRIV_JOIN", \
368 "Current AP_STATUS", \
370 "Desired AP_STATUS", \
377 * Applicable versions and work size for each MIB element
379 #define RAY_MIB_INFO_SIZ4 1
380 #define RAY_MIB_INFO_SIZ5 2
381 #define RAY_MIB_SIZE(info, mib, version) \
382 info[(mib)][(version & RAY_V4)?RAY_MIB_INFO_SIZ4:RAY_MIB_INFO_SIZ5]
383 #define RAY_MIB_INFO { \
384 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_NET_TYPE */ \
385 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_AP_STATUS */ \
386 {RAY_V4|RAY_V5, IEEE80211_NWID_LEN, \
387 IEEE80211_NWID_LEN},/* RAY_MIB_SSID */ \
388 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_SCAN_MODE */ \
389 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_APM_MODE */ \
390 {RAY_V4|RAY_V5, ETHER_ADDR_LEN, \
391 ETHER_ADDR_LEN},/* RAY_MIB_MAC_ADDR */ \
392 {RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_FRAG_THRESH */ \
393 {RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_DWELL_TIME */ \
394 {RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_BEACON_PERIOD */ \
395 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DTIM_INTERVAL */ \
396 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_MAX_RETRY */ \
397 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ACK_TIMO */ \
398 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_SIFS */ \
399 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DIFS */ \
400 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_PIFS */ \
401 {RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_RTS_THRESH */ \
402 {RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_SCAN_DWELL */ \
403 {RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_SCAN_MAX_DWELL */ \
404 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ASSOC_TIMO */ \
405 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ADHOC_SCAN_CYCLE */ \
406 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_INFRA_SCAN_CYCLE */ \
407 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_INFRA_SUPER_SCAN_CYCLE */ \
408 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_PROMISC */ \
409 {RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_UNIQ_WORD */ \
410 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_SLOT_TIME */ \
411 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ROAM_LOW_SNR_THRESH */ \
412 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_LOW_SNR_COUNT */ \
413 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_INFRA_MISSED_BEACON_COUNT */ \
414 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ADHOC_MISSED_BEACON_COUNT */ \
415 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_COUNTRY_CODE */ \
416 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_HOP_SEQ */ \
417 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_HOP_SEQ_LEN */ \
418 {RAY_V4|RAY_V5, 1, 2}, /* RAY_MIB_CW_MAX */ \
419 {RAY_V4|RAY_V5, 1, 2}, /* RAY_MIB_CW_MIN */ \
420 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_NOISE_FILTER_GAIN */ \
421 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_NOISE_LIMIT_OFFSET */ \
422 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_RSSI_THRESH_OFFSET */ \
423 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_BUSY_THRESH_OFFSET */ \
424 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_SYNC_THRESH */ \
425 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_TEST_MODE */ \
426 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_TEST_MIN_CHAN */ \
427 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_TEST_MAX_CHAN */ \
428 { RAY_V5, 0, 1}, /* RAY_MIB_ALLOW_PROBE_RESP */ \
429 { RAY_V5, 0, 1}, /* RAY_MIB_PRIVACY_MUST_START */ \
430 { RAY_V5, 0, 1}, /* RAY_MIB_PRIVACY_CAN_JOIN */ \
431 { RAY_V5, 0, 8}, /* RAY_MIB_BASIC_RATE_SET */ \
432 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_VERSION */ \
433 {RAY_V4|RAY_V5, ETHER_ADDR_LEN, \
434 ETHER_ADDR_LEN},/* RAY_MIB_CUR_BSSID */ \
435 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_INITED */ \
436 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_DEF_TXRATE */ \
437 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_ENCRYPT */ \
438 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_NET_TYPE */ \
439 {RAY_V4|RAY_V5, IEEE80211_NWID_LEN, \
440 IEEE80211_NWID_LEN}, /* RAY_MIB_CUR_SSID */ \
441 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_PRIV_START */ \
442 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_PRIV_JOIN */ \
443 {RAY_V4|RAY_V5, ETHER_ADDR_LEN, \
444 ETHER_ADDR_LEN},/* RAY_MIB_DES_BSSID */ \
445 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_INITED */ \
446 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_DEF_TXRATE */ \
447 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_ENCRYPT */ \
448 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_NET_TYPE */ \
449 {RAY_V4|RAY_V5, IEEE80211_NWID_LEN, \
450 IEEE80211_NWID_LEN}, /* RAY_MIB_DES_SSID */ \
451 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_PRIV_START */ \
452 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_PRIV_JOIN */ \
453 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_AP_STATUS */ \
454 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_PROMISC */ \
455 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_AP_STATUS */ \
456 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_PROMISC */ \
457 {RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_FRAMING */ \
458 {RAY_V4|RAY_V5, 1, 1} /* RAY_MIB_DES_FRAMING */ \
464 * I've included comments as to where the numbers have originated
467 * Linux refers to ray_cs.c and rayctl.h from version 167 of the
468 * Linux Raylink driver.
470 * NetBSD refers to if_ray.c from version 1.12 of the NetBSD Raylink
473 * Symb refers to numbers cleaned from the 802.11 specification,
474 * discussion with 802.11 knowledgable people at Symbionics or
475 * stuff needed by me (i.e. me, * aps, ifo, hjl).
477 * V4 and V5 refer to settings for version 4 and version 5 of
481 * Combined Interface Requirements Specification
482 * and Interface Design Document (IRS/IDD)
484 * WLAN System Interfaces Between the
485 * HOST COMPUTER and the
486 * PCMCIA WLAN INTERFACE CARD
491 /* Obtained by raycontrol _before_ downloading
495 * # raycontrol -i ray0
497 * Network type 0x01 0 Ad hoc, 1 Infrastructure
498 * AP status 0x00 0 Station, 1 Access Point
500 * Scan mode 0x01 0 Passive, 1 Active
501 * APM mode 0x00 0 Off, 1 On
502 * MAC address 00:00:8f:48:e4:44
503 * Fragmentation threshold 0x0200 FRAG_THRESH
504 * Dwell tIME 0x01 DWELL_TIME
505 * Beacon period 0x01 BEACON_PERIOD
506 * DTIM_INTERVAL 0x05 DTIM_INTERVAL
507 * MAX_RETRY 0x03 MAX_RETRY
508 * ACK_TIMO 0x8c ACK_TIMO
512 * RTS_THRESH 0x0100 RTS_THRESH
513 * SCAN_DWELL 0xfc18 SCAN_DWELL
514 * SCAN_MAX_DWELL 0xc180 SCAN_MAX_DWELL
515 * ASSOC_TIMO 0x05 ASSOC_TIMO
516 * ADHOC_SCAN_CYCLE 0x04 ADHOC_SCAN_CYCLE
517 * INFRA_SCAN_CYCLE 0x02 INFRA_SCAN_CYCLE
518 * INFRA_SUPER_SCAN_CYCLE 0x04 INFRA_SUPER_SCAN_CYCLE
519 * PROMISC 0x00 PROMISC
520 * UNIQ_WORD 0x0cbd UNIQ_WORD
521 * SLOT_TIME 0x4e SLOT_TIME
522 * ROAM_LOW_SNR_THRESH 0x20 ROAM_LOW_SNR_THRESH
523 * LOW_SNR_COUNT 0x04 LOW_SNR_COUNT
524 * INFRA_MISSED_BEACON_COUNT 0x04 INFRA_MISSED_BEACON_COUNT
525 * ADHOC_MISSED_BEACON_COUNT 0x04 ADHOC_MISSED_BEACON_COUNT
526 * COUNTRY_CODE 0x01 COUNTRY_CODE
527 * HOP_SEQ 0x07 HOP_SEQ
528 * HOP_SEQ_LEN 0x4e HOP_SEQ_LEN
531 * NOISE_FILTER_GAIN 0x00 NOISE_FILTER_GAIN
532 * NOISE_LIMIT_OFFSET 0x00 NOISE_LIMIT_OFFSET
533 * RSSI_THRESH_OFFSET 0x70 RSSI_THRESH_OFFSET
534 * BUSY_THRESH_OFFSET 0x70 BUSY_THRESH_OFFSET
535 * SYNC_THRESH 0x07 SYNC_THRESH
536 * TEST_MODE 0x00 TEST_MODE
537 * TEST_MIN_CHAN 0x02 TEST_MIN_CHAN
538 * TEST_MAX_CHAN 0x02 TEST_MAX_CHAN
542 * Network type 0x01 0 Ad hoc, 1 Infrastructure
543 * AP status 0x00 0 Station, 1 Access Point
545 * Scan mode 0x01 0 Passive, 1 Active
546 * APM mode 0x00 0 Off, 1 On
547 * MAC address 00:00:8f:a8:17:06
548 * Fragmentation threshold 0x7fff Bytes
549 * Dwell time 0x0080 DWELL_TIME
550 * Beacon period 0x0100 BEACON_PERIOD
551 * DTIM_INTERVAL 0x01 DTIM_INTERVAL
552 * MAX_RETRY 0x1f MAX_RETRY
553 * ACK_TIMO 0x86 ACK_TIMO
557 * RTS_THRESH 0x7fff RTS_THRESH
558 * SCAN_DWELL 0x04e2 SCAN_DWELL
559 * SCAN_MAX_DWELL 0x38a4 SCAN_MAX_DWELL
560 * ASSOC_TIMO 0x05 ASSOC_TIMO
561 * ADHOC_SCAN_CYCLE 0x08 ADHOC_SCAN_CYCLE
562 * INFRA_SCAN_CYCLE 0x02 INFRA_SCAN_CYCLE
563 * INFRA_SUPER_SCAN_CYCLE 0x08 INFRA_SUPER_SCAN_CYCLE
564 * PROMISC 0x00 PROMISC
565 * UNIQ_WORD 0x0cbd UNIQ_WORD
566 * SLOT_TIME 0x32 SLOT_TIME
567 * ROAM_LOW_SNR_THRESH 0xff ROAM_LOW_SNR_THRESH
568 * LOW_SNR_COUNT 0xff LOW_SNR_COUNT
569 * INFRA_MISSED_BEACON_COUNT 0x02 INFRA_MISSED_BEACON_COUNT
570 * ADHOC_MISSED_BEACON_COUNT 0xff ADHOC_MISSED_BEACON_COUNT
571 * COUNTRY_CODE 0x01 COUNTRY_CODE
572 * HOP_SEQ 0x0b HOP_SEQ
573 * HOP_SEQ_LEN 0x55 HOP_SEQ_LEN
574 * CW_MAX 0x003f CW_MAX
575 * CW_MIN 0x000f CW_MIN
576 * NOISE_FILTER_GAIN 0x04 NOISE_FILTER_GAIN
577 * NOISE_LIMIT_OFFSET 0x08 NOISE_LIMIT_OFFSET
578 * RSSI_THRESH_OFFSET 0x28 RSSI_THRESH_OFFSET
579 * BUSY_THRESH_OFFSET 0x28 BUSY_THRESH_OFFSET
580 * SYNC_THRESH 0x07 SYNC_THRESH
581 * TEST_MODE 0x00 TEST_MODE
582 * TEST_MIN_CHAN 0x02 TEST_MIN_CHAN
583 * TEST_MAX_CHAN 0x02 TEST_MAX_CHAN
584 * ALLOW_PROBE_RESP 0x00 ALLOW_PROBE_RESP
585 * PRIVACY_MUST_START 0x00 PRIVACY_MUST_START
586 * PRIVACY_CAN_JOIN 0x00 PRIVACY_CAN_JOIN
587 * BASIC_RATE_SET 0x02 BASIC_RATE_SET
593 * DOC 0x01 - Defines network type for Start and Join
594 * - Network commands.
596 * As the V4 cards don't do infra we have to use adhoc. For V5 cards
597 * we follow standard FreeBSD practise and use infrastructure mode.
599 #define RAY_MIB_NET_TYPE_ADHOC 0x00
600 #define RAY_MIB_NET_TYPE_INFRA 0x01
601 #define RAY_MIB_NET_TYPE_V4 RAY_MIB_NET_TYPE_ADHOC
602 #define RAY_MIB_NET_TYPE_V5 RAY_MIB_NET_TYPE_INFRA
607 * DOC 0x00 - Applicable only when Network Type is
610 #define RAY_MIB_AP_STATUS_TERMINAL 0x00
611 #define RAY_MIB_AP_STATUS_AP 0x01
612 #define RAY_MIB_AP_STATUS_V4 RAY_MIB_AP_STATUS_TERMINAL
613 #define RAY_MIB_AP_STATUS_V5 RAY_MIB_AP_STATUS_TERMINAL
618 * DOC ESSID1 - Service Set ID. Can be any ASCII string
619 * - up to 32 bytes in length. If the string is
620 * - less than 32 bytes long, it must be
621 * - followed by a byte of 00h.
623 * Symb - windows setting comes from the Aviator software v1.1
625 #define RAY_MIB_SSID_WINDOWS "NETWORK_NAME"
626 #define RAY_MIB_SSID_RAYLINK "ESSID1"
627 #define RAY_MIB_SSID_V4 RAY_MIB_SSID_WINDOWS
628 #define RAY_MIB_SSID_V5 RAY_MIB_SSID_RAYLINK
633 * DOC 0x01 - Defines acquisition approach for
634 * - terminals operating in either Ad Hoc or
635 * - Infrastructure Networks. N/A for APs.
637 #define RAY_MIB_SCAN_MODE_PASSIVE 0x00
638 #define RAY_MIB_SCAN_MODE_ACTIVE 0x01
639 #define RAY_MIB_SCAN_MODE_V4 RAY_MIB_SCAN_MODE_ACTIVE
640 #define RAY_MIB_SCAN_MODE_V5 RAY_MIB_SCAN_MODE_ACTIVE
645 * DOC 0x00 - Defines power management mode for
646 * - stations operating in either Ad Hoc or
647 * - Infrastructure Networks. Must always
650 #define RAY_MIB_APM_MODE_NONE 0x00
651 #define RAY_MIB_APM_MODE_POWERSAVE 0x01
652 #define RAY_MIB_APM_MODE_V4 RAY_MIB_APM_MODE_NONE
653 #define RAY_MIB_APM_MODE_V5 RAY_MIB_APM_MODE_NONE
658 * DOC - MAC Address to be used by WIC (For
659 * - format see Figure 3.2.4.1.2-1, MAC
660 * - Address Format). Host may echo card
661 * - supplied address or use locally
662 * - administered address.
668 * DOC 0x7fff - Maximum over-the-air packet size (in
671 * Symb 0xXXXX - you really should fragment when in low signal
672 * - conditions but getting it wrong
673 * crucifies the performance
675 #define RAY_MIB_FRAG_THRESH_MINIMUM 0
676 #define RAY_MIB_FRAG_THRESH_MAXIMUM 2346
677 #define RAY_MIB_FRAG_THRESH_DISABLE 0x7fff
678 #define RAY_MIB_FRAG_THRESH_V4 RAY_MIB_FRAG_THRESH_DISABLE
679 #define RAY_MIB_FRAG_THRESH_V5 RAY_MIB_FRAG_THRESH_DISABLE
684 * DOC 0x0080 - Defines hop dwell time in Kusec.
685 * - Required only of stations which intend
686 * - to issue a Start Network command.
687 * - Forward Compatible Firmware (Build
688 * - 5) requires that the dwell time be one of
689 * - the set 16, 32, 64, 128, and 256.
691 * Linux.h - 16k * 2**n, n=0-4 in Kus
693 * Linux.c-V5 0x0080 - 128 Kus
694 * NetBSD-V4 0x0200 - from Linux
695 * NetBSD-V4 0x0400 - "divined"
697 * Symb-V4 0xXXXX - 802.11 dwell time is XXX Kus
698 * Symb-V5 0xXXXX - 802.11 dwell time is XXX Kus
700 * XXX confirm that 1024Kus is okay for windows driver - how? and see
701 * XXX how it is over the maximum
703 #define RAY_MIB_DWELL_TIME_MINIMUM 1
704 #define RAY_MIB_DWELL_TIME_MAXIMUM 390
705 #define RAY_MIB_DWELL_TIME_V4 0x0400
706 #define RAY_MIB_DWELL_TIME_V5 0x0080
711 * DOC 0x0100 - Defines time between target beacon
712 * - transmit times (TBTT) in Kusec.
713 * - Forward Compatible Firmware (Build
714 * - 5) requires that the Beacon Period be an
715 * - integral multiple of the Dwell Time (not
716 * - exceeding 255 hops).
717 * - Required only of stations which intend
718 * - to issue a Start Network command.
720 * Linux.h - n * a_hop_time in Kus
722 * Linux.c-V5 0x0100 - 256 Kus
723 * NetBSD-V4 0x0001 - from Linux
724 * NetBSD-V4 0x0000 - "divined"
726 * Symb-V4 0x0001 - best performance is one beacon each dwell XXX
727 * Symb-V5 0x0080 - best performance is one beacon each dwell XXX
729 * XXX V4 should probably set this to dwell_time
731 #define RAY_MIB_BEACON_PERIOD_MINIMUM 1
732 #define RAY_MIB_BEACON_PERIOD_MAXIMUM 0xffff
733 #define RAY_MIB_BEACON_PERIOD_V4 0x0001
734 #define RAY_MIB_BEACON_PERIOD_V5 (2*RAY_MIB_DWELL_TIME_V5)
739 * DOC 0x01 - Number of beacons per DTIM period.
740 * - Only APs will use this parameter, to set
743 * Linux.h - in beacons
746 * Symb 0xXX - need to find out what DTIM is
748 #define RAY_MIB_DTIM_INTERVAL_MINIMUM 1
749 #define RAY_MIB_DTIM_INTERVAL_MAXIMUM 255
750 #define RAY_MIB_DTIM_INTERVAL_V4 0x01
751 #define RAY_MIB_DTIM_INTERVAL_V5 0x01
756 * DOC 31 - Number of times WIC will attempt to
757 * - retransmit a failed packet.
760 * NetBSD 0x01 - "documented default for 5/6"
761 * NetBSD 0x07 - from Linux
762 * NetBSD 0x03 - "divined"
763 * Symb 0xXX - 7 retries seems okay but check with APS
765 #define RAY_MIB_MAX_RETRY_MINIMUM 0
766 #define RAY_MIB_MAX_RETRY_MAXIMUM 255
767 #define RAY_MIB_MAX_RETRY_V4 0x07
768 #define RAY_MIB_MAX_RETRY_V5 0x1f
773 * DOC 0x86 - Time WIC will wait after completion of
774 * - a transmit before timing out anticipated
775 * - ACK (2 usec steps). Should equal
779 * NetBSD 0x86 - documented default for 5/6
780 * NetBSD 0xa3 - from Linux
781 * NetBSD 0xa3 - "divined"
782 * Symb 0xXX - this must be a 802.11 defined setting?
784 #define RAY_MIB_ACK_TIMO_MINIMUM 0
785 #define RAY_MIB_ACK_TIMO_MAXIMUM 255
786 #define RAY_MIB_ACK_TIMO_V4 0xa3
787 #define RAY_MIB_ACK_TIMO_V5 0x86
792 * DOC 0x1c - SIFS time in usec.
795 * NetBSD 0x1c - documented default for 5/6
796 * NetBSD 0x1d - from Linux
797 * NetBSD 0x1d - "divined"
798 * Symb 0xXX - default SIFS for 802.11
800 #define RAY_MIB_SIFS_MINIMUM 28
801 #define RAY_MIB_SIFS_MAXIMUM 62
802 #define RAY_MIB_SIFS_V4 0x1d
803 #define RAY_MIB_SIFS_V5 0x1c
808 * DOC 0x82 - DIFS time in usec.
810 #define RAY_MIB_DIFS_MINIMUM 130
811 #define RAY_MIB_DIFS_MAXIMUM 255
812 #define RAY_MIB_DIFS_V4 0x82
813 #define RAY_MIB_DIFS_V5 0x82
818 * DOC 78 - PIFS time in usec. (Not currently
821 #define RAY_MIB_PIFS_MINIMUM 78
822 #define RAY_MIB_PIFS_MAXIMUM 255
823 #define RAY_MIB_PIFS_V4 0xce
824 #define RAY_MIB_PIFS_V5 0x4e
829 * DOC 0x7ffff - Threshold size in bytes below which
830 * - messages will not require use of RTS
834 * NetBSD 0x7fff - disabled
835 * Symb 0xXXXX - need to set this realistically to get CTS/RTS mode
838 #define RAY_MIB_RTS_THRESH_MINIMUM 0
839 #define RAY_MIB_RTS_THRESH_MAXIMUM 2346
840 #define RAY_MIB_RTS_THRESH_DISABLE 0x7fff
841 #define RAY_MIB_RTS_THRESH_V4 RAY_MIB_RTS_THRESH_DISABLE
842 #define RAY_MIB_RTS_THRESH_V5 RAY_MIB_RTS_THRESH_DISABLE
847 * DOC 0x04e2 - Time channel remains clear after probe
848 * - transmission prior to hopping to next
849 * - channel. (in 2 msec steps).
851 * Linux.c-V4 0xfb1e - 128572us
852 * Linix.c-V5 0x04e2 - 2500us
855 * Symb 0xXXXX - Check that v4 h/w can do 2.5ms and default it
857 #define RAY_MIB_SCAN_DWELL_MINIMUM 1
858 #define RAY_MIB_SCAN_DWELL_MAXIMUM 65535
859 #define RAY_MIB_SCAN_DWELL_V4 0xfb1e
860 #define RAY_MIB_SCAN_DWELL_V5 0x04e2
865 * DOC 0x38a4 - Time to remain on a frequency channel
866 * - if CCA is detected after probe
867 * - transmission. (in 2 usec steps).
869 * Linux.c-V4 0xc75c - 102072us
870 * Linix.c-V5 0x38a4 - 29000us
873 * Symb 0xXXXX - see above - this may be total time before giving up
875 #define RAY_MIB_SCAN_MAX_DWELL_MINIMUM 1
876 #define RAY_MIB_SCAN_MAX_DWELL_MAXIMUM 65535
877 #define RAY_MIB_SCAN_MAX_DWELL_V4 0xc75c
878 #define RAY_MIB_SCAN_MAX_DWELL_V5 0x38a4
883 * DOC 0x05 - Time (in hops) a station waits after
884 * - transmitting an Association Request
885 * - Message before association attempt is
886 * - considered failed. N/A for Ad Hoc
887 * - Networks and for APs in Infrastructure
889 #define RAY_MIB_ASSOC_TIMO_MINIMUM 0
890 #define RAY_MIB_ASSOC_TIMO_MAXIMUM 255
891 #define RAY_MIB_ASSOC_TIMO_V4 0x05
892 #define RAY_MIB_ASSOC_TIMO_V5 0x05
895 * mib_adhoc_scan_cycle
897 * DOC 0x08 - Maximum number of times to cycle
898 * - through frequency hopping pattern as
899 * - part of scanning during Ad Hoc
902 #define RAY_MIB_ADHOC_SCAN_CYCLE_MINIMUM 1
903 #define RAY_MIB_ADHOC_SCAN_CYCLE_MAXIMUM 255
904 #define RAY_MIB_ADHOC_SCAN_CYCLE_V4 0x08
905 #define RAY_MIB_ADHOC_SCAN_CYCLE_V5 0x08
908 * mib_infra_scan_cycle
910 * DOC 0x02 - Number of times to cycle through
911 * - frequency hopping pattern as part of
912 * - scanning during Infrastructure Network
915 #define RAY_MIB_INFRA_SCAN_CYCLE_MINIMUM 1
916 #define RAY_MIB_INFRA_SCAN_CYCLE_MAXIMUM 255
917 #define RAY_MIB_INFRA_SCAN_CYCLE_V4 0x02
918 #define RAY_MIB_INFRA_SCAN_CYCLE_V5 0x02
921 * mib_infra_super_scan_cycle
923 * DOC 0x08 - Number of times to repeat an
924 * - Infrastructure scan cycle if no APs are
925 * - found before indicating a failure.
927 #define RAY_MIB_INFRA_SUPER_SCAN_CYCLE_MINIMUM 1
928 #define RAY_MIB_INFRA_SUPER_SCAN_CYCLE_MAXIMUM 255
929 #define RAY_MIB_INFRA_SUPER_SCAN_CYCLE_V4 0x08
930 #define RAY_MIB_INFRA_SUPER_SCAN_CYCLE_V5 0x08
935 * DOC 0x00 - Controls operation of WIC in
936 * - promiscuous mode.
938 #define RAY_MIB_PROMISC_DISABLED 0
939 #define RAY_MIB_PROMISC_ENABLED 1
940 #define RAY_MIB_PROMISC_V4 0x00
941 #define RAY_MIB_PROMISC_V5 0x00
946 * DOC 0x0cdb - Unique word pattern (Transmitted as
947 * - 0CBDh per 802.11)
949 #define RAY_MIB_UNIQ_WORD_MINIMUM 0
950 #define RAY_MIB_UNIQ_WORD_MAXIMUM 0xffff
951 #define RAY_MIB_UNIQ_WORD_V4 0x0cbd
952 #define RAY_MIB_UNIQ_WORD_V5 0x0cbd
957 * DOC 0x32 - Slot time in usec
961 * NetBSD-V4 0x4e - Linux
962 * NetBSD-V4 0x18 - "divined"
963 * NetBSD-V5 0x32 - mentions spec. is 50us i.e. 0x32
964 * Symb 0xXX - wtf 0x4e = 78
966 #define RAY_MIB_SLOT_TIME_MINIMUM 1
967 #define RAY_MIB_SLOT_TIME_MAXIMUM 128
968 #define RAY_MIB_SLOT_TIME_V4 0x4e
969 #define RAY_MIB_SLOT_TIME_V5 0x32
972 * mib_roam_low_snr_thresh
974 * DOC 0xff - SNR Threshold for use by roaming
975 * - algorithm. [Low power count is
976 * - incremented when Beacon is received at
977 * - SNR lower than Roaming Low SNR
978 * - Threshold.] To disable, set to FFh.
981 * NetBSD-V4 0xff - Linux
982 * NetBSD-V4 0x30 - "divined"
983 * NetBSD-V5 0xff - disabled
984 * NetBSD.h - if below this inc count
985 * Symb 0xXX - hmm is 0xff really disabled? need this to work
987 #define RAY_MIB_ROAM_LOW_SNR_THRESH_MINIMUM 0
988 #define RAY_MIB_ROAM_LOW_SNR_THRESH_MAXIMUM 255
989 #define RAY_MIB_ROAM_LOW_SNR_THRESH_DISABLED 0xff
990 #define RAY_MIB_ROAM_LOW_SNR_THRESH_V4 RAY_MIB_ROAM_LOW_SNR_THRESH_DISABLED
991 #define RAY_MIB_ROAM_LOW_SNR_THRESH_V5 RAY_MIB_ROAM_LOW_SNR_THRESH_DISABLED
996 * DOC 0xff - Threshold that number of consecutive
997 * - beacons received at SNR < Roaming
998 * - Low SNR Threshold must exceed
999 * - before roaming processing begins. To
1000 * - disable, set to FFh.
1003 * NetBSD 0x07 - "divined - check" and marked as disabled
1004 * NetBSD 0xff - disabled
1005 * NetBSD.h - roam after cnt below thrsh
1006 * Symb 0xXX - hmm is 0xff really disabled? need
1007 * - this to work in infrastructure mode with mutliple APs
1009 #define RAY_MIB_LOW_SNR_COUNT_MINIMUM 0
1010 #define RAY_MIB_LOW_SNR_COUNT_MAXIMUM 255
1011 #define RAY_MIB_LOW_SNR_COUNT_DISABLED 0xff
1012 #define RAY_MIB_LOW_SNR_COUNT_V4 RAY_MIB_LOW_SNR_COUNT_DISABLED
1013 #define RAY_MIB_LOW_SNR_COUNT_V5 RAY_MIB_LOW_SNR_COUNT_DISABLED
1016 * mib_infra_missed_beacon_count
1018 * DOC 0x02 - Threshold that number of consecutive
1019 * - beacons not received must exceed
1020 * - before roaming processing begins in an
1021 * - infrastructure network. To disable, set
1024 * NetBSD 0x02 - documented default for 5/6
1025 * NetBSD 0x05 - Linux
1026 * NetBSD 0x07 - "divined - check, looks fishy"
1027 * Symb 0xXX - 5 missed beacons is probably okay
1029 #define RAY_MIB_INFRA_MISSED_BEACON_COUNT_MINIMUM 0
1030 #define RAY_MIB_INFRA_MISSED_BEACON_COUNT_MAXIMUM 255
1031 #define RAY_MIB_INFRA_MISSED_BEACON_COUNT_V4 0x05
1032 #define RAY_MIB_INFRA_MISSED_BEACON_COUNT_V5 0x02
1035 * mib_adhoc_missed_beacon_count
1037 * DOC 0xff - Threshold that number of consecutive
1038 * - beacons transmitted by a terminal must
1039 * - exceed before reacquisition processing
1040 * - begins in Ad Hoc Network.
1042 #define RAY_MIB_ADHOC_MISSED_BEACON_COUNT_MINIMUM 0
1043 #define RAY_MIB_ADHOC_MISSED_BEACON_COUNT_MAXIMUM 255
1044 #define RAY_MIB_ADHOC_MISSED_BEACON_COUNT_DISABLED 0xff
1045 #define RAY_MIB_ADHOC_MISSED_BEACON_COUNT_V4 RAY_MIB_ADHOC_MISSED_BEACON_COUNT_DISABLED
1046 #define RAY_MIB_ADHOC_MISSED_BEACON_COUNT_V5 RAY_MIB_ADHOC_MISSED_BEACON_COUNT_DISABLED
1051 * DOC 0x01 - Country set of hopping patterns
1052 * - (element value in beacon)
1053 * - Note: Japan Test is for a special test
1054 * - mode required by the Japanese
1055 * - regulatory authorities.
1057 #define RAY_MIB_COUNTRY_CODE_MIMIMUM 0x01
1058 #define RAY_MIB_COUNTRY_CODE_MAXIMUM 0x09
1059 #define RAY_MIB_COUNTRY_CODE_USA 0x01
1060 #define RAY_MIB_COUNTRY_CODE_EUROPE 0x02
1061 #define RAY_MIB_COUNTRY_CODE_JAPAN 0x03
1062 #define RAY_MIB_COUNTRY_CODE_KOREA 0x04
1063 #define RAY_MIB_COUNTRY_CODE_SPAIN 0x05
1064 #define RAY_MIB_COUNTRY_CODE_FRANCE 0x06
1065 #define RAY_MIB_COUNTRY_CODE_ISRAEL 0x07
1066 #define RAY_MIB_COUNTRY_CODE_AUSTRALIA 0x08
1067 #define RAY_MIB_COUNTRY_CODE_JAPAN_TEST 0x09
1068 #define RAY_MIB_COUNTRY_CODE_V4 RAY_MIB_COUNTRY_CODE_USA
1069 #define RAY_MIB_COUNTRY_CODE_V5 RAY_MIB_COUNTRY_CODE_USA
1074 * DOC 0x0b - Hop Pattern to use. (Currently 66
1075 * - US/Europe plus 12 Japanese).
1077 * NetBSD.h - no longer supported
1079 #define RAY_MIB_HOP_SEQ_MINIMUM 6
1080 #define RAY_MIB_HOP_SEQ_MAXIMUM 72
1081 #define RAY_MIB_HOP_SEQ_V4 0x0b
1082 #define RAY_MIB_HOP_SEQ_V5 0x04
1087 * DOC 0x4f - Number of frequency channels in
1088 * - hopping pattern is now set to the value
1089 * - defined in IEEE802.11 for the selected
1090 * - Current Country Code.
1092 #define RAY_MIB_HOP_SEQ_LEN_MINIMUM 1
1093 #define RAY_MIB_HOP_SEQ_LEN_MAXIMUM 79
1094 #define RAY_MIB_HOP_SEQ_LEN_V4 0x4e
1095 #define RAY_MIB_HOP_SEQ_LEN_V5 0x4f
1098 * All from here down are the same in Linux/NetBSD and seem to be sane.
1100 #define RAY_MIB_CW_MAX_V4 0x3f
1101 #define RAY_MIB_CW_MAX_V5 0x003f
1103 #define RAY_MIB_CW_MIN_V4 0x0f
1104 #define RAY_MIB_CW_MIN_V5 0x000f
1107 * Symb 0xXX - these parameters will affect the clear channel
1108 * assesment false triggering
1111 #define RAY_MIB_NOISE_FILTER_GAIN_DEFAULT 0x04
1112 #define RAY_MIB_NOISE_LIMIT_OFFSET_DEFAULT 0x08
1113 #define RAY_MIB_RSSI_THRESH_OFFSET_DEFAULT 0x28
1114 #define RAY_MIB_BUSY_THRESH_OFFSET_DEFAULT 0x28
1115 #define RAY_MIB_SYNC_THRESH_DEFAULT 0x07
1117 #define RAY_MIB_TEST_MODE_NORMAL 0x0
1118 #define RAY_MIB_TEST_MODE_ANT_1 0x1
1119 #define RAY_MIB_TEST_MODE_ATN_2 0x2
1120 #define RAY_MIB_TEST_MODE_ATN_BOTH 0x3
1121 #define RAY_MIB_TEST_MODE_DEFAULT RAY_MIB_TEST_MODE_NORMAL
1123 #define RAY_MIB_TEST_MIN_CHAN_DEFAULT 0x02
1124 #define RAY_MIB_TEST_MAX_CHAN_DEFAULT 0x02
1126 #define RAY_MIB_ALLOW_PROBE_RESP_DISALLOW 0x0
1127 #define RAY_MIB_ALLOW_PROBE_RESP_ALLOW 0x1
1128 #define RAY_MIB_ALLOW_PROBE_RESP_DEFAULT RAY_MIB_ALLOW_PROBE_RESP_DISALLOW
1130 #define RAY_MIB_PRIVACY_MUST_START_NOWEP 0x0
1131 #define RAY_MIB_PRIVACY_MUST_START_WEP 0x1
1132 #define RAY_MIB_PRIVACY_MUST_START_DEFAULT RAY_MIB_PRIVACY_MUST_START_NOWEP
1134 #define RAY_MIB_PRIVACY_CAN_JOIN_NOWEP 0x0
1135 #define RAY_MIB_PRIVACY_CAN_JOIN_WEP 0x1
1136 #define RAY_MIB_PRIVACY_CAN_JOIN_DONT_CARE 0x2
1137 #define RAY_MIB_PRIVACY_CAN_JOIN_DEFAULT RAY_MIB_PRIVACY_CAN_JOIN_NOWEP
1139 #define RAY_MIB_BASIC_RATE_SET_MINIMUM 1
1140 #define RAY_MIB_BASIC_RATE_SET_MAXIMUM 4
1141 #define RAY_MIB_BASIC_RATE_SET_500K 1
1142 #define RAY_MIB_BASIC_RATE_SET_1000K 2
1143 #define RAY_MIB_BASIC_RATE_SET_1500K 3
1144 #define RAY_MIB_BASIC_RATE_SET_2000K 4
1145 #define RAY_MIB_BASIC_RATE_SET_DEFAULT RAY_MIB_BASIC_RATE_SET_2000K
1150 struct ray_param_req {
1154 u_int8_t r_data[256];
1156 struct ray_stats_req {
1157 u_int64_t rxoverflow; /* Number of rx overflows */
1158 u_int64_t rxcksum; /* Number of checksum errors */
1159 u_int64_t rxhcksum; /* Number of header checksum errors */
1160 u_int8_t rxnoise; /* Average receiver level */
1162 #define RAY_FAILCAUSE_EIDRANGE 1
1163 #define RAY_FAILCAUSE_ELENGTH 2
1164 /* device can possibly return up to 255 */
1165 #define RAY_FAILCAUSE_EDEVSTOP 256
1167 /* Get a param the data is a ray_param_req structure */
1168 #define SIOCSRAYPARAM SIOCSIFGENERIC
1169 #define SIOCGRAYPARAM SIOCGIFGENERIC
1170 /* Get the error counters the data is a ray_stats_req structure */
1171 #define SIOCGRAYSTATS _IOWR('i', 201, struct ifreq)
1172 #define SIOCGRAYSIGLEV _IOWR('i', 202, struct ifreq)
1174 #define RAY_NSIGLEVRECS 8
1175 #define RAY_NSIGLEV 8
1176 #define RAY_NANTENNA 8
1179 u_int8_t rsl_host[ETHER_ADDR_LEN]; /* MAC address */
1180 u_int8_t rsl_siglevs[RAY_NSIGLEV]; /* levels, newest in [0] */
1181 u_int8_t rsl_antennas[RAY_NANTENNA]; /* best antenna */
1182 struct timeval rsl_time; /* time of last packet */