aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ray
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ray')
-rw-r--r--sys/dev/ray/if_raydbg.h146
-rw-r--r--sys/dev/ray/if_raymib.h1100
-rw-r--r--sys/dev/ray/if_rayreg.h480
-rw-r--r--sys/dev/ray/if_rayvar.h310
4 files changed, 0 insertions, 2036 deletions
diff --git a/sys/dev/ray/if_raydbg.h b/sys/dev/ray/if_raydbg.h
deleted file mode 100644
index 7dc255d49604..000000000000
--- a/sys/dev/ray/if_raydbg.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (C) 2000
- * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk.
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY DUNCAN BARCLAY AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL DUNCAN BARCLAY OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- *
- */
-
-/*
- * Debugging odds and odds
- */
-
-/*
- * RAY_DEBUG settings
- *
- * RECERR Recoverable error's, deprecated use RAY_RECERR macro
- * SUBR Subroutine entry
- * BOOTPARAM Startup CM dump
- * STARTJOIN State transitions for start/join
- * CCS CCS info
- * IOCTL IOCTL calls
- * MBUF MBUFs dumped - needs one of TX, RX, MGT, or CTL
- * RX packet types reported
- * CM common memory re-mapping
- * COM new command sleep/wakeup
- * STOP driver detaching
- * CTL CTL packets
- * MGT MGT packets
- * TX TX routine info
- * DCOM dump comq entries
- */
-#define RAY_DBG_RECERR 0x0001
-#define RAY_DBG_SUBR 0x0002
-#define RAY_DBG_BOOTPARAM 0x0004
-#define RAY_DBG_STARTJOIN 0x0008
-#define RAY_DBG_CCS 0x0010
-#define RAY_DBG_IOCTL 0x0020
-#define RAY_DBG_MBUF 0x0080
-#define RAY_DBG_RX 0x0100
-#define RAY_DBG_CM 0x0200
-#define RAY_DBG_COM 0x0400
-#define RAY_DBG_STOP 0x0800
-#define RAY_DBG_CTL 0x1000
-#define RAY_DBG_MGT 0x2000
-#define RAY_DBG_TX 0x4000
-#define RAY_DBG_DCOM 0x8000
-/* Cut and paste this into a kernel configuration file */
-#if 0
-#define RAY_DEBUG ( \
- /* RAY_DBG_SUBR | */ \
- /* RAY_DBG_BOOTPARAM | */ \
- /* RAY_DBG_STARTJOIN | */ \
- /* RAY_DBG_CCS | */ \
- /* RAY_DBG_IOCTL | */ \
- /* RAY_DBG_MBUF | */ \
- /* RAY_DBG_RX | */ \
- /* RAY_DBG_CM | */ \
- /* RAY_DBG_COM | */ \
- /* RAY_DBG_STOP | */ \
- /* RAY_DBG_CTL | */ \
- /* RAY_DBG_MGT | */ \
- /* RAY_DBG_TX | */ \
- /* RAY_DBG_DCOM | */ \
- 0 \
- )
-#endif
-
-#if RAY_DEBUG
-
-#define RAY_DPRINTF(sc, mask, fmt, args...) do {if (RAY_DEBUG & (mask)) {\
- device_printf((sc)->dev, "%s(%d) " fmt "\n", \
- __FUNCTION__ , __LINE__ , ##args); \
-} } while (0)
-
-/* This macro assumes that common memory is mapped into kernel space */
-#define RAY_DHEX8(sc, mask, off, len, s) do { if (RAY_DEBUG & (mask)) { \
- int i, j; \
- device_printf((sc)->dev, "%s(%d) %s\n", \
- __FUNCTION__ , __LINE__ , (s)); \
- for (i = (off); i < (off)+(len); i += 8) { \
- printf(". 0x%04x ", i); \
- for (j = 0; j < 8; j++) \
- printf("%02x ", SRAM_READ_1((sc), i+j)); \
- printf("\n"); \
- } \
-} } while (0)
-
-#define RAY_DCOM(sc, mask, com, s) do { if (RAY_DEBUG & (mask)) { \
- device_printf((sc)->dev, "%s(%d) %s com entry 0x%p\n", \
- __FUNCTION__ , __LINE__ , (s) , (com)); \
- printf(". c_mesg %s\n", (com)->c_mesg); \
- printf(". c_flags 0x%b\n", (com)->c_flags, RAY_COM_FLAGS_PRINTFB); \
- printf(". c_retval 0x%x\n", (com)->c_retval); \
- printf(". c_ccs 0x%0x index 0x%02x\n", \
- (com)->c_ccs, RAY_CCS_INDEX((com)->c_ccs)); \
-} } while (0)
-
-#else
-#define RAY_DPRINTF(sc, mask, fmt, args...)
-#define RAY_DHEX8(sc, mask, off, len, s)
-#define RAY_DCOM(sc, mask, com, s)
-#endif /* RAY_DEBUG > 0 */
-
-/*
- * These override macros defined in if_ray.c to turn them into
- * debugging ones.
- */
-#if RAY_DEBUG & RAY_DBG_COM
-
-#define RAY_COM_CHECK(sc, com) do { if (RAY_DEBUG & RAY_DBG_COM) { \
- ray_com_ecf_check((sc), (com), __FUNCTION__ ); \
-} } while (0)
-
-#endif /* RAY_DEBUG & RAY_DBG_COM */
-
-#if RAY_DEBUG & RAY_DBG_MBUF
-#define RAY_MBUF_DUMP(sc, mask, m, s) do { if (RAY_DEBUG & (mask)) { \
- ray_dump_mbuf((sc), (m), (s)); \
-} } while (0)
-#endif /* RAY_DEBUG & RAY_DBG_MBUF */
diff --git a/sys/dev/ray/if_raymib.h b/sys/dev/ray/if_raymib.h
deleted file mode 100644
index 77297869b9e2..000000000000
--- a/sys/dev/ray/if_raymib.h
+++ /dev/null
@@ -1,1100 +0,0 @@
-/*
- * Copyright (C) 2000
- * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk.
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY DUNCAN BARCLAY AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL DUNCAN BARCLAY OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- *
- */
-
-/*
- * Bit mask definitions for firmware versioning
- */
-#define RAY_V4 0x1
-#define RAY_V5 0x2
-
-/*
- * MIB stuctures
- */
-struct ray_mib_common_head { /*Offset*/ /*Size*/
- u_int8_t mib_net_type; /*00*/
- u_int8_t mib_ap_status; /*01*/
- u_int8_t mib_ssid[IEEE80211_NWID_LEN]; /*02*/ /*20*/
- u_int8_t mib_scan_mode; /*22*/
- u_int8_t mib_apm_mode; /*23*/
- u_int8_t mib_mac_addr[ETHER_ADDR_LEN]; /*24*/ /*06*/
- u_int8_t mib_frag_thresh[2]; /*2a*/ /*02*/
- u_int8_t mib_dwell_time[2]; /*2c*/ /*02*/
- u_int8_t mib_beacon_period[2]; /*2e*/ /*02*/
- u_int8_t mib_dtim_interval; /*30*/
- u_int8_t mib_max_retry; /*31*/
- u_int8_t mib_ack_timo; /*32*/
- u_int8_t mib_sifs; /*33*/
- u_int8_t mib_difs; /*34*/
- u_int8_t mib_pifs; /*35*/
- u_int8_t mib_rts_thresh[2]; /*36*/ /*02*/
- u_int8_t mib_scan_dwell[2]; /*38*/ /*02*/
- u_int8_t mib_scan_max_dwell[2]; /*3a*/ /*02*/
- u_int8_t mib_assoc_timo; /*3c*/
- u_int8_t mib_adhoc_scan_cycle; /*3d*/
- u_int8_t mib_infra_scan_cycle; /*3e*/
- u_int8_t mib_infra_super_scan_cycle; /*3f*/
- u_int8_t mib_promisc; /*40*/
- u_int8_t mib_uniq_word[2]; /*41*/ /*02*/
- u_int8_t mib_slot_time; /*43*/
- u_int8_t mib_roam_low_snr_thresh; /*44*/
- u_int8_t mib_low_snr_count; /*45*/
- u_int8_t mib_infra_missed_beacon_count; /*46*/
- u_int8_t mib_adhoc_missed_beacon_count; /*47*/
- u_int8_t mib_country_code; /*48*/
- u_int8_t mib_hop_seq; /*49*/
- u_int8_t mib_hop_seq_len; /*4a*/
-} __attribute__((__packed__));
-
-struct ray_mib_common_tail {
- u_int8_t mib_noise_filter_gain; /*00*/
- u_int8_t mib_noise_limit_offset; /*01*/
- u_int8_t mib_rssi_thresh_offset; /*02*/
- u_int8_t mib_busy_thresh_offset; /*03*/
- u_int8_t mib_sync_thresh; /*04*/
- u_int8_t mib_test_mode; /*05*/
- u_int8_t mib_test_min_chan; /*06*/
- u_int8_t mib_test_max_chan; /*07*/
-} __attribute__((__packed__));
-
-struct ray_mib_4 {
- struct ray_mib_common_head mib_head; /*00*/
- u_int8_t mib_cw_max; /*4b*/
- u_int8_t mib_cw_min; /*4c*/
- struct ray_mib_common_tail mib_tail; /*4d*/
-} __attribute__((__packed__));
-
-struct ray_mib_5 {
- struct ray_mib_common_head mib_head; /*00*/
- u_int8_t mib_cw_max[2]; /*4b*/ /*02*/
- u_int8_t mib_cw_min[2]; /*4d*/ /*02*/
- struct ray_mib_common_tail mib_tail; /*4f*/
- u_int8_t mib_allow_probe_resp; /*57*/
- u_int8_t mib_privacy_must_start; /*58*/
- u_int8_t mib_privacy_can_join; /*59*/
- u_int8_t mib_basic_rate_set[8]; /*5a*/ /*08*/
-} __attribute__((__packed__));
-
-#define mib_net_type mib_head.mib_net_type
-#define mib_ap_status mib_head.mib_ap_status
-#define mib_ssid mib_head.mib_ssid
-#define mib_scan_mode mib_head.mib_scan_mode
-#define mib_apm_mode mib_head.mib_apm_mode
-#define mib_mac_addr mib_head.mib_mac_addr
-#define mib_frag_thresh mib_head.mib_frag_thresh
-#define mib_dwell_time mib_head.mib_dwell_time
-#define mib_beacon_period mib_head.mib_beacon_period
-#define mib_dtim_interval mib_head.mib_dtim_interval
-#define mib_max_retry mib_head.mib_max_retry
-#define mib_ack_timo mib_head.mib_ack_timo
-#define mib_sifs mib_head.mib_sifs
-#define mib_difs mib_head.mib_difs
-#define mib_pifs mib_head.mib_pifs
-#define mib_rts_thresh mib_head.mib_rts_thresh
-#define mib_scan_dwell mib_head.mib_scan_dwell
-#define mib_scan_max_dwell mib_head.mib_scan_max_dwell
-#define mib_assoc_timo mib_head.mib_assoc_timo
-#define mib_adhoc_scan_cycle mib_head.mib_adhoc_scan_cycle
-#define mib_infra_scan_cycle mib_head.mib_infra_scan_cycle
-#define mib_infra_super_scan_cycle \
- mib_head.mib_infra_super_scan_cycle
-#define mib_promisc mib_head.mib_promisc
-#define mib_uniq_word mib_head.mib_uniq_word
-#define mib_slot_time mib_head.mib_slot_time
-#define mib_roam_low_snr_thresh mib_head.mib_roam_low_snr_thresh
-#define mib_low_snr_count mib_head.mib_low_snr_count
-#define mib_infra_missed_beacon_count \
- mib_head.mib_infra_missed_beacon_count
-#define mib_adhoc_missed_beacon_count \
- mib_head.mib_adhoc_missed_beacon_count
-#define mib_country_code mib_head.mib_country_code
-#define mib_hop_seq mib_head.mib_hop_seq
-#define mib_hop_seq_len mib_head.mib_hop_seq_len
-
-#define mib_noise_filter_gain mib_tail.mib_noise_filter_gain
-#define mib_noise_limit_offset mib_tail.mib_noise_limit_offset
-#define mib_rssi_thresh_offset mib_tail.mib_rssi_thresh_offset
-#define mib_busy_thresh_offset mib_tail.mib_busy_thresh_offset
-#define mib_sync_thresh mib_tail.mib_sync_thresh
-#define mib_test_mode mib_tail.mib_test_mode
-#define mib_test_min_chan mib_tail.mib_test_min_chan
-#define mib_test_max_chan mib_tail.mib_test_max_chan
-
-/*
- * MIB IDs for the update/report param commands
- */
-#define RAY_MIB_NET_TYPE 0
-#define RAY_MIB_AP_STATUS 1
-#define RAY_MIB_SSID 2
-#define RAY_MIB_SCAN_MODE 3
-#define RAY_MIB_APM_MODE 4
-#define RAY_MIB_MAC_ADDR 5
-#define RAY_MIB_FRAG_THRESH 6
-#define RAY_MIB_DWELL_TIME 7
-#define RAY_MIB_BEACON_PERIOD 8
-#define RAY_MIB_DTIM_INTERVAL 9
-#define RAY_MIB_MAX_RETRY 10
-#define RAY_MIB_ACK_TIMO 11
-#define RAY_MIB_SIFS 12
-#define RAY_MIB_DIFS 13
-#define RAY_MIB_PIFS 14
-#define RAY_MIB_RTS_THRESH 15
-#define RAY_MIB_SCAN_DWELL 16
-#define RAY_MIB_SCAN_MAX_DWELL 17
-#define RAY_MIB_ASSOC_TIMO 18
-#define RAY_MIB_ADHOC_SCAN_CYCLE 19
-#define RAY_MIB_INFRA_SCAN_CYCLE 20
-#define RAY_MIB_INFRA_SUPER_SCAN_CYCLE 21
-#define RAY_MIB_PROMISC 22
-#define RAY_MIB_UNIQ_WORD 23
-#define RAY_MIB_SLOT_TIME 24
-#define RAY_MIB_ROAM_LOW_SNR_THRESH 25
-#define RAY_MIB_LOW_SNR_COUNT 26
-#define RAY_MIB_INFRA_MISSED_BEACON_COUNT 27
-#define RAY_MIB_ADHOC_MISSED_BEACON_COUNT 28
-#define RAY_MIB_COUNTRY_CODE 29
-#define RAY_MIB_HOP_SEQ 30
-#define RAY_MIB_HOP_SEQ_LEN 31
-#define RAY_MIB_CW_MAX 32
-#define RAY_MIB_CW_MIN 33
-#define RAY_MIB_NOISE_FILTER_GAIN 34
-#define RAY_MIB_NOISE_LIMIT_OFFSET 35
-#define RAY_MIB_RSSI_THRESH_OFFSET 36
-#define RAY_MIB_BUSY_THRESH_OFFSET 37
-#define RAY_MIB_SYNC_THRESH 38
-#define RAY_MIB_TEST_MODE 39
-#define RAY_MIB_TEST_MIN_CHAN 40
-#define RAY_MIB_TEST_MAX_CHAN 41
-#define RAY_MIB_ALLOW_PROBE_RESP 42
-#define RAY_MIB_PRIVACY_MUST_START 43
-#define RAY_MIB_PRIVACY_CAN_JOIN 44
-#define RAY_MIB_BASIC_RATE_SET 45
-#define RAY_MIB_VERSION 46
-#define RAY_MIB_CUR_BSSID 47
-#define RAY_MIB_CUR_INITED 48
-#define RAY_MIB_CUR_DEF_TXRATE 49
-#define RAY_MIB_CUR_ENCRYPT 50
-#define RAY_MIB_CUR_NET_TYPE 51
-#define RAY_MIB_CUR_SSID 52
-#define RAY_MIB_CUR_PRIV_START 53
-#define RAY_MIB_CUR_PRIV_JOIN 54
-#define RAY_MIB_DES_BSSID 55
-#define RAY_MIB_DES_INITED 56
-#define RAY_MIB_DES_DEF_TXRATE 57
-#define RAY_MIB_DES_ENCRYPT 58
-#define RAY_MIB_DES_NET_TYPE 59
-#define RAY_MIB_DES_SSID 60
-#define RAY_MIB_DES_PRIV_START 61
-#define RAY_MIB_DES_PRIV_JOIN 62
-#define RAY_MIB_CUR_AP_STATUS 63
-#define RAY_MIB_CUR_PROMISC 64
-#define RAY_MIB_DES_AP_STATUS 65
-#define RAY_MIB_DES_PROMISC 66
-
-#define RAY_MIB_LASTUSER 45
-#define RAY_MIB_MAX 66
-
-/*
- * Strings for the MIB
- */
-#define RAY_MIB_STRINGS { \
- "Network type", \
- "AP status", \
- "SSID", \
- "Scan mode", \
- "APM mode", \
- "MAC address", \
- "Fragmentation threshold", \
- "Dwell time", \
- "Beacon period", \
- "DTIM_INTERVAL", \
- "MAX_RETRY", \
- "ACK_TIMO", \
- "SIFS", \
- "DIFS", \
- "PIFS", \
- "RTS_THRESH", \
- "SCAN_DWELL", \
- "SCAN_MAX_DWELL", \
- "ASSOC_TIMO", \
- "ADHOC_SCAN_CYCLE", \
- "INFRA_SCAN_CYCLE", \
- "INFRA_SUPER_SCAN_CYCLE", \
- "PROMISC", \
- "UNIQ_WORD", \
- "SLOT_TIME", \
- "ROAM_LOW_SNR_THRESH", \
- "LOW_SNR_COUNT", \
- "INFRA_MISSED_BEACON_COUNT", \
- "ADHOC_MISSED_BEACON_COUNT", \
- "COUNTRY_CODE", \
- "HOP_SEQ", \
- "HOP_SEQ_LEN", \
- "CW_MAX", \
- "CW_MIN", \
- "NOISE_FILTER_GAIN", \
- "NOISE_LIMIT_OFFSET", \
- "RSSI_THRESH_OFFSET", \
- "BUSY_THRESH_OFFSET", \
- "SYNC_THRESH", \
- "TEST_MODE", \
- "TEST_MIN_CHAN", \
- "TEST_MAX_CHAN", \
- "ALLOW_PROBE_RESP", \
- "PRIVACY_MUST_START", \
- "PRIVACY_CAN_JOIN", \
- "BASIC_RATE_SET", \
- "Firmware version", \
- "Current BSS Id", \
- "Current INITED", \
- "Current DEF_TXRATE", \
- "Current ENCRYPT", \
- "Current NET_TYPE", \
- "Current SSID", \
- "Current PRIV_START", \
- "Current PRIV_JOIN", \
- "Desired BSSID", \
- "Desired INITED", \
- "Desired DEF_TXRATE", \
- "Desired ENCRYPT", \
- "Desired NET_TYPE", \
- "Desired SSID", \
- "Desired PRIV_START", \
- "Desired PRIV_JOIN", \
- "Current AP_STATUS", \
- "Current PROMISC", \
- "Desired AP_STATUS", \
- "Desired PROMISC" \
-}
-
-#define RAY_MIB_HELP_STRINGS { \
- "0 Ad hoc, 1 Infrastructure", \
- "0 Station, 1 Access Point", \
- "", \
- "0 Passive, 1 Active", \
- "0 Off, 1 On", \
- "", \
- "Bytes", \
- "DWELL_TIME", \
- "BEACON_PERIOD", \
- "DTIM_INTERVAL", \
- "MAX_RETRY", \
- "ACK_TIMO", \
- "SIFS", \
- "DIFS", \
- "PIFS", \
- "RTS_THRESH", \
- "SCAN_DWELL", \
- "SCAN_MAX_DWELL", \
- "ASSOC_TIMO", \
- "ADHOC_SCAN_CYCLE", \
- "INFRA_SCAN_CYCLE", \
- "INFRA_SUPER_SCAN_CYCLE", \
- "PROMISC", \
- "UNIQ_WORD", \
- "SLOT_TIME", \
- "ROAM_LOW_SNR_THRESH", \
- "LOW_SNR_COUNT", \
- "INFRA_MISSED_BEACON_COUNT", \
- "ADHOC_MISSED_BEACON_COUNT", \
- "COUNTRY_CODE", \
- "HOP_SEQ", \
- "HOP_SEQ_LEN", \
- "CW_MAX", \
- "CW_MIN", \
- "NOISE_FILTER_GAIN", \
- "NOISE_LIMIT_OFFSET", \
- "RSSI_THRESH_OFFSET", \
- "BUSY_THRESH_OFFSET", \
- "SYNC_THRESH", \
- "TEST_MODE", \
- "TEST_MIN_CHAN", \
- "TEST_MAX_CHAN", \
- "ALLOW_PROBE_RESP", \
- "PRIVACY_MUST_START", \
- "PRIVACY_CAN_JOIN", \
- "BASIC_RATE_SET", \
- "", \
- "", \
- "0 Joined a net, 1 Created a net", \
- "Current DEF_TXRATE", \
- "Current ENCRYPT", \
- "Current NET_TYPE", \
- "", \
- "Current PRIV_START", \
- "Current PRIV_JOIN", \
- "", \
- "N/A", \
- "Desired DEF_TXRATE", \
- "Desired ENCRYPT", \
- "Desired NET_TYPE", \
- "", \
- "Desired PRIV_START", \
- "Desired PRIV_JOIN", \
- "Current AP_STATUS", \
- "Current PROMISC", \
- "Desired AP_STATUS", \
- "Desired PROMISC" \
-}
-
-/*
- * Applicable versions and work size for each MIB element
- */
-#define RAY_MIB_INFO_SIZ4 1
-#define RAY_MIB_INFO_SIZ5 2
-#define RAY_MIB_SIZE(info, mib, version) \
- info[(mib)][(version & RAY_V4)?RAY_MIB_INFO_SIZ4:RAY_MIB_INFO_SIZ5]
-#define RAY_MIB_INFO { \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_NET_TYPE */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_AP_STATUS */ \
-{RAY_V4|RAY_V5, IEEE80211_NWID_LEN, \
- IEEE80211_NWID_LEN},/* RAY_MIB_SSID */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_SCAN_MODE */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_APM_MODE */ \
-{RAY_V4|RAY_V5, ETHER_ADDR_LEN, \
- ETHER_ADDR_LEN},/* RAY_MIB_MAC_ADDR */ \
-{RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_FRAG_THRESH */ \
-{RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_DWELL_TIME */ \
-{RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_BEACON_PERIOD */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DTIM_INTERVAL */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_MAX_RETRY */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ACK_TIMO */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_SIFS */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DIFS */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_PIFS */ \
-{RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_RTS_THRESH */ \
-{RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_SCAN_DWELL */ \
-{RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_SCAN_MAX_DWELL */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ASSOC_TIMO */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ADHOC_SCAN_CYCLE */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_INFRA_SCAN_CYCLE */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_INFRA_SUPER_SCAN_CYCLE */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_PROMISC */ \
-{RAY_V4|RAY_V5, 2, 2}, /* RAY_MIB_UNIQ_WORD */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_SLOT_TIME */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ROAM_LOW_SNR_THRESH */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_LOW_SNR_COUNT */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_INFRA_MISSED_BEACON_COUNT */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_ADHOC_MISSED_BEACON_COUNT */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_COUNTRY_CODE */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_HOP_SEQ */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_HOP_SEQ_LEN */ \
-{RAY_V4|RAY_V5, 1, 2}, /* RAY_MIB_CW_MAX */ \
-{RAY_V4|RAY_V5, 1, 2}, /* RAY_MIB_CW_MIN */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_NOISE_FILTER_GAIN */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_NOISE_LIMIT_OFFSET */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_RSSI_THRESH_OFFSET */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_BUSY_THRESH_OFFSET */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_SYNC_THRESH */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_TEST_MODE */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_TEST_MIN_CHAN */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_TEST_MAX_CHAN */ \
-{ RAY_V5, 0, 1}, /* RAY_MIB_ALLOW_PROBE_RESP */ \
-{ RAY_V5, 0, 1}, /* RAY_MIB_PRIVACY_MUST_START */ \
-{ RAY_V5, 0, 1}, /* RAY_MIB_PRIVACY_CAN_JOIN */ \
-{ RAY_V5, 0, 8}, /* RAY_MIB_BASIC_RATE_SET */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_VERSION */ \
-{RAY_V4|RAY_V5, ETHER_ADDR_LEN, \
- ETHER_ADDR_LEN},/* RAY_MIB_CUR_BSSID */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_INITED */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_DEF_TXRATE */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_ENCRYPT */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_NET_TYPE */ \
-{RAY_V4|RAY_V5, IEEE80211_NWID_LEN, \
- IEEE80211_NWID_LEN}, /* RAY_MIB_CUR_SSID */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_PRIV_START */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_PRIV_JOIN */ \
-{RAY_V4|RAY_V5, ETHER_ADDR_LEN, \
- ETHER_ADDR_LEN},/* RAY_MIB_DES_BSSID */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_INITED */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_DEF_TXRATE */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_ENCRYPT */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_NET_TYPE */ \
-{RAY_V4|RAY_V5, IEEE80211_NWID_LEN, \
- IEEE80211_NWID_LEN}, /* RAY_MIB_DES_SSID */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_PRIV_START */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_PRIV_JOIN */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_AP_STATUS */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_CUR_PROMISC */ \
-{RAY_V4|RAY_V5, 1, 1}, /* RAY_MIB_DES_AP_STATUS */ \
-{RAY_V4|RAY_V5, 1, 1} /* RAY_MIB_DES_PROMISC */ \
-}
-
-/*
- * MIB values
- *
- * I've included comments as to where the numbers have originated
- * from.
- *
- * Linux refers to ray_cs.c and rayctl.h from version 167 of the
- * Linux Raylink driver.
- *
- * NetBSD refers to if_ray.c from version 1.12 of the NetBSD Raylink
- * driver.
- *
- * Symb refers to numbers cleaned from the 802.11 specification,
- * discussion with 802.11 knowledgable people at Symbionics or
- * stuff needed by me (i.e. me, * aps, ifo, hjl).
- *
- * V4 and V5 refer to settings for version 4 and version 5 of
- * the firmware.
- *
- * DOC refers to the
- * Combined Interface Requirements Specification
- * and Interface Design Document (IRS/IDD)
- * for the
- * WLAN System Interfaces Between the
- * HOST COMPUTER and the
- * PCMCIA WLAN INTERFACE CARD
- * Revision ECF 5.00
- * 17 June, 1998
- */
-
-/* XXX Obtained by raycontrol _before_ downloading
- * # /sys/dev/ray/raycontrol/raycontrol -i ray0
- * Firmware version 4
- * Network type 0x01 0 Ad hoc, 1 Infrastructure
- * AP status 0x00 0 Station, 1 Access Point
- * SSID
- * Scan mode 0x01 0 Passive, 1 Active
- * APM mode 0x00 0 Off, 1 On
- * MAC address 00:00:8f:48:e4:44
- * Fragmentation threshold 0x0200 FRAG_THRESH
- * Dwell tIME 0x01 DWELL_TIME
- * Beacon period 0x01 BEACON_PERIOD
- * DTIM_INTERVAL 0x05 DTIM_INTERVAL
- * MAX_RETRY 0x03 MAX_RETRY
- * ACK_TIMO 0x8c ACK_TIMO
- * SIFS 0x1e SIFS
- * DIFS 0x82 DIFS
- * PIFS 0xce PIFS
- * RTS_THRESH 0x0100 RTS_THRESH
- * SCAN_DWELL 0xfc18 SCAN_DWELL
- * SCAN_MAX_DWELL 0xc180 SCAN_MAX_DWELL
- * ASSOC_TIMO 0x05 ASSOC_TIMO
- * ADHOC_SCAN_CYCLE 0x04 ADHOC_SCAN_CYCLE
- * INFRA_SCAN_CYCLE 0x02 INFRA_SCAN_CYCLE
- * INFRA_SUPER_SCAN_CYCLE 0x04 INFRA_SUPER_SCAN_CYCLE
- * PROMISC 0x00 PROMISC
- * UNIQ_WORD 0x0cbd UNIQ_WORD
- * SLOT_TIME 0x4e SLOT_TIME
- * ROAM_LOW_SNR_THRESH 0x20 ROAM_LOW_SNR_THRESH
- * LOW_SNR_COUNT 0x04 LOW_SNR_COUNT
- * INFRA_MISSED_BEACON_COUNT 0x04 INFRA_MISSED_BEACON_COUNT
- * ADHOC_MISSED_BEACON_COUNT 0x04 ADHOC_MISSED_BEACON_COUNT
- * COUNTRY_CODE 0x01 COUNTRY_CODE
- * HOP_SEQ 0x07 HOP_SEQ
- * HOP_SEQ_LEN 0x4e HOP_SEQ_LEN
- * CW_MAX 0x3f CW_MAX
- * CW_MIN 0x0f CW_MIN
- * NOISE_FILTER_GAIN 0x00 NOISE_FILTER_GAIN
- * NOISE_LIMIT_OFFSET 0x00 NOISE_LIMIT_OFFSET
- * RSSI_THRESH_OFFSET 0x70 RSSI_THRESH_OFFSET
- * BUSY_THRESH_OFFSET 0x70 BUSY_THRESH_OFFSET
- * SYNC_THRESH 0x07 SYNC_THRESH
- * TEST_MODE 0x00 TEST_MODE
- * TEST_MIN_CHAN 0x02 TEST_MIN_CHAN
- * TEST_MAX_CHAN 0x02 TEST_MAX_CHAN
-*/
-
-/*
- * mib_net_type
- *
- * DOC 0x01 - Defines network type for Start and Join
- * - Network commands.
- *
- * Symb 0x00 - Adhoc is safer and I ain't got an AP
- */
-#define RAY_MIB_NET_TYPE_ADHOC 0x00
-#define RAY_MIB_NET_TYPE_INFRA 0x01
-#define RAY_MIB_NET_TYPE_DEFAULT RAY_MIB_NET_TYPE_ADHOC
-
-/*
- * mib_ap_status
- *
- * DOC 0x00 - Applicable only when Network Type is
- * - Infrastructure.
- */
-#define RAY_MIB_AP_STATUS_TERMINAL 0x00
-#define RAY_MIB_AP_STATUS_AP 0x01
-#define RAY_MIB_AP_STATUS_DEFAULT RAY_MIB_AP_STATUS_TERMINAL
-
-/*
- * mib_ssid
- *
- * DOC ESSID1 - Service Set ID. Can be any ASCII string
- * - up to 32 bytes in length. If the string is
- * - less than 32 bytes long, it must be
- * - followed by a byte of 00h.
- *
- * Symb - windows setting comes from the Aviator software v1.1
- */
-#define RAY_MIB_SSID_WINDOWS "NETWORK_NAME"
-#define RAY_MIB_SSID_NOT_WINDOWS "WIRELESS_NETWORK"
-#define RAY_MIB_SSID_DEFAULT RAY_MIB_SSID_WINDOWS
-
-/*
- * mib_scan_mode
- *
- * DOC 0x01 - Defines acquisition approach for
- * - terminals operating in either Ad Hoc or
- * - Infrastructure Networks. N/A for APs.
- */
-#define RAY_MIB_SCAN_MODE_PASSIVE 0x00
-#define RAY_MIB_SCAN_MODE_ACTIVE 0x01
-#define RAY_MIB_SCAN_MODE_DEFAULT RAY_MIB_SCAN_MODE_ACTIVE
-
-/*
- * mib_apm_mode
- *
- * DOC 0x00 - Defines power management mode for
- * - stations operating in either Ad Hoc or
- * - Infrastructure Networks. Must always
- * - be 0 for APs.
- */
-#define RAY_MIB_APM_MODE_NONE 0x00
-#define RAY_MIB_APM_MODE_POWERSAVE 0x01
-#define RAY_MIB_APM_MODE_DEFAULT RAY_MIB_APM_MODE_NONE
-
-/*
- * mib_mac_addr
- *
- * DOC - MAC Address to be used by WIC (For
- * - format see Figure 3.2.4.1.2-1, MAC
- * - Address Format). Host may echo card
- * - supplied address or use locally
- * - administered address.
- */
-
-/*
- * mib_frag_thresh
- *
- * DOC 0x7fff - Maximum over-the-air packet size (in
- * - bytes)
- *
- * Symb 0xXXXX - you really should fragment when in low signal
- * - conditions but getting it wrong
- * crucifies the performance
- */
-#define RAY_MIB_FRAG_THRESH_MINIMUM 0
-#define RAY_MIB_FRAG_THRESH_MAXIMUM 2346
-#define RAY_MIB_FRAG_THRESH_DISABLE 0x7fff
-#define RAY_MIB_FRAG_THRESH_DEFAULT RAY_MIB_FRAG_THRESH_DISABLE
-
-/*
- * mib_dwell_time
- *
- * DOC 0x0080 - Defines hop dwell time in Kusec.
- * - Required only of stations which intend
- * - to issue a Start Network command.
- * - Forward Compatible Firmware (Build
- * - 5) requires that the dwell time be one of
- * - the set 16, 32, 64, 128, and 256.
- *
- * Linux.h - 16k * 2**n, n=0-4 in Kus
- * Linux.c-V4 0x0200
- * Linux.c-V5 0x0080 - 128 Kus
- * NetBSD-V4 0x0200 - from Linux
- * NetBSD-V4 0x0400 - "divined"
- * NetBSD-V5 0x0080
- * Symb-V4 0xXXXX - 802.11 dwell time is XXX Kus
- * Symb-V5 0xXXXX - 802.11 dwell time is XXX Kus
- *
- * XXX confirm that 1024Kus is okay for windows driver - how? and see
- * XXX how it is over the maximum
- */
-#define RAY_MIB_DWELL_TIME_MINIMUM 1
-#define RAY_MIB_DWELL_TIME_MAXIMUM 390
-#define RAY_MIB_DWELL_TIME_V4 0x0400
-#define RAY_MIB_DWELL_TIME_V5 0x0080
-
-/*
- * mib_beacon_period
- *
- * DOC 0x0100 - Defines time between target beacon
- * - transmit times (TBTT) in Kusec.
- * - Forward Compatible Firmware (Build
- * - 5) requires that the Beacon Period be an
- * - integral multiple of the Dwell Time (not
- * - exceeding 255 hops).
- * - Required only of stations which intend
- * - to issue a Start Network command.
- *
- * Linux.h - n * a_hop_time in Kus
- * Linux.c-V4 0x0001
- * Linux.c-V5 0x0100 - 256 Kus
- * NetBSD-V4 0x0001 - from Linux
- * NetBSD-V4 0x0000 - "divined"
- * NetBSD-V5 0x0100
- * Symb-V4 0x0001 - best performance is one beacon each dwell XXX
- * Symb-V5 0x0080 - best performance is one beacon each dwell XXX
- *
- * XXX V4 should probably set this to dwell_time
- */
-#define RAY_MIB_BEACON_PERIOD_MINIMUM 1
-#define RAY_MIB_BEACON_PERIOD_MAXIMUM 0xffff
-#define RAY_MIB_BEACON_PERIOD_V4 0x0001
-#define RAY_MIB_BEACON_PERIOD_V5 RAY_MIB_DWELL_TIME_V5
-
-/*
- * mib_dtim_interval
- *
- * DOC 0x01 - Number of beacons per DTIM period.
- * - Only APs will use this parameter, to set
- * - the DTIM period.
- *
- * Linux.h - in beacons
- * Linux.c 0x01
- * NetBSD 0x01
- * Symb 0xXX - need to find out what DTIM is
- */
-#define RAY_MIB_DTIM_INTERVAL_MINIMUM 1
-#define RAY_MIB_DTIM_INTERVAL_MAXIMUM 255
-#define RAY_MIB_DTIM_INTERVAL_DEFAULT 0x01
-
-/*
- * mib_max_retry
- *
- * DOC 31 - Number of times WIC will attempt to
- * - retransmit a failed packet.
- *
- * Linux.c 0x07
- * NetBSD 0x01 - "documented default for 5/6"
- * NetBSD 0x07 - from Linux
- * NetBSD 0x03 - "divined"
- * Symb 0xXX - 7 retries seems okay but check with APS
- */
-#define RAY_MIB_MAX_RETRY_MINIMUM 0
-#define RAY_MIB_MAX_RETRY_MAXIMUM 255
-#define RAY_MIB_MAX_RETRY_DEFAULT 0x07
-
-/*
- * mib_ack_timo
- *
- * DOC 0x86 - Time WIC will wait after completion of
- * - a transmit before timing out anticipated
- * - ACK (2 usec steps). Should equal
- * - SIFS + constant.
- *
- * Linux.c 0xa3
- * NetBSD 0x86 - documented default for 5/6
- * NetBSD 0xa3 - from Linux
- * NetBSD 0xa3 - "divined"
- * Symb 0xXX - this must be a 802.11 defined setting?
- */
-#define RAY_MIB_ACK_TIMO_MINIMUM 0
-#define RAY_MIB_ACK_TIMO_MAXIMUM 255
-#define RAY_MIB_ACK_TIMO_DEFAULT 0xa3
-
-/*
- * mib_sifs
- *
- * DOC 0x1c - SIFS time in usec.
- *
- * Linux.c 0x1d
- * NetBSD 0x1c - documented default for 5/6
- * NetBSD 0x1d - from Linux
- * NetBSD 0x1d - "divined"
- * Symb 0xXX - default SIFS for 802.11
- */
-#define RAY_MIB_SIFS_MINIMUM 28
-#define RAY_MIB_SIFS_MAXIMUM 62
-#define RAY_MIB_SIFS_DEFAULT 0x1d
-
-/*
- * mib_difs
- *
- * DOC 0x82 - DIFS time in usec.
- */
-#define RAY_MIB_DIFS_MINIMUM 130
-#define RAY_MIB_DIFS_MAXIMUM 255
-#define RAY_MIB_DIFS_DEFAULT 0x82
-
-/*
- * mib_pifs
- *
- * DOC 78 - PIFS time in usec. (Not currently
- * - implemented.
- */
-#define RAY_MIB_PIFS_MINIMUM 78
-#define RAY_MIB_PIFS_MAXIMUM 255
-#define RAY_MIB_PIFS_V4 0xce
-#define RAY_MIB_PIFS_V5 0x4e
-
-/*
- * mib_rts_thresh
- *
- * DOC 0x7ffff - Threshold size in bytes below which
- * - messages will not require use of RTS
- * - Protocol.
- *
- * Linux.c 0x7fff
- * NetBSD 0x7fff - disabled
- * Symb 0xXXXX - need to set this realistically to get CTS/RTS mode
- * working right
- */
-#define RAY_MIB_RTS_THRESH_MINIMUM 0
-#define RAY_MIB_RTS_THRESH_MAXIMUM 2346
-#define RAY_MIB_RTS_THRESH_DISABLE 0x7fff
-#define RAY_MIB_RTS_THRESH_DEFAULT RAY_MIB_RTS_THRESH_DISABLE
-
-/*
- * mib_scan_dwell
- *
- * DOC 0x04e2 - Time channel remains clear after probe
- * - transmission prior to hopping to next
- * - channel. (in 2 msec steps).
- *
- * Linux.c-V4 0xfb1e - 128572us
- * Linix.c-V5 0x04e2 - 2500us
- * NetBSD-V4 0xfb1e
- * NetBSD-V5 0x04e2
- * Symb 0xXXXX - Check that v4 h/w can do 2.5ms and default it
- */
-#define RAY_MIB_SCAN_DWELL_MINIMUM 1
-#define RAY_MIB_SCAN_DWELL_MAXIMUM 65535
-#define RAY_MIB_SCAN_DWELL_V4 0xfb1e
-#define RAY_MIB_SCAN_DWELL_V5 0x04e2
-
-/*
- * mib_scan_max_dwell
- *
- * DOC 0x38a4 - Time to remain on a frequency channel
- * - if CCA is detected after probe
- * - transmission. (in 2 usec steps).
- *
- * Linux.c-V4 0xc75c - 102072us
- * Linix.c-V5 0x38a4 - 29000us
- * NetBSD-V4 0xc75c
- * NetBSD-V5 0x38a4
- * Symb 0xXXXX - see above - this may be total time before giving up
- */
-#define RAY_MIB_SCAN_MAX_DWELL_MINIMUM 1
-#define RAY_MIB_SCAN_MAX_DWELL_MAXIMUM 65535
-#define RAY_MIB_SCAN_MAX_DWELL_V4 0xc75c
-#define RAY_MIB_SCAN_MAX_DWELL_V5 0x38a4
-
-/*
- * mib_assoc_timo
- *
- * DOC 0x05 - Time (in hops) a station waits after
- * - transmitting an Association Request
- * - Message before association attempt is
- * - considered failed. N/A for Ad Hoc
- * - Networks and for APs in Infrastructure
- */
-#define RAY_MIB_ASSOC_TIMO_MINIMUM 0
-#define RAY_MIB_ASSOC_TIMO_MAXIMUM 255
-#define RAY_MIB_ASSOC_TIMO_DEFAULT 0x05
-
-/*
- * mib_adhoc_scan_cycle
- *
- * DOC 0x08 - Maximum number of times to cycle
- * - through frequency hopping pattern as
- * - part of scanning during Ad Hoc
- * - Acquisition.
- */
-#define RAY_MIB_ADHOC_SCAN_CYCLE_MINIMUM 1
-#define RAY_MIB_ADHOC_SCAN_CYCLE_MAXIMUM 255
-#define RAY_MIB_ADHOC_SCAN_CYCLE_DEFAULT 0x08
-
-/*
- * mib_infra_scan_cycle
- *
- * DOC 0x02 - Number of times to cycle through
- * - frequency hopping pattern as part of
- * - scanning during Infrastructure Network
- * - Acquisition.
- */
-#define RAY_MIB_INFRA_SCAN_CYCLE_MINIMUM 1
-#define RAY_MIB_INFRA_SCAN_CYCLE_MAXIMUM 255
-#define RAY_MIB_INFRA_SCAN_CYCLE_DEFAULT 0x02
-
-/*
- * mib_infra_super_scan_cycle
- *
- * DOC 0x08 - Number of times to repeat an
- * - Infrastructure scan cycle if no APs are
- * - found before indicating a failure.
- */
-#define RAY_MIB_INFRA_SUPER_SCAN_CYCLE_MINIMUM 1
-#define RAY_MIB_INFRA_SUPER_SCAN_CYCLE_MAXIMUM 255
-#define RAY_MIB_INFRA_SUPER_SCAN_CYCLE_DEFAULT 0x08
-
-/*
- * mib_promisc
- *
- * DOC 0x00 - Controls operation of WIC in
- * - promiscuous mode.
- */
-#define RAY_MIB_PROMISC_DISABLED 0
-#define RAY_MIB_PROMISC_ENABLED 1
-#define RAY_MIB_PROMISC_DEFAULT 0x00
-
-/*
- * mib_uniq_word
- *
- * DOC 0x0cdb - Unique word pattern (Transmitted as
- * - 0CBDh per 802.11)
- */
-#define RAY_MIB_UNIQ_WORD_MINIMUM 0
-#define RAY_MIB_UNIQ_WORD_MAXIMUM 0xffff
-#define RAY_MIB_UNIQ_WORD_DEFAULT 0x0cbd
-
-/*
- * mib_slot_time
- *
- * DOC 0x32 - Slot time in usec
- *
- * Linux.c-V4 0x4e
- * Linix.c-V5 0x32
- * NetBSD-V4 0x4e - Linux
- * NetBSD-V4 0x18 - "divined"
- * NetBSD-V5 0x32 - mentions spec. is 50us i.e. 0x32
- * Symb 0xXX - wtf 0x4e = 78
- */
-#define RAY_MIB_SLOT_TIME_MINIMUM 1
-#define RAY_MIB_SLOT_TIME_MAXIMUM 128
-#define RAY_MIB_SLOT_TIME_V4 0x4e
-#define RAY_MIB_SLOT_TIME_V5 0x32
-
-/*
- * mib_roam_low_snr_thresh
- *
- * DOC 0xff - SNR Threshold for use by roaming
- * - algorithm. [Low power count is
- * - incremented when Beacon is received at
- * - SNR lower than Roaming Low SNR
- * - Threshold.] To disable, set to FFh.
- *
- * Linux.c 0xff
- * NetBSD-V4 0xff - Linux
- * NetBSD-V4 0x30 - "divined"
- * NetBSD-V5 0xff - disabled
- * NetBSD.h - if below this inc count
- * Symb 0xXX - hmm is 0xff really disabled? need this to work
- */
-#define RAY_MIB_ROAM_LOW_SNR_THRESH_MINIMUM 0
-#define RAY_MIB_ROAM_LOW_SNR_THRESH_MAXIMUM 255
-#define RAY_MIB_ROAM_LOW_SNR_THRESH_DISABLED 0xff
-#define RAY_MIB_ROAM_LOW_SNR_THRESH_DEFAULT RAY_MIB_ROAM_LOW_SNR_THRESH_DISABLED
-
-/*
- * mib_low_snr_count
- *
- * DOC 0xff - Threshold that number of consecutive
- * - beacons received at SNR < Roaming
- * - Low SNR Threshold must exceed
- * - before roaming processing begins. To
- * - disable, set to FFh.
- *
- * Linux.c 0xff
- * NetBSD 0x07 - "divined - check" and marked as disabled
- * NetBSD 0xff - disabled
- * NetBSD.h - roam after cnt below thrsh
- * Symb 0xXX - hmm is 0xff really disabled? need
- * - this to work in infrastructure mode with mutliple APs
- */
-#define RAY_MIB_LOW_SNR_COUNT_MINIMUM 0
-#define RAY_MIB_LOW_SNR_COUNT_MAXIMUM 255
-#define RAY_MIB_LOW_SNR_COUNT_DISABLED 0xff
-#define RAY_MIB_LOW_SNR_COUNT_DEFAULT RAY_MIB_LOW_SNR_COUNT_DISABLED
-
-/*
- * mib_infra_missed_beacon_count
- *
- * DOC 0x02 - Threshold that number of consecutive
- * - beacons not received must exceed
- * - before roaming processing begins in an
- * - infrastructure network. To disable, set
- * - to FFh.
- * Linux.c 0x05
- * NetBSD 0x02 - documented default for 5/6
- * NetBSD 0x05 - Linux
- * NetBSD 0x07 - "divined - check, looks fishy"
- * Symb 0xXX - 5 missed beacons is probably okay
- */
-#define RAY_MIB_INFRA_MISSED_BEACON_COUNT_MINIMUM 0
-#define RAY_MIB_INFRA_MISSED_BEACON_COUNT_MAXIMUM 255
-#define RAY_MIB_INFRA_MISSED_BEACON_COUNT_DEFAULT 0x05
-
-/*
- * mib_adhoc_missed_beacon_count
- *
- * DOC 0xff - Threshold that number of consecutive
- * - beacons transmitted by a terminal must
- * - exceed before reacquisition processing
- * - begins in Ad Hoc Network.
- */
-#define RAY_MIB_ADHOC_MISSED_BEACON_COUNT_MINIMUM 0
-#define RAY_MIB_ADHOC_MISSED_BEACON_COUNT_MAXIMUM 255
-#define RAY_MIB_ADHOC_MISSED_BEACON_COUNT_DISABLED 0xff
-#define RAY_MIB_ADHOC_MISSED_BEACON_COUNT_DEFAULT RAY_MIB_ADHOC_MISSED_BEACON_COUNT_DISABLED
-
-/*
- * mib_country_code
- *
- * DOC 0x01 - Country set of hopping patterns
- * - (element value in beacon)
- * - Note: Japan Test is for a special test
- * - mode required by the Japanese
- * - regulatory authorities.
- */
-#define RAY_MIB_COUNTRY_CODE_MIMIMUM 0x01
-#define RAY_MIB_COUNTRY_CODE_MAXIMUM 0x09
-#define RAY_MIB_COUNTRY_CODE_USA 0x01
-#define RAY_MIB_COUNTRY_CODE_EUROPE 0x02
-#define RAY_MIB_COUNTRY_CODE_JAPAN 0x03
-#define RAY_MIB_COUNTRY_CODE_KOREA 0x04
-#define RAY_MIB_COUNTRY_CODE_SPAIN 0x05
-#define RAY_MIB_COUNTRY_CODE_FRANCE 0x06
-#define RAY_MIB_COUNTRY_CODE_ISRAEL 0x07
-#define RAY_MIB_COUNTRY_CODE_AUSTRALIA 0x08
-#define RAY_MIB_COUNTRY_CODE_JAPAN_TEST 0x09
-#define RAY_MIB_COUNTRY_CODE_DEFAULT RAY_MIB_COUNTRY_CODE_USA
-
-/*
- * mib_hop_seq
- *
- * DOC 0x0b - Hop Pattern to use. (Currently 66
- * - US/Europe plus 12 Japanese).
- *
- * NetBSD.h - no longer supported
- */
-#define RAY_MIB_HOP_SEQ_MINIMUM 6
-#define RAY_MIB_HOP_SEQ_MAXIMUM 72
-#define RAY_MIB_HOP_SEQ_DEFAULT 0x0b
-
-/*
- * mib_hop_seq_len
- *
- * DOC 0x4f - Number of frequency channels in
- * - hopping pattern is now set to the value
- * - defined in IEEE802.11 for the selected
- * - Current Country Code.
- */
-#define RAY_MIB_HOP_SEQ_LEN_MINIMUM 1
-#define RAY_MIB_HOP_SEQ_LEN_MAXIMUM 79
-#define RAY_MIB_HOP_SEQ_LEN_V4 0x4e
-#define RAY_MIB_HOP_SEQ_LEN_V5 0x4f
-
-/* XXX need to update these to the spec. XXX */
-
-/*
- * All from here down are the same in Linux/NetBSD and seem to be sane.
- */
-#define RAY_MIB_CW_MAX_V4 0x3f
-#define RAY_MIB_CW_MAX_V5 0x003f
-
-#define RAY_MIB_CW_MIN_V4 0x0f
-#define RAY_MIB_CW_MIN_V5 0x000f
-
-/*
- * Symb 0xXX - these parameters will affect the clear channel
- * assesment false triggering
- *
- */
-#define RAY_MIB_NOISE_FILTER_GAIN_DEFAULT 0x04
-#define RAY_MIB_NOISE_LIMIT_OFFSET_DEFAULT 0x08
-#define RAY_MIB_RSSI_THRESH_OFFSET_DEFAULT 0x28
-#define RAY_MIB_BUSY_THRESH_OFFSET_DEFAULT 0x28
-#define RAY_MIB_SYNC_THRESH_DEFAULT 0x07
-
-#define RAY_MIB_TEST_MODE_NORMAL 0x0
-#define RAY_MIB_TEST_MODE_ANT_1 0x1
-#define RAY_MIB_TEST_MODE_ATN_2 0x2
-#define RAY_MIB_TEST_MODE_ATN_BOTH 0x3
-#define RAY_MIB_TEST_MODE_DEFAULT RAY_MIB_TEST_MODE_NORMAL
-
-#define RAY_MIB_TEST_MIN_CHAN_DEFAULT 0x02
-#define RAY_MIB_TEST_MAX_CHAN_DEFAULT 0x02
-
-#define RAY_MIB_ALLOW_PROBE_RESP_DISALLOW 0x0
-#define RAY_MIB_ALLOW_PROBE_RESP_ALLOW 0x1
-#define RAY_MIB_ALLOW_PROBE_RESP_DEFAULT RAY_MIB_ALLOW_PROBE_RESP_DISALLOW
-
-#define RAY_MIB_PRIVACY_MUST_START_NOWEP 0x0
-#define RAY_MIB_PRIVACY_MUST_START_WEP 0x1
-#define RAY_MIB_PRIVACY_MUST_START_DEFAULT RAY_MIB_PRIVACY_MUST_START_NOWEP
-
-#define RAY_MIB_PRIVACY_CAN_JOIN_NOWEP 0x0
-#define RAY_MIB_PRIVACY_CAN_JOIN_WEP 0x1
-#define RAY_MIB_PRIVACY_CAN_JOIN_DONT_CARE 0x2
-#define RAY_MIB_PRIVACY_CAN_JOIN_DEFAULT RAY_MIB_PRIVACY_CAN_JOIN_NOWEP
-
-#define RAY_MIB_BASIC_RATE_SET_MINIMUM 1
-#define RAY_MIB_BASIC_RATE_SET_MAXIMUM 4
-#define RAY_MIB_BASIC_RATE_SET_500K 1
-#define RAY_MIB_BASIC_RATE_SET_1000K 2
-#define RAY_MIB_BASIC_RATE_SET_1500K 3
-#define RAY_MIB_BASIC_RATE_SET_2000K 4
-#define RAY_MIB_BASIC_RATE_SET_DEFAULT RAY_MIB_BASIC_RATE_SET_2000K
-
-/*
- * IOCTL support
- */
-struct ray_param_req {
- int r_failcause;
- u_int8_t r_paramid;
- u_int8_t r_len;
- u_int8_t r_data[256];
-};
-struct ray_stats_req {
- u_int64_t rxoverflow; /* Number of rx overflows */
- u_int64_t rxcksum; /* Number of checksum errors */
- u_int64_t rxhcksum; /* Number of header checksum errors */
- u_int8_t rxnoise; /* Average receiver level */
-};
-#define RAY_FAILCAUSE_EIDRANGE 1
-#define RAY_FAILCAUSE_ELENGTH 2
-/* device can possibly return up to 255 */
-#define RAY_FAILCAUSE_EDEVSTOP 256
-
-/* Get a param the data is a ray_param_req structure */
-#define SIOCSRAYPARAM SIOCSIFGENERIC
-#define SIOCGRAYPARAM SIOCGIFGENERIC
-/* Get the error counters the data is a ray_stats_req structure */
-#define SIOCGRAYSTATS _IOWR('i', 201, struct ifreq)
-#define SIOCGRAYSIGLEV _IOWR('i', 202, struct ifreq)
-
-#define RAY_NSIGLEVRECS 8
-#define RAY_NSIGLEV 8
-#define RAY_NANTENNA 8
-
-struct ray_siglev {
- u_int8_t rsl_host[ETHER_ADDR_LEN]; /* MAC address */
- u_int8_t rsl_siglevs[RAY_NSIGLEV]; /* levels, newest in [0] */
- u_int8_t rsl_antennas[RAY_NANTENNA]; /* best antenna */
- struct timeval rsl_time; /* time of last packet */
-};
diff --git a/sys/dev/ray/if_rayreg.h b/sys/dev/ray/if_rayreg.h
deleted file mode 100644
index cff653f6d0fb..000000000000
--- a/sys/dev/ray/if_rayreg.h
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- * Copyright (C) 2000
- * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk.
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY DUNCAN BARCLAY AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL DUNCAN BARCLAY OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- *
- */
-
-/* $NetBSD: if_rayreg.h,v 1.1 2000/01/23 23:59:22 chopps Exp $ */
-/*
- * Copyright (c) 2000 Christian E. Hopps
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * CCR registers, appearing in the attribute memory space
- */
-#define RAY_CCR 0xf00 /* CCR register offset */
-#define RAY_COR (RAY_CCR + 0x00) /* config option register */
-#define RAY_CCSR (RAY_CCR + 0x01) /* config/status register */
-#define RAY_PIN (RAY_CCR + 0x02) /* not used by hw */
-#define RAY_SOCKETCOPY (RAY_CCR + 0x03) /* not used by hw */
-#define RAY_HCSIR (RAY_CCR + 0x05) /* HCS intr register */
-#define RAY_ECFIR (RAY_CCR + 0x06) /* ECF intr register */
-/*
- * We don't seem to be able to access these in a simple manner
- */
-#define RAY_AR0 (RAY_CCR + 0x08) /* authorization register 0 (unused) */
-#define RAY_AR1 (RAY_CCR + 0x09) /* authorization register 1 (unused) */
-#define RAY_PMR (RAY_CCR + 0x0a) /* program mode register (unused) */
-#define RAY_TMR (RAY_CCR + 0x0b) /* pc test mode register (unused) */
-#define RAY_FCWR (RAY_CCR + 0x10) /* frequency control word register */
-#define RAY_TMC1 (RAY_CCR + 0x14) /* test mode control 1 (unused) */
-#define RAY_TMC2 (RAY_CCR + 0x15) /* test mode control 1 (unused) */
-#define RAY_TMC3 (RAY_CCR + 0x16) /* test mode control 1 (unused) */
-#define RAY_TMC4 (RAY_CCR + 0x17) /* test mode control 1 (unused) */
-
-/*
- * COR register bits
- */
-#define RAY_COR_CFG_NUM 0x01 /* currently ignored and set */
-#define RAY_COR_CFG_MASK 0x3f /* mask for function */
-#define RAY_COR_LEVEL_IRQ 0x40 /* currently ignored and set */
-#define RAY_COR_RESET 0x80 /* soft-reset the card */
-#define RAY_COR_DEFAULT (RAY_COR_CFG_NUM | RAY_COR_LEVEL_IRQ)
-
-/*
- * CCS register bits
- */
-#define RAY_CCS_NORMAL 0x00 /* normal operation */
-#define RAY_CCS_IRQ 0x02 /* interrupt pending */
-#define RAY_CCS_POWER_DOWN 0x04 /* when written powers down card */
-
-/*
- * HCSIR bits
- *
- * the host can only clear this bit.
- */
-#define RAY_HCSIR_IRQ 0x01 /* indicates an interrupt */
-
-/*
- * ECFIR values
- */
-#define RAY_ECFIR_IRQ 0x01 /* interrupt the card */
-
-/*
- * AR0 values
- * used for testing/programming the card (unused)
- */
-#define RAY_AR0_ON 0x57
-
-/*
- * AR1 values
- * used for testing/programming the card (unused)
- */
-#define RAY_AR1_ON 0x82
-
-/*
- * PMR bits
- * these are used to program the card (unused)
- */
-#define RAY_PMR_NORMAL 0x00 /* normal operation */
-#define RAY_PMR_PC2PM 0x02 /* grant access to firmware flash */
-#define RAY_PMR_PC2CAL 0x10 /* read access to the A/D modem inp */
-#define RAY_PMR_MLSE 0x20 /* read access to the MSLE prom */
-
-/*
- * TMR bits
- * get access to test modes (unused)
- */
-#define RAY_TMR_NORMAL 0x00 /* normal operation */
-#define RAY_TMR_TEST 0x08 /* test mode */
-
-/*
- * FCWR -- frequency control word, values from [0x02,0xA6] map to
- * RF frequency values.
- */
-
-/*
- * 48k of memory
- */
-#define RAY_SRAM_MEM_BASE 0
-#define RAY_SRAM_MEM_SIZE 0xc000
-
-/*
- * offsets into shared ram
- */
-#define RAY_SCB_BASE 0x0000 /* cfg/status/ctl area */
-#define RAY_STATUS_BASE 0x0100
-#define RAY_HOST_TO_ECF_BASE 0x0200
-#define RAY_ECF_TO_HOST_BASE 0x0300
-#define RAY_CCS_BASE 0x0400
-#define RAY_RCS_BASE 0x0800
-#define RAY_APOINT_TIM_BASE 0x0c00
-#define RAY_SSID_LIST_BASE 0x0d00
-#define RAY_TX_BASE 0x1000
-#define RAY_TX_SIZE 0x7000
-#define RAY_TX_END 0x8000
-#define RAY_RX_BASE 0x8000
-#define RAY_RX_END 0xc000
-#define RAY_RX_MASK 0x3fff
-
-/*
- * Startup reporting stucture
- */
-struct ray_ecf_startup_v4 {
- u_int8_t e_status;
- u_int8_t e_station_addr[ETHER_ADDR_LEN];
- u_int8_t e_prg_cksum;
- u_int8_t e_cis_cksum;
- u_int8_t e_resv0[7];
- u_int8_t e_japan_callsign[12];
-};
-struct ray_ecf_startup_v5 {
- u_int8_t e_status;
- u_int8_t e_station_addr[ETHER_ADDR_LEN];
- u_int8_t e_resv0;
- u_int8_t e_rates[8];
- u_int8_t e_japan_callsign[12];
- u_int8_t e_prg_cksum;
- u_int8_t e_cis_cksum;
- u_int8_t e_fw_build_string;
- u_int8_t e_fw_build;
- u_int8_t e_fw_resv;
- u_int8_t e_asic_version;
- u_int8_t e_tibsize;
- u_int8_t e_resv1[29];
-};
-
-/*
- * Startup status word result codes
- */
-#define RAY_ECFS_RESERVED0 0x01
-#define RAY_ECFS_PROC_SELF_TEST 0x02
-#define RAY_ECFS_PROG_MEM_CHECKSUM 0x04
-#define RAY_ECFS_DATA_MEM_TEST 0x08
-#define RAY_ECFS_RX_CALIBRATION 0x10
-#define RAY_ECFS_FW_VERSION_COMPAT 0x20
-#define RAY_ECFS_RERSERVED1 0x40
-#define RAY_ECFS_TEST_COMPLETE 0x80
-#define RAY_ECFS_CARD_OK RAY_ECFS_TEST_COMPLETE
-#define RAY_ECFS_PRINTFB \
- "\020" \
- "\001RESERVED0" \
- "\002PROC_SELF_TEST" \
- "\003PROG_MEM_CHECKSUM" \
- "\004DATA_MEM_TEST" \
- "\005RX_CALIBRATION" \
- "\006FW_VERSION_COMPAT" \
- "\007RERSERVED1" \
- "\010TEST_COMPLETE"
-
-/*
- * Firmware build codes
- */
-#define RAY_ECFS_BUILD_4 0x55
-#define RAY_ECFS_BUILD_5 0x5
-
-/*
- * System Control Block
- */
-#define RAY_SCB_CCSI 0x00 /* host CCS index */
-#define RAY_SCB_RCSI 0x01 /* ecf RCS index */
-
-/*
- * command control structures (for CCSR commands)
- */
-
-/*
- * commands for CCSR
- */
-#define RAY_CMD_DOWNLOAD_PARAMS 0x01 /* download start params */
-#define RAY_CMD_UPDATE_PARAMS 0x02 /* update params */
-#define RAY_CMD_REPORT_PARAMS 0x03 /* report params */
-#define RAY_CMD_UPDATE_MCAST 0x04 /* update mcast list */
-#define RAY_CMD_UPDATE_APM 0x05 /* update power saving mode */
-#define RAY_CMD_START_NET 0x06
-#define RAY_CMD_JOIN_NET 0x07
-#define RAY_CMD_START_ASSOC 0x08
-#define RAY_CMD_TX_REQ 0x09
-#define RAY_CMD_TEST_MEM 0x0a
-#define RAY_CMD_SHUTDOWN 0x0b
-#define RAY_CMD_DUMP_MEM 0x0c
-#define RAY_CMD_START_TIMER 0x0d
-#define RAY_CMD_MAX 0x0e
-
-/*
- * unsolicted commands from the ECF
- */
-#define RAY_ECMD_RX_DONE 0x80 /* process rx packet */
-#define RAY_ECMD_REJOIN_DONE 0x81 /* rejoined the network */
-#define RAY_ECMD_ROAM_START 0x82 /* romaining started */
-#define RAY_ECMD_JAPAN_CALL_SIGNAL 0x83 /* japan test thing */
-
-
-/*
- * Configure/status/control memory
- */
-struct ray_csc {
- u_int8_t csc_mrxo_own; /* 0 ECF writes, 1 host write */
- u_int8_t csc_mrxc_own; /* 0 ECF writes, 1 host write */
- u_int8_t csc_rxhc_own; /* 0 ECF writes, 1 host write */
- u_int8_t csc_resv;
- u_int16_t csc_mrx_overflow; /* ECF incs on rx overflow */
- u_int16_t csc_mrx_cksum; /* ECF incs on cksum error */
- u_int16_t csc_rx_hcksum; /* ECF incs on header cksum error */
- u_int8_t csc_rx_noise; /* average RSL measuremant */
-};
-
-/*
- * CCS area
- */
-#define RAY_CCS_LINK_NULL 0xff
-#define RAY_CCS_SIZE 16
-
-#define RAY_CCS_TX_FIRST 0
-#define RAY_CCS_TX_LAST 13
-#define RAY_CCS_NTX (RAY_CCS_TX_LAST - RAY_CCS_TX_FIRST + 1)
-#define RAY_TX_BUF_SIZE 2048
-#define RAY_CCS_CMD_FIRST 14
-#define RAY_CCS_CMD_LAST 63
-#define RAY_CCS_NCMD (RAY_CCS_CMD_LAST - RAY_CCS_CMD_FIRST + 1)
-#define RAY_CCS_LAST 63
-
-#define RAY_CCS_INDEX(ccs) (((ccs) - RAY_CCS_BASE) / RAY_CCS_SIZE)
-#define RAY_CCS_ADDRESS(i) (RAY_CCS_BASE + (i) * RAY_CCS_SIZE)
-
-/*
- * RCS area
- */
-#define RAY_RCS_FIRST 64
-#define RAY_RCS_LAST 127
-
-/*
- * CCS commands
- */
-struct ray_cmd {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
-};
-
-#define RAY_CCS_STATUS_FREE 0x0
-#define RAY_CCS_STATUS_BUSY 0x1
-#define RAY_CCS_STATUS_COMPLETE 0x2
-#define RAY_CCS_STATUS_FAIL 0x3
-#define RAY_CCS_STATUS_STRINGS { \
- "free", \
- "busy", \
- "complete", \
- "fail" \
-}
-
-/* RAY_CMD_UPDATE_PARAMS */
-struct ray_cmd_update {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_paramid;
- u_int8_t c_nparam;
- u_int8_t c_failcause;
-};
-
-/* RAY_CMD_REPORT_PARAMS */
-struct ray_cmd_report {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_paramid;
- u_int8_t c_nparam;
- u_int8_t c_failcause;
- u_int8_t c_len;
-};
-
-/* RAY_CMD_UPDATE_MCAST */
-struct ray_cmd_update_mcast {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_nmcast;
-};
-
-/* RAY_CMD_UPDATE_APM */
-struct ray_cmd_udpate_apm {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_mode;
-};
-
-/* RAY_CMD_START_NET and RAY_CMD_JOIN_NET */
-struct ray_cmd_net {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_upd_param;
- u_int8_t c_bss_id[ETHER_ADDR_LEN];
- u_int8_t c_inited;
- u_int8_t c_def_txrate;
- u_int8_t c_encrypt;
-};
-/* Parameters passed in HOST_TO_ECF section when c_upd_param is set in
- * ray_cmd_net. */
-struct ray_net_params {
- u_int8_t p_net_type;
- u_int8_t p_ssid[32];
- u_int8_t p_privacy_must_start;
- u_int8_t p_privacy_can_join;
-};
-
-/* RAY_CMD_START_ASSOC */
-struct ray_cmd_update_assoc {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_astatus;
- u_int8_t c_aid[2];
-};
-
-/* RAY_CMD_TX_REQ */
-struct ray_cmd_tx {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_bufp[2];
- u_int8_t c_len[2];
- u_int8_t c_resv[5];
- u_int8_t c_tx_rate;
- u_int8_t c_apm_mode;
- u_int8_t c_nretry;
- u_int8_t c_antenna;
-};
-struct ray_cmd_tx_4 {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_bufp[2];
- u_int8_t c_len[2];
- u_int8_t c_addr[ETHER_ADDR_LEN];
- u_int8_t c_apm_mode;
- u_int8_t c_nretry;
- u_int8_t c_antenna;
-};
-
-/* RAY_CMD_DUMP_MEM */
-struct ray_cmd_dump_mem {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_memtype;
- u_int8_t c_memp[2];
- u_int8_t c_len;
-};
-
-/* RAY_CMD_START_TIMER */
-struct ray_cmd_start_timer {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_duration[2];
-};
-
-/* RAY_ECMD_RX_DONE */
-struct ray_cmd_rx {
- u_int8_t c_status; /* ccs generic header */
- u_int8_t c_cmd; /* " */
- u_int8_t c_link; /* " */
- u_int8_t c_bufp[2]; /* buffer pointer */
- u_int8_t c_len[2]; /* length */
- u_int8_t c_siglev; /* signal level */
- u_int8_t c_nextfrag; /* next fragment in packet */
- u_int8_t c_pktlen[2]; /* total packet length */
- u_int8_t c_antenna; /* ant. with best reception */
- u_int8_t c_updbss; /* only 1 for beacon messages */
-};
-
-/*
- * Transmit scratch space and phy header structures
- */
-struct ray_tx_tib {
- u_int8_t t_ccs_index;
- u_int8_t t_psm;
- u_int8_t t_pass_fail;
- u_int8_t t_retry_count;
- u_int8_t t_max_retries;
- u_int8_t t_frags_remaining;
- u_int8_t t_no_rb;
- u_int8_t t_rts_reqd;
- u_int8_t t_csma_tx_cntrl_2;
- u_int8_t t_sifs_tx_cntrl_2;
- u_int8_t t_tx_dma_addr_1[2];
- u_int8_t t_tx_dma_addr_2[2];
- u_int8_t t_var_dur_2mhz[2];
- u_int8_t t_var_dur_1mhz[2];
- u_int8_t t_max_dur_2mhz[2];
- u_int8_t t_max_dur_1mhz[2];
- u_int8_t t_hdr_len;
- u_int8_t t_max_frag_len[2];
- u_int8_t t_var_len[2];
- u_int8_t t_phy_hdr_4;
- u_int8_t t_mac_hdr_1;
- u_int8_t t_mac_hdr_2;
- u_int8_t t_sid[2];
-};
-
-struct ray_tx_phy_header {
- u_int8_t t_sfd[2];
- u_int8_t t_hdr_3;
- u_int8_t t_hdr_4;
-};
diff --git a/sys/dev/ray/if_rayvar.h b/sys/dev/ray/if_rayvar.h
deleted file mode 100644
index d366918b213c..000000000000
--- a/sys/dev/ray/if_rayvar.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * Copyright (C) 2000
- * Dr. Duncan McLennan Barclay, dmlb@ragnet.demon.co.uk.
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY DUNCAN BARCLAY AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL DUNCAN BARCLAY OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- *
- */
-
-/*
- * Network parameters, used twice in sotfc to store what we want and what
- * we have.
- *
- * The current parameters are ONLY valid in a function called from the runq
- * and should not be accessed directly from ioctls.
- */
-struct ray_nw_param {
- struct ray_cmd_net p_1;
- struct ray_net_params \
- p_2;
- u_int8_t np_ap_status;
- int np_promisc;
-};
-#define np_upd_param p_1.c_upd_param
-#define np_bss_id p_1.c_bss_id
-#define np_inited p_1.c_inited
-#define np_def_txrate p_1.c_def_txrate
-#define np_encrypt p_1.c_encrypt
-#define np_net_type p_2.p_net_type
-#define np_ssid p_2.p_ssid
-#define np_priv_start p_2.p_privacy_must_start
-#define np_priv_join p_2.p_privacy_can_join
-
-/*
- * One of these structures per allocated device
- */
-struct ray_softc {
-
- device_t dev; /* Device */
- struct arpcom arpcom; /* Ethernet common */
- struct callout_handle
- tx_timerh; /* Handle for tx timer */
- struct callout_handle
- com_timerh; /* Handle for command timer */
-
- bus_space_tag_t am_bst; /* Bus space tag for attribute memory */
- bus_space_handle_t am_bsh; /* Bus space handle for attribute mem */
- int am_rid; /* Resource id for attribute memory */
- struct resource* am_res; /* Resource for attribute memory */
- bus_space_tag_t cm_bst; /* Bus space tag for common memory */
- bus_space_handle_t cm_bsh; /* Bus space handle for common memory */
- int cm_rid; /* Resource id for common memory */
- struct resource* cm_res; /* Resource for common memory */
- int irq_rid; /* Resource id for irq */
- struct resource* irq_res; /* Resource for irq */
- void * irq_handle; /* Handle for irq handler */
-
- u_char gone; /* 1 = Card bailed out */
-
- int framing; /* Packet framing types */
-
- struct ray_ecf_startup_v5
- sc_ecf_startup; /* Startup info from card */
-
- TAILQ_HEAD(ray_comq, ray_comq_entry)
- sc_comq; /* Command queue */
-
- struct ray_nw_param sc_c; /* current network params */
- struct ray_nw_param sc_d; /* desired network params */
- int sc_havenet; /* true if we have a network */
- u_int8_t sc_ccsinuse[64];/* ccss' in use -- not for tx */
-
- int sc_checkcounters;
- u_int64_t sc_rxoverflow; /* Number of rx overflows */
- u_int64_t sc_rxcksum; /* Number of checksum errors */
- u_int64_t sc_rxhcksum; /* Number of header checksum errors */
- u_int8_t sc_rxnoise; /* Average receiver level */
- struct ray_siglev sc_siglevs[RAY_NSIGLEVRECS]; /* Antenna/levels */
-};
-
-#define sc_station_addr sc_ecf_startup.e_station_addr
-#define sc_version sc_ecf_startup.e_fw_build_string
-#define sc_tibsize sc_ecf_startup.e_tibsize
-
-/*
- * Command queue definitions
- */
-typedef void (*ray_comqfn_t)(struct ray_softc *sc, struct ray_comq_entry *com);
-MALLOC_DECLARE(M_RAYCOM);
-MALLOC_DEFINE(M_RAYCOM, "raycom", "Raylink command queue entry");
-struct ray_comq_entry {
- TAILQ_ENTRY(ray_comq_entry) c_chain; /* Tail queue. */
- ray_comqfn_t c_function; /* Function to call */
- int c_flags; /* Flags */
- u_int8_t c_retval; /* Return value */
- void *c_wakeup; /* Sleeping on this */
- size_t c_ccs; /* CCS structure */
- struct ray_nw_param
- c_desired; /* network settings */
- struct ray_param_req
- *c_pr; /* MIB report/update */
- char *c_mesg;
-};
-
-/*
- * Framing types
- */
-/* XXX maybe better as part of the if structure? */
-#define SC_FRAMING_WEBGEAR 0
-
-/*
- * Macro's and constants
- */
-static int mib_info[RAY_MIB_MAX+1][3] = RAY_MIB_INFO;
-
-/* Indirections for reading/writing memory - from NetBSD/if_ray.c */
-#ifndef offsetof
-#define offsetof(type, member) \
- ((size_t)(&((type *)0)->member))
-#endif /* offsetof */
-
-#if RAY_NEED_CM_REMAPPING
-
-#define ATTR_READ_1(sc, off) \
- ray_attr_read_1((sc), (off))
-
-#define ATTR_WRITE_1(sc, off, val) \
- ray_attr_write_1((sc), (off), (val))
-
-#else
-
-#define ATTR_READ_1(sc, off) \
- ((u_int8_t)bus_space_read_1((sc)->am_bst, (sc)->am_bsh, (off)))
-
-#define ATTR_WRITE_1(sc, off, val) \
- bus_space_write_1((sc)->am_bst, (sc)->am_bsh, (off), (val))
-
-#endif /* RAY_NEED_CM_REMAPPING */
-
-#define SRAM_READ_1(sc, off) \
- ((u_int8_t)bus_space_read_1((sc)->cm_bst, (sc)->cm_bsh, (off)))
-
-#define SRAM_READ_REGION(sc, off, p, n) \
- bus_space_read_region_1((sc)->cm_bst, (sc)->cm_bsh, (off), (void *)(p), (n))
-
-#define SRAM_READ_FIELD_1(sc, off, s, f) \
- SRAM_READ_1((sc), (off) + offsetof(struct s, f))
-
-#define SRAM_READ_FIELD_2(sc, off, s, f) \
- ((((u_int16_t)SRAM_READ_1((sc), (off) + offsetof(struct s, f)) << 8) \
- |(SRAM_READ_1((sc), (off) + 1 + offsetof(struct s, f)))))
-
-#define SRAM_READ_FIELD_N(sc, off, s, f, p, n) \
- SRAM_READ_REGION((sc), (off) + offsetof(struct s, f), (p), (n))
-
-#define SRAM_WRITE_1(sc, off, val) \
- bus_space_write_1((sc)->cm_bst, (sc)->cm_bsh, (off), (val))
-
-#define SRAM_WRITE_REGION(sc, off, p, n) \
- bus_space_write_region_1((sc)->cm_bst, (sc)->cm_bsh, (off), (void *)(p), (n))
-
-#define SRAM_WRITE_FIELD_1(sc, off, s, f, v) \
- SRAM_WRITE_1((sc), (off) + offsetof(struct s, f), (v))
-
-#define SRAM_WRITE_FIELD_2(sc, off, s, f, v) do { \
- SRAM_WRITE_1((sc), (off) + offsetof(struct s, f), (((v) >> 8 ) & 0xff)); \
- SRAM_WRITE_1((sc), (off) + 1 + offsetof(struct s, f), ((v) & 0xff)); \
-} while (0)
-
-#define SRAM_WRITE_FIELD_N(sc, off, s, f, p, n) \
- SRAM_WRITE_REGION((sc), (off) + offsetof(struct s, f), (p), (n))
-
-/* Flags for runq entries */
-#define RAY_COM_FWOK 0x0001 /* Wakeup on completion */
-#define RAY_COM_FRUNNING 0x0002 /* This one running */
-#define RAY_COM_FCOMPLETED 0x0004 /* This one completed */
-#define RAY_COM_FWAIT 0x0008 /* Do not run the queue */
-#define RAY_COM_FCHKRUNNING 0x0010 /* Check IFF_RUNNING */
-#define RAY_COM_FDETACHED 0x0020 /* Card is gone */
-#define RAY_COM_FWOKEN 0x0040 /* Woken by detach */
-#define RAY_COM_FLAGS_PRINTFB \
- "\020" \
- "\001WOK" \
- "\002RUNNING" \
- "\003COMPLETED" \
- "\004WAIT" \
- "\005CHKRUNNING" \
- "\006DETACHED"
-
-#define RAY_COM_NEEDS_TIMO(cmd) ( \
- (cmd == RAY_CMD_DOWNLOAD_PARAMS) || \
- (cmd == RAY_CMD_UPDATE_PARAMS) || \
- (cmd == RAY_CMD_UPDATE_MCAST) \
- )
-
-#ifndef RAY_COM_TIMEOUT
-#define RAY_COM_TIMEOUT (hz / 2)
-#endif
-
-#ifndef RAY_RESET_TIMEOUT
-#define RAY_RESET_TIMEOUT (10 * hz)
-#endif
-
-#ifndef RAY_TX_TIMEOUT
-#define RAY_TX_TIMEOUT (hz / 2)
-#endif
-
-#define RAY_CCS_FREE(sc, ccs) \
- SRAM_WRITE_FIELD_1((sc), (ccs), ray_cmd, c_status, RAY_CCS_STATUS_FREE)
-
-#define RAY_ECF_READY(sc) \
- (!(ATTR_READ_1((sc), RAY_ECFIR) & RAY_ECFIR_IRQ))
-
-#define RAY_ECF_START_CMD(sc) ATTR_WRITE_1((sc), RAY_ECFIR, RAY_ECFIR_IRQ)
-
-#define RAY_HCS_CLEAR_INTR(sc) ATTR_WRITE_1((sc), RAY_HCSIR, 0)
-
-#define RAY_HCS_INTR(sc) (ATTR_READ_1((sc), RAY_HCSIR) & RAY_HCSIR_IRQ)
-
-#define RAY_PANIC(sc, fmt, args...) do { \
- panic("ray%d: %s(%d) " fmt "\n", device_get_unit((sc)->dev), \
- __FUNCTION__ , __LINE__ , ##args); \
-} while (0)
-
-#define RAY_PRINTF(sc, fmt, args...) do { \
- device_printf((sc)->dev, "%s(%d) " fmt "\n", \
- __FUNCTION__ , __LINE__ , ##args); \
-} while (0)
-
-#define RAY_COM_MALLOC(function, flags) \
- ray_com_malloc((function), (flags), __STRING(function));
-
-#define RAY_COM_FREE(com, ncom) do { \
- int i; \
- for (i = 0; i < ncom; i++) \
- FREE(com[i], M_RAYCOM); \
-} while (0)
-
-/*
- * This macro handles adding commands to the runq and quickly
- * getting away when the card is detached. The macro returns
- * from the current function with ENXIO.
- */
-#define RAY_COM_RUNQ(sc, com, ncom, mesg, error) do { \
- (error) = ray_com_runq_add((sc), (com), (ncom), (mesg)); \
- if ((error) == ENXIO) { \
- RAY_COM_FREE((com), (ncom)); \
- return (error); \
- } else if ((error) && ((error) != ENXIO)) \
- RAY_PRINTF(sc, "got error from runq 0x%x", (error)); \
-} while (0)
-
-
-#define RAY_COM_INIT(com, function, flags) \
- ray_com_init((com), (function), (flags), __STRING(function));
-
-#ifndef RAY_COM_CHECK
-#define RAY_COM_CHECK(sc, com)
-#endif /* RAY_COM_CHECK */
-
-#ifndef RAY_MBUF_DUMP
-#define RAY_MBUF_DUMP(sc, mask, m, s)
-#endif /* RAY_MBUF_DUMP */
-
-#ifndef RAY_RECERR
-#define RAY_RECERR(sc, fmt, args...) do { \
- struct ifnet *ifp = &(sc)->arpcom.ac_if; \
- if (ifp->if_flags & IFF_DEBUG) { \
- device_printf((sc)->dev, "%s(%d) " fmt "\n", \
- __FUNCTION__ , __LINE__ , ##args); \
-} } while (0)
-#endif /* RAY_RECERR */
-
-/*
- * The driver assumes that the common memory is always mapped in,
- * for the moment we ensure this with the following macro at the
- * head of each function and by using functions to access attribute
- * memory. Hysterical raisins led to the non-"reflexive" approach.
- * Roll on NEWCARD and it can all die...
- */
-#if RAY_NEED_CM_REMAPPING
-#define RAY_MAP_CM(sc) ray_attr_mapcm(sc)
-#else
-#define RAY_MAP_CM(sc)
-#endif /* RAY_NEED_CM_REMAPPING */