xref: /openbsd/sys/dev/ic/if_wivar.h (revision d485f761)
1 /*	$OpenBSD: if_wivar.h,v 1.3 2001/06/09 20:17:21 millert Exp $	*/
2 
3 /*
4  * Copyright (c) 1997, 1998, 1999
5  *	Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
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. All advertising materials mentioning features or use of this software
16  *    must display the following acknowledgement:
17  *	This product includes software developed by Bill Paul.
18  * 4. Neither the name of the author nor the names of any co-contributors
19  *    may be used to endorse or promote products derived from this software
20  *    without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
26  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
32  * THE POSSIBILITY OF SUCH DAMAGE.
33  *
34  *	From: if_wireg.h,v 1.5 1999/07/20 20:03:42 wpaul Exp $
35  */
36 
37 struct wi_softc	{
38 #ifndef __FreeBSD__
39 	struct device		sc_dev;
40 #endif	/* !__FreeBSD__ */
41 	struct arpcom		arpcom;
42 	struct ifmedia		ifmedia;
43 	bus_space_handle_t	wi_bhandle;
44 	bus_space_tag_t		wi_btag;
45 	int			wi_tx_data_id;
46 	int			wi_tx_mgmt_id;
47 	int			wi_gone;
48 	int			wi_if_flags;
49 	u_int16_t		wi_ptype;
50 	u_int16_t		wi_portnum;
51 	u_int16_t		wi_max_data_len;
52 	u_int16_t		wi_rts_thresh;
53 	u_int16_t		wi_ap_density;
54 	u_int16_t		wi_tx_rate;
55 	u_int16_t		wi_create_ibss;
56 	u_int16_t		wi_channel;
57 	u_int16_t		wi_pm_enabled;
58 	u_int16_t		wi_mor_enabled;
59 	u_int16_t		wi_max_sleep;
60 	u_int16_t		wi_authtype;
61 	u_int16_t		wi_roaming;
62 
63 	char			wi_node_name[32];
64 	char			wi_net_name[32];
65 	char			wi_ibss_name[32];
66 
67 	u_int8_t		wi_txbuf[1596];
68 	int			wi_has_wep;
69 	int			wi_use_wep;
70 	int			wi_tx_key;
71 	struct wi_ltv_keys	wi_keys;
72 	struct wi_counters	wi_stats;
73 	void			*sc_ih;
74 	struct timeout		sc_timo;
75 	int			sc_prism2;
76 	int			sc_prism2_ver;
77 };
78 
79 #define WI_PRT_FMT "%s"
80 #define WI_PRT_ARG(sc)	(sc)->sc_dev.dv_xname
81