wivar.h revision 1.7
1/* $NetBSD: wivar.h,v 1.7 2002/01/05 20:10:53 explorer 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 35 36/* 37 * FreeBSD driver ported to NetBSD by Bill Sommerfeld in the back of the 38 * Oslo IETF plenary meeting. 39 */ 40 41struct wi_softc { 42 struct device sc_dev; 43 struct ethercom sc_ethercom; 44 struct ifnet *sc_ifp; 45 void *sc_ih; /* interrupt handler */ 46 int (*sc_enable) __P((struct wi_softc *)); 47 void (*sc_disable) __P((struct wi_softc *)); 48 49 int sc_attached; 50 int sc_enabled; 51 int sc_prism2; 52 int sc_prism2_ver; 53 int sc_pci; /* attach to PCI-Bus */ 54 55 bus_space_tag_t sc_iot; /* bus cookie */ 56 bus_space_handle_t sc_ioh; /* bus i/o handle */ 57 58 struct callout wi_inquire_ch; 59 60 u_int8_t sc_macaddr[ETHER_ADDR_LEN]; 61 62 struct ifmedia sc_media; 63 int wi_tx_data_id; 64 int wi_tx_mgmt_id; 65 int wi_if_flags; 66 u_int16_t wi_ptype; 67 u_int16_t wi_portnum; 68 u_int16_t wi_max_data_len; 69 u_int16_t wi_rts_thresh; 70 u_int16_t wi_ap_density; 71 u_int16_t wi_tx_rate; 72 u_int16_t wi_create_ibss; 73 u_int16_t wi_channel; 74 u_int16_t wi_pm_enabled; 75 u_int16_t wi_mor_enabled; 76 u_int16_t wi_max_sleep; 77 u_int16_t wi_authtype; 78 u_int16_t wi_roaming; 79 80 struct ieee80211_nwid wi_nodeid; 81 struct ieee80211_nwid wi_netid; 82 struct ieee80211_nwid wi_ibssid; 83 84 u_int16_t wi_txbuf[1596 / 2]; 85 int wi_has_wep; 86 int wi_use_wep; 87 int wi_tx_key; 88 struct wi_ltv_keys wi_keys; 89 struct wi_counters wi_stats; 90}; 91 92int wi_attach __P((struct wi_softc *)); 93int wi_detach __P((struct wi_softc *)); 94int wi_activate __P((struct device *, enum devact)); 95int wi_intr __P((void *arg)); 96void wi_power __P((struct wi_softc *, int)); 97void wi_shutdown __P((struct wi_softc *)); 98void wi_pci_reset __P((struct wi_softc *)); 99