i386 cpu.h
[minix3.git] / drivers / orinoco / orinoco.h
blob6adb838b52fb0c5ba0281ae84c9e95d8baafdde5
1 /*
2 * orinoco.h
4 * This file contains the most important structure for the driver: t_or
5 * and some configurable definitions
7 * Created by Stevens Le Blond <slblond@few.vu.nl>
8 * and Michael Valkering <mjvalker@cs.vu.nl>
9 */
11 #include <net/gen/ether.h>
12 #include <net/gen/eth_io.h>
14 #define NR_RX_BUFS 32
16 #define LARGE_KEY_LENGTH 13
17 #define IW_ESSID_MAX_SIZE 32
18 #define IOVEC_NR 16
19 #define OR_NAME "orinoco#n"
21 #define IEEE802_11_HLEN 30
22 #define IEEE802_11_DATA_LEN (2304)
23 #define IEEE802_11_FRAME_LEN (IEEE802_11_DATA_LEN + IEEE802_11_HLEN + 3)
25 typedef struct s_or
27 int or_irq;
28 int or_hook_id;
29 int or_mode;
30 int or_flags;
31 char *or_model;
32 int or_client;
33 int or_link_up;
34 int or_got_int;
35 int or_tx_alive;
36 int or_send_int;
37 int or_clear_rx;
38 u32_t or_base_port;
39 int or_need_reset;
40 int or_report_link;
42 /* Events */
43 int or_ev_rx;
44 int or_ev_tx;
45 int or_ev_info;
46 int or_ev_txexc;
47 int or_ev_alloc;
48 int connected;
49 u16_t channel_mask;
50 u16_t channel;
51 u16_t ap_density;
52 u16_t rts_thresh;
53 int bitratemode;
54 int last_linkstatus;
55 int max_data_len;
56 int port_type;
58 /* Rx */
59 phys_bytes or_rx_buf;
60 vir_bytes or_read_s;
61 u16_t rxfid[NR_RX_BUFS];
62 int rx_length[NR_RX_BUFS];
63 u8_t rx_buf[NR_RX_BUFS][IEEE802_11_FRAME_LEN];
64 u8_t rx_offset[NR_RX_BUFS];
65 int rx_first;
66 int rx_last;
67 int rx_current;
69 /* Tx */
70 u16_t or_nicbuf_size;
71 vir_bytes or_transm_s;
72 int or_tx_head;
73 int or_tx_tail;
75 struct
77 int ret_busy;
78 u16_t or_txfid;
79 } or_tx;
80 u32_t or_ertxth;
82 /* PCI related */
83 int or_seen;
84 int devind;
86 /* 'large' items */
87 irq_hook_t or_hook;
88 eth_stat_t or_stat;
89 message or_rx_mess;
90 message or_tx_mess;
91 ether_addr_t or_address;
92 iovec_t or_iovec[IOVEC_NR];
93 iovec_s_t or_iovec_s[IOVEC_NR];
94 char or_name[sizeof (OR_NAME)];
95 hermes_t hw;
96 char nick[IW_ESSID_MAX_SIZE + 1];
99 } t_or;