pccard: Remove wi(4) driver
Remove wi(4). pccard is going away, and wi only supports PC Card devices, though it has a minor amount of glue to also support PCI cards. However, removing the one without removing the other is hard, so the whole driver is being removed. Relnotes: Yes
This commit is contained in:
parent
23e124c78b
commit
a21def4d56
@ -36,10 +36,14 @@
|
||||
# xargs -n1 | sort | uniq -d;
|
||||
# done
|
||||
|
||||
# 20210108: retire cmx, ng_bt3c drivers
|
||||
# 20210108: retire cmx, ng_bt3c, wi drivers
|
||||
OLD_FILES+=usr/include/dev/wi/if_wireg.h
|
||||
OLD_FILES+=usr/include/dev/wi/if_wavelan_ieee.h
|
||||
OLD_FILES+=usr/include/dev/wi/if_wivar.h
|
||||
OLD_FILES+=usr/sbin/bt3cfw
|
||||
OLD_FILES+=usr/share/man/man4/cmw.4.gz
|
||||
OLD_FILES+=usr/share/man/man4/ng_bt3c.4.gz
|
||||
OLD_FILES+=usr/share/man/man4/wi.4.gz
|
||||
OLD_FILES+=usr/share/man/man8/bt3cfw.8.gz
|
||||
|
||||
# 20210107: retire a.out support
|
||||
|
@ -46,7 +46,7 @@ LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \
|
||||
dev/hwpmc dev/hyperv \
|
||||
dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \
|
||||
dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \
|
||||
dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd dev/wi \
|
||||
dev/smbus dev/speaker dev/tcp_log dev/veriexec dev/vkbd \
|
||||
fs/devfs fs/fdescfs fs/msdosfs fs/nfs fs/nullfs \
|
||||
fs/procfs fs/smbfs fs/udf fs/unionfs \
|
||||
geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \
|
||||
|
@ -580,7 +580,6 @@ MAN= aac.4 \
|
||||
${_vtnet.4} \
|
||||
watchdog.4 \
|
||||
${_wbwd.4} \
|
||||
wi.4 \
|
||||
witness.4 \
|
||||
wlan.4 \
|
||||
wlan_acl.4 \
|
||||
@ -763,7 +762,6 @@ MLINKS+=vr.4 if_vr.4
|
||||
MLINKS+=vte.4 if_vte.4
|
||||
MLINKS+=${_vtnet.4} ${_if_vtnet.4}
|
||||
MLINKS+=watchdog.4 SW_WATCHDOG.4
|
||||
MLINKS+=wi.4 if_wi.4
|
||||
MLINKS+=${_wpi.4} ${_if_wpi.4}
|
||||
MLINKS+=xl.4 if_xl.4
|
||||
|
||||
|
@ -1,380 +0,0 @@
|
||||
.\" Copyright (c) 1997, 1998, 1999
|
||||
.\" Bill Paul <wpaul@ctr.columbia.edu>. 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. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by Bill Paul.
|
||||
.\" 4. 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 Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
|
||||
.\" 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$
|
||||
.\" $OpenBSD: wi.4tbl,v 1.14 2002/04/29 19:53:50 jsyn Exp $
|
||||
.\"
|
||||
.Dd July 23, 2011
|
||||
.Dt WI 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm wi
|
||||
.Nd "Lucent Hermes, and Intersil PRISM IEEE 802.11 driver"
|
||||
.Sh SYNOPSIS
|
||||
To compile this driver into the kernel,
|
||||
place the following lines in your
|
||||
kernel configuration file:
|
||||
.Bd -ragged -offset indent
|
||||
.Cd "device wi"
|
||||
.Cd "device wlan"
|
||||
.Ed
|
||||
.Pp
|
||||
Alternatively, to load the driver as a
|
||||
module at boot time, place the following line in
|
||||
.Xr loader.conf 5 :
|
||||
.Bd -literal -offset indent
|
||||
if_wi_load="YES"
|
||||
.Ed
|
||||
.Sh DEPRECATION NOTICE
|
||||
This driver is scheduled for removal prior to the release of
|
||||
.Fx 13.0
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
driver provides support for 802.11b wireless network adapters based around
|
||||
the Lucent Hermes, Intersil PRISM-II, Intersil PRISM-2.5, and Intersil
|
||||
Prism-3 chipsets.
|
||||
All chipsets provide a similar interface to the driver.
|
||||
Only the Intersil chipsets support access point operation or WPA.
|
||||
Very old versions of firmware are not supported at all.
|
||||
Older versions of the firmware that are supported may severely limit
|
||||
the ability to use these cards in newer networks.
|
||||
Only relatively recent versions of Intersil firmware supports WPA.
|
||||
See CAVEATS for details.
|
||||
All host/device interaction is via programmed I/O, even on those cards
|
||||
that support a DMA interface.
|
||||
.Pp
|
||||
For more information on configuring this device, see
|
||||
.Xr ifconfig 8 .
|
||||
.Pp
|
||||
.Nm
|
||||
supports
|
||||
.Cm station ,
|
||||
.Cm adhoc ,
|
||||
.Cm adhoc-demo ,
|
||||
.Cm hostap ,
|
||||
and
|
||||
.Cm monitor
|
||||
mode operation.
|
||||
Only one
|
||||
virtual interface may be configured at a time.
|
||||
For more information on configuring this device, see
|
||||
.Xr ifconfig 8 .
|
||||
.Pp
|
||||
Cards supported by the
|
||||
.Nm
|
||||
driver come in a variety of packages, though the most common
|
||||
are of the PCMCIA type.
|
||||
In many cases, the PCI version of a wireless card is simply
|
||||
a PCMCIA card bundled with a PCI adapter.
|
||||
The PCI adapters come in two flavors: true PCMCIA bridges and
|
||||
dumb PCMCIA bridges.
|
||||
A true PCMCIA bridge (such as those sold by Lucent) will attach
|
||||
as a real PCMCIA controller.
|
||||
The wireless card will then attach to the PCMCIA bus.
|
||||
Wireless cards in PCMCIA slots may be inserted and ejected on the fly.
|
||||
.Pp
|
||||
A dumb bridge, on the other hand, does not show up as a true PCMCIA bus.
|
||||
The wireless card will simply appear to the host as a normal PCI
|
||||
device and will not require any PCMCIA support.
|
||||
Cards in this type of adapter should only be removed when the
|
||||
machine is powered down.
|
||||
.Pp
|
||||
The following cards are among those supported by the
|
||||
.Nm
|
||||
driver:
|
||||
.Pp
|
||||
.Bl -column -compact "Linksys Instant Wireless WPC11 2.5" "Spectrum24" "PCI or PCMCIA"
|
||||
.Em "Card Chip Bus"
|
||||
3Com AirConnect 3CRWE777A Prism-II PCI
|
||||
Accton airDirect WN3301 PCMCIA
|
||||
ACTIONTEC HWC01170 Prism-2.5 PCMCIA
|
||||
Adaptech ANW-8030 Prism-3 PCMCIA
|
||||
Addtron AWP-100 Prism-II PCMCIA
|
||||
Adtec Adlink/340C Prism-II PCMCIA
|
||||
Airvast WN 100 Prism-3 PCMCIA
|
||||
Airway 802.11 Adapter PCMCIA
|
||||
Agere Orinoco Hermes PCMCIA
|
||||
Allied Telesis WR211PCM Prism-II PCMCIA
|
||||
ArTem OnAir Prism? PCMCIA
|
||||
Asus WL100 Prism-2.5 PCMCIA
|
||||
Avaya Wireless Prism-II PCMCIA
|
||||
Bay eMobility 11B Prism-2.5? PCMCIA
|
||||
Blue Concentric Circle WL-379F Prism-II CF
|
||||
BreezeNet Wireless Prism-II PCMCIA
|
||||
Buffalo WLI-PCM-S11 Prism-II PCMCIA
|
||||
Buffalo WLI-PCM-L11G Hermes PCMCIA
|
||||
Buffalo WLI-CF-S11G Prism-II CF
|
||||
Buffalo WLI2-CF-S11G Prism 2.5 CF
|
||||
Cabletron RoamAbout Hermes PCMCIA
|
||||
Compaq Agency NC5004 Prism-II PCMCIA
|
||||
Compaq WL100 Prism-II PCMCIA
|
||||
Compaq WL110 Hermes PCMCIA
|
||||
Compaq WL200 Prism-II PCMCIA
|
||||
Contec FLEXLAN/FX-DS110-PCC Prism-II PCMCIA
|
||||
Corega PCC-11 Prism-II PCMCIA
|
||||
Corega PCCA-11 Prism-II PCMCIA
|
||||
Corega PCCB-11 Prism-II PCMCIA
|
||||
Corega CGWLPCIA11 Prism-II PCI
|
||||
Dell TrueMobile 1150 Hermes PCMCIA
|
||||
Dlink Air 660 Prism-II PCMCIA
|
||||
Dlink DWL520 Prism-2.5 PCI
|
||||
Dlink DWL650 Prism-2.5 PCMCIA
|
||||
ELECOM Air@Hawk/LD-WL11/PCC PCMCIA
|
||||
ELSA MC-11 PCMCIA
|
||||
ELSA XI300 Prism-II PCMCIA
|
||||
ELSA XI325 Prism-2.5 PCMCIA
|
||||
ELSA APDL325 Prism-2.5 PCMCIA
|
||||
ELSA XI330 Prism-3 PCMCIA
|
||||
ELSA XI800 Prism-II CF
|
||||
EMTAC A2424i Prism-II PCMCIA
|
||||
Farallon Skyline Prism-II PCMCIA
|
||||
Gemtek WL-311 Prism-2.5 PCMCIA
|
||||
Hawking Technology WE110P Prism-2.5 PCMCIA
|
||||
Home Wireless Networks Prism-II PCMCIA
|
||||
IBM High Rate Wireless Hermes PCMCIA
|
||||
ICOM SL-1100 Prism-II PCMCIA
|
||||
I-O DATA WN-B11/PCM Prism-II PCMCIA
|
||||
Intersil Prism II Prism-II PCMCIA
|
||||
Intersil Mini-PCI Prism-2.5 PCI
|
||||
Intersil ISL37100P Prism-3 PCMCIA
|
||||
Intersil ISL37110P Prism-3 PCMCIA
|
||||
Intersil ISL37300P Prism-3 PCMCIA
|
||||
Laneed Wireless PCMCIA
|
||||
Linksys Instant Wireless WPC11 Prism-II PCMCIA
|
||||
Linksys Instant Wireless WPC11 2.5 Prism-2.5 PCMCIA
|
||||
Linksys Instant Wireless WPC11 3.0 Prism-3 PCMCIA
|
||||
Linksys WCF11 Prism-3 PCMCIA
|
||||
Linksys WCF12 Prism-3 CF
|
||||
Lucent WaveLAN Hermes PCMCIA
|
||||
Melco Airconnect Prism-II PCMCIA
|
||||
Microsoft MN-520 WLAN Prism-II PCMCIA
|
||||
NANOSPEED ROOT-RZ2000 Prism-II PCMCIA
|
||||
NCR WaveLAN/IEEE 802.11 PCMCIA
|
||||
NDC/Sohoware NCP130 Prism-II PCI
|
||||
NEC CMZ-RT-WP Prism-II PCMCIA
|
||||
NEC PK-WL001 Lucent PCMCIA
|
||||
NEC PC-WL/11C Prism-II PCMCIA
|
||||
Netgear MA311 Prism-2.5 PCI
|
||||
Netgear MA401 Prism-II/2.5 PCMCIA
|
||||
Netgear MA401RA Prism-II PCMCIA
|
||||
Netgear MA701 Prism-II CF
|
||||
NOKIA C020 WLAN Prism-II PCMCIA
|
||||
NOKIA C110 WLAN Prism-2.5 PCMCIA
|
||||
NTT-ME 11Mbps Wireless LAN Prism-II PCMCIA
|
||||
Planex GeoWave/GW-NS110 Prism-II PCMCIA
|
||||
Planex GW-NS11H Prism-II PCMCIA
|
||||
Proxim Harmony Prism-II PCMCIA
|
||||
Proxim RangeLAN-DS Prism-II PCMCIA
|
||||
Samsung MagicLAN SWL-2000N Prism-II PCMCIA
|
||||
SENAO SL-2511CD Prism-3 PCMCIA
|
||||
Siemens SpeedStream SS1021 Prism-II PCMCIA
|
||||
Siemens SpeedStream SS1021 Prism-3 PCMCIA
|
||||
SMC 2532W-B Prism-II PCMCIA
|
||||
SMC 2602 EZ Connect (3.3V) Prism-II PCI or PCMCIA
|
||||
SMC 2632 EZ Connect Prism-II PCMCIA
|
||||
Socket Low Power WLAN-CF Prism-II CF
|
||||
Sony PCWA-C100 Lucent PCMCIA
|
||||
Sony PEGA-WL110 Prism-2.5 PCMCIA
|
||||
TDK LAK-CD011WL Prism-II PCMCIA
|
||||
Toshiba Wireless LAN Card Prism-II PCMCIA
|
||||
U.S.\& Robotics Wireless Card 2410 Prism-II PCMCIA
|
||||
YIS YWL-11B Prism-II PCMCIA
|
||||
.El
|
||||
.Pp
|
||||
Several vendors sell PCI adapters built around the PLX Technology 9050
|
||||
or 9052 chip.
|
||||
The following such adapters are supported or expected to work:
|
||||
.Pp
|
||||
.Bl -item -compact
|
||||
.It
|
||||
3Com AirConnect 3CRWE777A (3.3V)
|
||||
.It
|
||||
Belkin F5D6000 (a rebadged WL11000P)
|
||||
.It
|
||||
Eumitcom WL11000P
|
||||
.It
|
||||
Global Sun Technology GL24110P (untested)
|
||||
.It
|
||||
Global Sun Technology GL24110P02
|
||||
.It
|
||||
LinkSys WDT11 (a rebadged GL24110P02)
|
||||
.It
|
||||
Netgear MA301
|
||||
.It
|
||||
US Robotics 2415 (rebadged WL11000P)
|
||||
.It
|
||||
Wisecom Wireless LAN PCI Adapter
|
||||
.El
|
||||
.Pp
|
||||
The following adapters have the same model numbers as those listed
|
||||
above, but might not work if the actual card is after the change away
|
||||
from the Prism family:
|
||||
.Pp
|
||||
.Bl -item -compact
|
||||
.It
|
||||
DLink DWL520
|
||||
.El
|
||||
.Sh EXAMPLES
|
||||
Join an existing BSS network (ie: connect to an access point):
|
||||
.Bd -literal -offset indent
|
||||
ifconfig wlan create wlandev wi0 inet 192.168.0.20 \e
|
||||
netmask 0xffffff00
|
||||
.Ed
|
||||
.Pp
|
||||
Join a specific BSS network with network name
|
||||
.Dq Li my_net :
|
||||
.Bd -literal -offset indent
|
||||
ifconfig wlan create wlandev wi0 inet 192.168.0.20 \e
|
||||
netmask 0xffffff00 ssid my_net
|
||||
.Ed
|
||||
.Pp
|
||||
Join a specific BSS network with WEP encryption:
|
||||
.Bd -literal -offset indent
|
||||
ifconfig wlan create wlandev wi0 inet 192.168.0.20 \e
|
||||
netmask 0xffffff00 ssid my_net \e
|
||||
wepmode on wepkey 0x8736639624 weptxkey 1
|
||||
.Ed
|
||||
.Pp
|
||||
Join a Lucent legacy demo ad-hoc network with network name
|
||||
.Dq Li my_net :
|
||||
.Bd -literal -offset indent
|
||||
ifconfig wlan create wlandev wi0 wlanmode ahdemo \e
|
||||
inet 192.168.0.20 netmask 0xffffff00 ssid my_net
|
||||
.Ed
|
||||
.Pp
|
||||
Join/create an IBSS network with network name
|
||||
.Dq Li my_net :
|
||||
.Bd -literal -offset indent
|
||||
ifconfig wlan create wlandev wi0 wlanmode adhoc wi0 \e
|
||||
inet 192.168.0.22 netmask 0xffffff00 ssid my_net
|
||||
.Ed
|
||||
.Pp
|
||||
Create a host-based access point (Prism only):
|
||||
.Bd -literal -offset indent
|
||||
ifconfig wlan create wlandev wi0 wlanmode hostap \e
|
||||
inet 192.168.0.10 netmask 0xffffff00 ssid my_ap
|
||||
.Ed
|
||||
.Pp
|
||||
Create a host-based access point with WEP enabled (Prism only)
|
||||
and plumb it into bridge to fxp0:
|
||||
.Bd -literal -offset indent
|
||||
ifconfig wlan0 create wlandev wi0 wlanmode hostap \e
|
||||
inet 192.168.0.10 netmask 0xffffff00 ssid my_ap \e
|
||||
wepmode on wepkey 0x1234567890 weptxkey 1
|
||||
ifconfig bridge0 create
|
||||
ifconfig bridge0 addm wlan0 addm fxp0 up
|
||||
.Ed
|
||||
.Pp
|
||||
This will give you the same functionality as an access point.
|
||||
.Sh DIAGNOSTICS
|
||||
.Bl -diag
|
||||
.It "wi%d: init failed"
|
||||
The WaveLAN card failed to become ready after an initialization command
|
||||
was issued.
|
||||
.It "wi%d: failed to allocate %d bytes on NIC"
|
||||
The driver was unable to allocate memory for transmit frames in the
|
||||
NIC's on-board RAM.
|
||||
This can also be an indication of an incorrectly configured interrupt.
|
||||
.It "wi%d: device timeout"
|
||||
The WaveLAN card failed to generate an interrupt to acknowledge a transmit
|
||||
command.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr intro 4 ,
|
||||
.Xr pccard 4 ,
|
||||
.Xr pccbb 4 ,
|
||||
.Xr pcic 4 ,
|
||||
.Xr wlan 4 ,
|
||||
.Xr wlan_ccmp 4 ,
|
||||
.Xr wlan_tkip 4 ,
|
||||
.Xr wlan_wep 4 ,
|
||||
.Xr wlan_xauth 4 ,
|
||||
.Xr hostapd 8 ,
|
||||
.Xr ifconfig 8 ,
|
||||
.Xr wpa_supplicant 8
|
||||
.Rs
|
||||
.%T HCF Light programming specification
|
||||
.%U http://web.archive.org/web/20040130141721/http://wavelan.com/
|
||||
.Re
|
||||
.Sh HISTORY
|
||||
The
|
||||
.Nm
|
||||
device driver first appeared in
|
||||
.Fx 3.0 .
|
||||
.Sh AUTHORS
|
||||
The original
|
||||
.Nm
|
||||
driver was written by
|
||||
.An Bill Paul Aq Mt wpaul@ctr.columbia.edu .
|
||||
This man page comes from
|
||||
.Ox .
|
||||
.Sh CAVEATS
|
||||
The driver will reject devices with old firmware to
|
||||
avoid dealing with numerous defects.
|
||||
Unfortunately the driver does not support downloading new firmware
|
||||
to the card so if new firmware is needed users will have to boot
|
||||
a different system to accomplish this.
|
||||
.Pp
|
||||
Intersil Prism cards must have firmware versions 0.8.0 or later and
|
||||
version 1.7.0 or later are required to support functionality such as WPA.
|
||||
Some users of Prism-II and 2.5 based cards report that station firmware
|
||||
version 1.3.4 works better for them in hostap than 1.4.9.
|
||||
Older versions of the Prism station firmware have a number of issues
|
||||
with hostap mode.
|
||||
The IBSS/adhoc mode appears to work well on station firmware 1.3.1 and
|
||||
later.
|
||||
The IBSS/adhoc mode appears to have problems for some people with
|
||||
older versions of station firmware.
|
||||
.Pp
|
||||
Lucent cards prior to firmware version 6.0.6 do not implement IBSS
|
||||
mode and are not supported.
|
||||
.Pp
|
||||
Prior versions of
|
||||
.Nm
|
||||
supported Symbol firmware.
|
||||
That support has been removed due to persistent problems with this
|
||||
firmware as well as getting proper documentation on this firmware.
|
||||
.Pp
|
||||
Hermes 2 and Hermes 3 chips are not supported by this driver.
|
||||
.Pp
|
||||
Here's the above requirements in the form of a table
|
||||
.Pp
|
||||
.Bl -column -compact "Prims II/2.5" "xxxxxxxx" "xxxxxxxx" "xxxxxxxx" "xxxxxxxx"
|
||||
.Em "Firmware Minimum WPA Host AP Adhoc/IBSS"
|
||||
Prism II/2.5 0.8.0 1.7.0 1.3.4 1.3.1
|
||||
Prism 3 0.8.0 1.7.0 1.4.9 1.3.1
|
||||
Hermes 6.0.6 none none 6.0.6
|
||||
Symbol none none none none
|
||||
.El
|
||||
.Sh BUGS
|
||||
Not all the new messages are documented here, and many of them are
|
||||
indications of transient errors that are not indications of serious
|
||||
problems.
|
@ -311,7 +311,6 @@ device iwn # Intel 4965/1000/5000/6000 wireless NICs.
|
||||
device malo # Marvell Libertas wireless NICs.
|
||||
device mwl # Marvell 88W8363 802.11n wireless NICs.
|
||||
device ral # Ralink Technology RT2500 wireless NICs.
|
||||
device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
|
||||
device wpi # Intel 3945ABG wireless NICs.
|
||||
|
||||
# Pseudo devices.
|
||||
|
@ -1923,9 +1923,6 @@ device xmphy # XaQti XMAC II
|
||||
# including the D-Link DFE520TX and D-Link DFE530TX (see 'rl' for
|
||||
# DFE530TX+), the Hawking Technologies PN102TX, and the AOpen/Acer ALN-320.
|
||||
# vte: DM&P Vortex86 RDC R6040 Fast Ethernet
|
||||
# wi: Lucent WaveLAN/IEEE 802.11 PCMCIA adapters. Note: this supports both
|
||||
# the PCMCIA and ISA cards: the ISA card is really a PCMCIA to ISA
|
||||
# bridge with a PCMCIA adapter plugged into it.
|
||||
# xl: Support for the 3Com 3c900, 3c905, 3c905B and 3c905C (Fast)
|
||||
# Etherlink XL cards and integrated controllers. This includes the
|
||||
# integrated 3c905B-TX chips in certain Dell Optiplex and Dell
|
||||
@ -1936,7 +1933,6 @@ device xmphy # XaQti XMAC II
|
||||
# Order for ISA devices is important here
|
||||
|
||||
device an
|
||||
device wi
|
||||
|
||||
# PCI Ethernet NICs that use the common MII bus controller code.
|
||||
device ae # Attansic/Atheros L2 FastEthernet
|
||||
|
@ -3499,9 +3499,6 @@ dev/vt/vt_font.c optional vt
|
||||
dev/vt/vt_sysmouse.c optional vt
|
||||
dev/vte/if_vte.c optional vte pci
|
||||
dev/watchdog/watchdog.c standard
|
||||
dev/wi/if_wi.c optional wi
|
||||
dev/wi/if_wi_pccard.c optional wi pccard
|
||||
dev/wi/if_wi_pci.c optional wi pci
|
||||
dev/wpi/if_wpi.c optional wpi pci
|
||||
wpifw.c optional wpifw \
|
||||
compile-with "${AWK} -f $S/tools/fw_stub.awk wpi.fw:wpifw:153229 -mwpi -c${.TARGET}" \
|
||||
|
@ -1,747 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-4-Clause
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
* Bill Paul <wpaul@ctr.columbia.edu>. 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Bill Paul.
|
||||
* 4. 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 Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#ifndef _IF_WAVELAN_IEEE_H
|
||||
#define _IF_WAVELAN_IEEE_H
|
||||
|
||||
/*
|
||||
* This header defines a simple command interface to the FreeBSD
|
||||
* WaveLAN/IEEE driver (wi) driver, which is used to set certain
|
||||
* device-specific parameters which can't be easily managed through
|
||||
* ifconfig(8). No, sysctl(2) is not the answer. I said a _simple_
|
||||
* interface, didn't I.
|
||||
*/
|
||||
|
||||
#ifndef SIOCSWAVELAN
|
||||
#define SIOCSWAVELAN SIOCSIFGENERIC
|
||||
#endif
|
||||
|
||||
#ifndef SIOCGWAVELAN
|
||||
#define SIOCGWAVELAN SIOCGIFGENERIC
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Technically I don't think there's a limit to a record
|
||||
* length. The largest record is the one that contains the CIS
|
||||
* data, which is 240 words long, so 256 should be a safe
|
||||
* value.
|
||||
*/
|
||||
#define WI_MAX_DATALEN 512
|
||||
|
||||
#if 0
|
||||
struct wi_req {
|
||||
u_int16_t wi_len;
|
||||
u_int16_t wi_type;
|
||||
u_int16_t wi_val[WI_MAX_DATALEN];
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Private LTV records (interpreted only by the driver). This is
|
||||
* a minor kludge to allow reading the interface statistics from
|
||||
* the driver.
|
||||
*/
|
||||
#define WI_RID_IFACE_STATS 0x0100
|
||||
#define WI_RID_MGMT_XMIT 0x0200
|
||||
#define WI_RID_ZERO_CACHE 0x0300
|
||||
#define WI_RID_READ_CACHE 0x0400
|
||||
#define WI_RID_FWDOWNLOAD 0x0500
|
||||
#define WI_RID_MONITOR_MODE 0x0600
|
||||
#define WI_RID_MIF 0x0700
|
||||
#define WI_RID_SCAN_APS 0x0800
|
||||
#define WI_RID_READ_APS 0x0900
|
||||
|
||||
struct wi_80211_hdr {
|
||||
u_int16_t frame_ctl;
|
||||
u_int16_t dur_id;
|
||||
u_int8_t addr1[6];
|
||||
u_int8_t addr2[6];
|
||||
u_int8_t addr3[6];
|
||||
u_int16_t seq_ctl;
|
||||
u_int8_t addr4[6];
|
||||
};
|
||||
|
||||
#define WI_FCTL_VERS 0x0002
|
||||
#define WI_FCTL_FTYPE 0x000C
|
||||
#define WI_FCTL_STYPE 0x00F0
|
||||
#define WI_FCTL_TODS 0x0100
|
||||
#define WI_FCTL_FROMDS 0x0200
|
||||
#define WI_FCTL_MOREFRAGS 0x0400
|
||||
#define WI_FCTL_RETRY 0x0800
|
||||
#define WI_FCTL_PM 0x1000
|
||||
#define WI_FCTL_MOREDATA 0x2000
|
||||
#define WI_FCTL_WEP 0x4000
|
||||
#define WI_FCTL_ORDER 0x8000
|
||||
|
||||
#define WI_FTYPE_MGMT 0x0000
|
||||
#define WI_FTYPE_CTL 0x0004
|
||||
#define WI_FTYPE_DATA 0x0008
|
||||
|
||||
#define WI_STYPE_MGMT_ASREQ 0x0000 /* association request */
|
||||
#define WI_STYPE_MGMT_ASRESP 0x0010 /* association response */
|
||||
#define WI_STYPE_MGMT_REASREQ 0x0020 /* reassociation request */
|
||||
#define WI_STYPE_MGMT_REASRESP 0x0030 /* reassociation response */
|
||||
#define WI_STYPE_MGMT_PROBEREQ 0x0040 /* probe request */
|
||||
#define WI_STYPE_MGMT_PROBERESP 0x0050 /* probe response */
|
||||
#define WI_STYPE_MGMT_BEACON 0x0080 /* beacon */
|
||||
#define WI_STYPE_MGMT_ATIM 0x0090 /* announcement traffic ind msg */
|
||||
#define WI_STYPE_MGMT_DISAS 0x00A0 /* disassociation */
|
||||
#define WI_STYPE_MGMT_AUTH 0x00B0 /* authentication */
|
||||
#define WI_STYPE_MGMT_DEAUTH 0x00C0 /* deauthentication */
|
||||
|
||||
#define WI_STYPE_CTL_PSPOLL 0x00A0
|
||||
#define WI_STYPE_CTL_RTS 0x00B0
|
||||
#define WI_STYPE_CTL_CTS 0x00C0
|
||||
#define WI_STYPE_CTL_ACK 0x00D0
|
||||
#define WI_STYPE_CTL_CFEND 0x00E0
|
||||
#define WI_STYPE_CTL_CFENDACK 0x00F0
|
||||
|
||||
struct wi_mgmt_hdr {
|
||||
u_int16_t frame_ctl;
|
||||
u_int16_t duration;
|
||||
u_int8_t dst_addr[6];
|
||||
u_int8_t src_addr[6];
|
||||
u_int8_t bssid[6];
|
||||
u_int16_t seq_ctl;
|
||||
};
|
||||
|
||||
/*
|
||||
* Lucent/wavelan IEEE signal strength cache
|
||||
*
|
||||
* driver keeps cache of last
|
||||
* MAXWICACHE packets to arrive including signal strength info.
|
||||
* daemons may read this via ioctl
|
||||
*
|
||||
* Each entry in the wi_sigcache has a unique macsrc.
|
||||
*/
|
||||
struct wi_sigcache {
|
||||
char macsrc[6]; /* unique MAC address for entry */
|
||||
int ipsrc; /* ip address associated with packet */
|
||||
int signal; /* signal strength of the packet */
|
||||
int noise; /* noise value */
|
||||
int quality; /* quality of the packet */
|
||||
};
|
||||
|
||||
/*
|
||||
* Firmware downloading API. We support downloading into RAM and into
|
||||
* flash. We copy the entire .hex file for both the primary and secondary
|
||||
* firmware into the kernel, which is minorly gross, but matches the
|
||||
* format of the compiled in firmware.
|
||||
*/
|
||||
struct wi_fwdownload {
|
||||
int type; /* What type of download. */
|
||||
#define WI_FW_RAM 1
|
||||
#define WI_FW_FLASH 2
|
||||
size_t pri_len; /* Primary firmware length */
|
||||
size_t sec_len; /* Secondary firmware length */
|
||||
caddr_t pri_data; /* Pointer (user) to primary data */
|
||||
caddr_t sec_data; /* Pointer (user) to secondary data */
|
||||
};
|
||||
|
||||
struct wi_counters {
|
||||
u_int32_t wi_tx_unicast_frames;
|
||||
u_int32_t wi_tx_multicast_frames;
|
||||
u_int32_t wi_tx_fragments;
|
||||
u_int32_t wi_tx_unicast_octets;
|
||||
u_int32_t wi_tx_multicast_octets;
|
||||
u_int32_t wi_tx_deferred_xmits;
|
||||
u_int32_t wi_tx_single_retries;
|
||||
u_int32_t wi_tx_multi_retries;
|
||||
u_int32_t wi_tx_retry_limit;
|
||||
u_int32_t wi_tx_discards;
|
||||
u_int32_t wi_rx_unicast_frames;
|
||||
u_int32_t wi_rx_multicast_frames;
|
||||
u_int32_t wi_rx_fragments;
|
||||
u_int32_t wi_rx_unicast_octets;
|
||||
u_int32_t wi_rx_multicast_octets;
|
||||
u_int32_t wi_rx_fcs_errors;
|
||||
u_int32_t wi_rx_discards_nobuf;
|
||||
u_int32_t wi_tx_discards_wrong_sa;
|
||||
u_int32_t wi_rx_WEP_cant_decrypt;
|
||||
u_int32_t wi_rx_msg_in_msg_frags;
|
||||
u_int32_t wi_rx_msg_in_bad_msg_frags;
|
||||
};
|
||||
|
||||
/*
|
||||
* Network parameters, static configuration entities.
|
||||
*/
|
||||
#define WI_RID_PORTTYPE 0xFC00 /* Connection control characteristics */
|
||||
#define WI_RID_MAC_NODE 0xFC01 /* MAC address of this station */
|
||||
#define WI_RID_DESIRED_SSID 0xFC02 /* Service Set ID for connection */
|
||||
#define WI_RID_OWN_CHNL 0xFC03 /* Comm channel for BSS creation */
|
||||
#define WI_RID_OWN_SSID 0xFC04 /* IBSS creation ID */
|
||||
#define WI_RID_OWN_ATIM_WIN 0xFC05 /* ATIM window time for IBSS creation */
|
||||
#define WI_RID_SYSTEM_SCALE 0xFC06 /* scale that specifies AP density */
|
||||
#define WI_RID_MAX_DATALEN 0xFC07 /* Max len of MAC frame body data */
|
||||
#define WI_RID_MAC_WDS 0xFC08 /* MAC addr of corresponding WDS node */
|
||||
#define WI_RID_PM_ENABLED 0xFC09 /* ESS power management enable */
|
||||
#define WI_RID_PM_EPS 0xFC0A /* PM EPS/PS mode */
|
||||
#define WI_RID_MCAST_RX 0xFC0B /* ESS PM mcast reception */
|
||||
#define WI_RID_MAX_SLEEP 0xFC0C /* max sleep time for ESS PM */
|
||||
#define WI_RID_HOLDOVER 0xFC0D /* holdover time for ESS PM */
|
||||
#define WI_RID_NODENAME 0xFC0E /* ID name of this node for diag */
|
||||
#define WI_RID_DTIM_PERIOD 0xFC10 /* beacon interval between DTIMs */
|
||||
#define WI_RID_WDS_ADDR1 0xFC11 /* port 1 MAC of WDS link node */
|
||||
#define WI_RID_WDS_ADDR2 0xFC12 /* port 1 MAC of WDS link node */
|
||||
#define WI_RID_WDS_ADDR3 0xFC13 /* port 1 MAC of WDS link node */
|
||||
#define WI_RID_WDS_ADDR4 0xFC14 /* port 1 MAC of WDS link node */
|
||||
#define WI_RID_WDS_ADDR5 0xFC15 /* port 1 MAC of WDS link node */
|
||||
#define WI_RID_WDS_ADDR6 0xFC16 /* port 1 MAC of WDS link node */
|
||||
#define WI_RID_MCAST_PM_BUF 0xFC17 /* PM buffering of mcast */
|
||||
#define WI_RID_ENCRYPTION 0xFC20 /* enable/disable WEP */
|
||||
#define WI_RID_AUTHTYPE 0xFC21 /* specify authentication type */
|
||||
#define WI_RID_P2_TX_CRYPT_KEY 0xFC23
|
||||
#define WI_RID_P2_CRYPT_KEY0 0xFC24
|
||||
#define WI_RID_P2_CRYPT_KEY1 0xFC25
|
||||
#define WI_RID_MICROWAVE_OVEN 0xFC25
|
||||
#define WI_RID_P2_CRYPT_KEY2 0xFC26
|
||||
#define WI_RID_P2_CRYPT_KEY3 0xFC27
|
||||
#define WI_RID_P2_ENCRYPTION 0xFC28
|
||||
#define WI_RID_ALT_RETRY_CNT 0xFC32
|
||||
#define PRIVACY_INVOKED 0x01
|
||||
#define EXCLUDE_UNENCRYPTED 0x02
|
||||
#define HOST_ENCRYPT 0x10
|
||||
#define IV_EVERY_FRAME 0x00 /* IV = Initialization Vector */
|
||||
#define IV_EVERY10_FRAME 0x20 /* every 10 frame IV reuse */
|
||||
#define IV_EVERY50_FRAME 0x40 /* every 50 frame IV reuse */
|
||||
#define IV_EVERY100_FRAME 0x60 /* every 100 frame IV reuse */
|
||||
#define HOST_DECRYPT 0x80
|
||||
#define WI_RID_WEP_MAPTABLE 0xFC29
|
||||
#define WI_RID_CNFAUTHMODE 0xFC2A
|
||||
#define WI_RID_ROAMING_MODE 0xFC2D
|
||||
#define WI_RID_OWN_BEACON_INT 0xFC33 /* beacon xmit time for BSS creation */
|
||||
#define WI_RID_ENH_SECURITY 0xFC43 /* enhanced security (AP mode) */
|
||||
#define WI_RID_CNF_DBM_ADJUST 0xFC46
|
||||
#define WI_RID_DBM_ADJUST 0xFC46 /* RSSI - WI_RID_DBM_ADJUST ~ dBm */
|
||||
#define WI_RID_WPA_DATA 0xFC48 /* WPA IE */
|
||||
#define WI_RID_BASIC_RATE 0xFCB3
|
||||
#define WI_RID_SUPPORT_RATE 0xFCB4
|
||||
#define WI_RID_WPA_HANDLING 0xFCBB /* WPA handling procedures */
|
||||
|
||||
/*
|
||||
* Network parameters, dynamic configuration entities
|
||||
*/
|
||||
#define WI_RID_MCAST_LIST 0xFC80 /* list of multicast addrs */
|
||||
#define WI_RID_CREATE_IBSS 0xFC81 /* create IBSS */
|
||||
#define WI_RID_FRAG_THRESH 0xFC82 /* frag len, unicast msg xmit */
|
||||
#define WI_RID_RTS_THRESH 0xFC83 /* frame len for RTS/CTS handshake */
|
||||
#define WI_RID_TX_RATE 0xFC84 /* data rate for message xmit
|
||||
* 0 == Fixed 1mbps
|
||||
* 1 == Fixed 2mbps
|
||||
* 2 == auto fallback
|
||||
*/
|
||||
#define WI_RID_PROMISC 0xFC85 /* enable promisc mode */
|
||||
#define WI_RID_FRAG_THRESH0 0xFC90
|
||||
#define WI_RID_FRAG_THRESH1 0xFC91
|
||||
#define WI_RID_FRAG_THRESH2 0xFC92
|
||||
#define WI_RID_FRAG_THRESH3 0xFC93
|
||||
#define WI_RID_FRAG_THRESH4 0xFC94
|
||||
#define WI_RID_FRAG_THRESH5 0xFC95
|
||||
#define WI_RID_FRAG_THRESH6 0xFC96
|
||||
#define WI_RID_RTS_THRESH0 0xFC97
|
||||
#define WI_RID_RTS_THRESH1 0xFC98
|
||||
#define WI_RID_RTS_THRESH2 0xFC99
|
||||
#define WI_RID_RTS_THRESH3 0xFC9A
|
||||
#define WI_RID_RTS_THRESH4 0xFC9B
|
||||
#define WI_RID_RTS_THRESH5 0xFC9C
|
||||
#define WI_RID_RTS_THRESH6 0xFC9D
|
||||
#define WI_RID_TX_RATE0 0xFC9E
|
||||
#define WI_RID_TX_RATE1 0xFC9F
|
||||
#define WI_RID_TX_RATE2 0xFCA0
|
||||
#define WI_RID_TX_RATE3 0xFCA1
|
||||
#define WI_RID_TX_RATE4 0xFCA2
|
||||
#define WI_RID_TX_RATE5 0xFCA3
|
||||
#define WI_RID_TX_RATE6 0xFCA4
|
||||
#define WI_RID_DEFLT_CRYPT_KEYS 0xFCB0
|
||||
#define WI_RID_TX_CRYPT_KEY 0xFCB1
|
||||
#define WI_RID_TICK_TIME 0xFCE0
|
||||
|
||||
struct wi_key {
|
||||
u_int16_t wi_keylen;
|
||||
u_int8_t wi_keydat[14];
|
||||
};
|
||||
|
||||
#define WI_NLTV_KEYS 4
|
||||
struct wi_ltv_keys {
|
||||
u_int16_t wi_len;
|
||||
u_int16_t wi_type;
|
||||
struct wi_key wi_keys[WI_NLTV_KEYS];
|
||||
};
|
||||
|
||||
/*
|
||||
* NIC information
|
||||
*/
|
||||
#define WI_RID_DNLD_BUF 0xFD01
|
||||
#define WI_RID_MEMSZ 0xFD02 /* memory size info (XXX Lucent) */
|
||||
/* Looks like on lucnet pri firm too */
|
||||
#define WI_RID_PRI_IDENTITY 0xFD02 /* primary funcs firmware ident (PRISM2) */
|
||||
#define WI_RID_PRI_SUP_RANGE 0xFD03 /* primary supplier compatibility */
|
||||
#define WI_RID_CIF_ACT_RANGE 0xFD04 /* controller sup. compatibility */
|
||||
#define WI_RID_SERIALNO 0xFD0A /* card serial number */
|
||||
#define WI_RID_CARD_ID 0xFD0B /* card identification */
|
||||
#define WI_RID_MFI_SUP_RANGE 0xFD0C /* modem supplier compatibility */
|
||||
#define WI_RID_CFI_SUP_RANGE 0xFD0D /* controller sup. compatibility */
|
||||
#define WI_RID_CHANNEL_LIST 0xFD10 /* allowd comm. frequencies. */
|
||||
#define WI_RID_REG_DOMAINS 0xFD11 /* list of intendted regulatory doms */
|
||||
#define WI_RID_TEMP_TYPE 0xFD12 /* hw temp range code */
|
||||
#define WI_RID_CIS 0xFD13 /* PC card info struct */
|
||||
#define WI_RID_STA_IDENTITY 0xFD20 /* station funcs firmware ident */
|
||||
#define WI_RID_STA_SUP_RANGE 0xFD21 /* station supplier compat */
|
||||
#define WI_RID_MFI_ACT_RANGE 0xFD22
|
||||
#define WI_RID_SYMBOL_IDENTITY 0xFD24
|
||||
#define WI_RID_CFI_ACT_RANGE 0xFD33
|
||||
#define WI_RID_COMMQUAL 0xFD43
|
||||
#define WI_RID_SCALETHRESH 0xFD46
|
||||
#define WI_RID_PCF 0xFD87
|
||||
|
||||
/*
|
||||
* MAC information
|
||||
*/
|
||||
#define WI_RID_PORT_STAT 0xFD40 /* actual MAC port con control stat */
|
||||
#define WI_RID_CURRENT_SSID 0xFD41 /* ID of actually connected SS */
|
||||
#define WI_RID_CURRENT_BSSID 0xFD42 /* ID of actually connected BSS */
|
||||
#define WI_RID_COMMS_QUALITY 0xFD43 /* quality of BSS connection */
|
||||
#define WI_RID_CUR_TX_RATE 0xFD44 /* current TX rate */
|
||||
#define WI_RID_CUR_BEACON_INT 0xFD45 /* current beacon interval */
|
||||
#define WI_RID_CUR_SCALE_THRESH 0xFD46 /* actual system scane thresh setting */
|
||||
#define WI_RID_PROT_RESP_TIME 0xFD47 /* time to wait for resp to req msg */
|
||||
#define WI_RID_SHORT_RTR_LIM 0xFD48 /* max tx attempts for short frames */
|
||||
#define WI_RID_LONG_RTS_LIM 0xFD49 /* max tx attempts for long frames */
|
||||
#define WI_RID_MAX_TX_LIFE 0xFD4A /* max tx frame handling duration */
|
||||
#define WI_RID_MAX_RX_LIFE 0xFD4B /* max rx frame handling duration */
|
||||
#define WI_RID_CF_POLL 0xFD4C /* contention free pollable ind */
|
||||
#define WI_RID_AUTH_ALGS 0xFD4D /* auth algorithms available */
|
||||
#define WI_RID_AUTH_TYPE 0xFD4E /* availanle auth types */
|
||||
#define WI_RID_WEP_AVAIL 0xFD4F /* WEP privacy option available */
|
||||
#define WI_RID_DBM_COMMS_QUAL 0xFD51 /* CommQuality normalized to dBm */
|
||||
#define WI_RID_CUR_TX_RATE1 0xFD80
|
||||
#define WI_RID_CUR_TX_RATE2 0xFD81
|
||||
#define WI_RID_CUR_TX_RATE3 0xFD82
|
||||
#define WI_RID_CUR_TX_RATE4 0xFD83
|
||||
#define WI_RID_CUR_TX_RATE5 0xFD84
|
||||
#define WI_RID_CUR_TX_RATE6 0xFD85
|
||||
#define WI_RID_OWN_MAC 0xFD86 /* unique local MAC addr */
|
||||
#define WI_RID_PCI_INFO 0xFD87 /* point coordination func cap */
|
||||
|
||||
/*
|
||||
* Scan Information
|
||||
*/
|
||||
#define WI_RID_BCAST_SCAN_REQ 0xFCAB /* Broadcast Scan request (Symbol) */
|
||||
#define BSCAN_5SEC 0x01
|
||||
#define BSCAN_ONETIME 0x02
|
||||
#define BSCAN_PASSIVE 0x40
|
||||
#define BSCAN_BCAST 0x80
|
||||
#define WI_RID_SCAN_REQ 0xFCE1 /* Scan request (STA only) */
|
||||
#define WI_RID_JOIN_REQ 0xFCE2 /* Join request (STA only) */
|
||||
#define WI_RID_AUTH_STATION 0xFCE3 /* Authenticates Station (AP) */
|
||||
#define WI_RID_CHANNEL_REQ 0xFCE4 /* Channel Information Request (AP) */
|
||||
#define WI_RID_SCAN_RESULTS 0xFD88 /* Scan Results Table */
|
||||
|
||||
struct wi_apinfo {
|
||||
int scanreason; /* ScanReason */
|
||||
char bssid[6]; /* BSSID (mac address) */
|
||||
int channel; /* Channel */
|
||||
int signal; /* Signal level */
|
||||
int noise; /* Average Noise Level*/
|
||||
int quality; /* Quality */
|
||||
int namelen; /* Length of SSID string */
|
||||
char name[32]; /* SSID string */
|
||||
int capinfo; /* Capability info. */
|
||||
int interval; /* BSS Beacon Interval */
|
||||
int rate; /* Data Rate */
|
||||
};
|
||||
|
||||
/*
|
||||
* Modem information
|
||||
*/
|
||||
#define WI_RID_PHY_TYPE 0xFDC0 /* phys layer type indication */
|
||||
#define WI_RID_CURRENT_CHAN 0xFDC1 /* current frequency */
|
||||
#define WI_RID_PWR_STATE 0xFDC2 /* pwr consumption status */
|
||||
#define WI_RID_CCA_MODE 0xFDC3 /* clear chan assess mode indication */
|
||||
#define WI_RID_CCA_TIME 0xFDC4 /* clear chan assess time */
|
||||
#define WI_RID_MAC_PROC_DELAY 0xFDC5 /* MAC processing delay time */
|
||||
#define WI_RID_DATA_RATES 0xFDC6 /* supported data rates */
|
||||
|
||||
/*
|
||||
* bsd-airtools v0.2 - source-mods v0.2 [common.h]
|
||||
* by h1kari - (c) Dachb0den Labs 2001
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Dachb0den Labs.
|
||||
* David Hulton <h1kari@dachb0den.com>. 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by David Hulton.
|
||||
* 4. 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 David Hulton 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 David Hulton OR THE VOICES IN HIS HEAD
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* standard hermes receive frame used by wavelan/prism2 cards
|
||||
*/
|
||||
struct wi_rx_frame {
|
||||
/*
|
||||
* hermes prefix header. supplies information on the current status of
|
||||
* the network and various other statistics gathered from the
|
||||
* management/control frames as used internally.
|
||||
*/
|
||||
u_int16_t wi_status;
|
||||
u_int16_t wi_ts0;
|
||||
u_int16_t wi_ts1;
|
||||
u_int8_t wi_silence;
|
||||
u_int8_t wi_signal;
|
||||
u_int8_t wi_rate;
|
||||
u_int8_t wi_rx_flow;
|
||||
u_int16_t wi_rsvd0;
|
||||
u_int16_t wi_rsvd1;
|
||||
/*
|
||||
* standard 80211 frame header. all packets have to use this header as
|
||||
* per the AN9900 from intersil, even management/control. for
|
||||
* management packets, they just threw the header into the data field,
|
||||
* but for control packets the headers are lost in translation and
|
||||
* therefore not all control packet info can be displayed.
|
||||
*/
|
||||
u_int16_t wi_frame_ctl;
|
||||
u_int16_t wi_id;
|
||||
u_int8_t wi_addr1[6];
|
||||
u_int8_t wi_addr2[6];
|
||||
u_int8_t wi_addr3[6];
|
||||
u_int16_t wi_seq_ctl;
|
||||
u_int8_t wi_addr4[6];
|
||||
u_int16_t wi_dat_len;
|
||||
/*
|
||||
* another wierdity with the drivers. they append a 802.3 header which
|
||||
* is somewhat redundant, since all the same data is provided in the
|
||||
* 802.11 header.
|
||||
*/
|
||||
u_int8_t wi_dst_addr[6];
|
||||
u_int8_t wi_src_addr[6];
|
||||
u_int16_t wi_len;
|
||||
};
|
||||
#define WI_DATA_HDRLEN 0x3C
|
||||
#define WI_MGMT_HDRLEN 0x3C
|
||||
#define WI_CTL_HDRLEN 0x3C
|
||||
|
||||
/*
|
||||
* all data packets have a snap (sub-network access protocol) header that
|
||||
* isn't entirely definied, but added for ethernet compatibility.
|
||||
*/
|
||||
struct wi_snap_frame {
|
||||
u_int16_t wi_dat[3];
|
||||
u_int16_t wi_type;
|
||||
};
|
||||
|
||||
/*
|
||||
* management frame headers
|
||||
* note: all management frames consist of a static header and variable length
|
||||
* fields.
|
||||
*/
|
||||
|
||||
/*
|
||||
* variable length field structure
|
||||
*/
|
||||
struct wi_mgmt_var_hdr {
|
||||
u_int8_t wi_code;
|
||||
u_int8_t wi_len;
|
||||
u_int8_t wi_data[256];
|
||||
};
|
||||
|
||||
/*
|
||||
* management beacon frame prefix
|
||||
*/
|
||||
struct wi_mgmt_beacon_hdr {
|
||||
u_int32_t wi_ts0;
|
||||
u_int32_t wi_ts1;
|
||||
u_int16_t wi_interval;
|
||||
u_int16_t wi_capinfo;
|
||||
};
|
||||
|
||||
/*
|
||||
* ibss announcement traffic indication message (atim) frame
|
||||
* note: no parameters
|
||||
*/
|
||||
|
||||
/*
|
||||
* management disassociation frame
|
||||
*/
|
||||
struct wi_mgmt_disas_hdr {
|
||||
u_int16_t wi_reason;
|
||||
};
|
||||
|
||||
/*
|
||||
* management association request frame prefix
|
||||
*/
|
||||
struct wi_mgmt_asreq_hdr {
|
||||
u_int16_t wi_capinfo;
|
||||
u_int16_t wi_interval;
|
||||
};
|
||||
|
||||
/*
|
||||
* management association response frame prefix
|
||||
*/
|
||||
struct wi_mgmt_asresp_hdr {
|
||||
u_int16_t wi_capinfo;
|
||||
u_int16_t wi_status;
|
||||
u_int16_t wi_aid;
|
||||
};
|
||||
|
||||
/*
|
||||
* management reassociation request frame prefix
|
||||
*/
|
||||
struct wi_mgmt_reasreq_hdr {
|
||||
u_int16_t wi_capinfo;
|
||||
u_int16_t wi_interval;
|
||||
u_int8_t wi_currap[6];
|
||||
};
|
||||
|
||||
/*
|
||||
* management reassociation response frame prefix
|
||||
*/
|
||||
struct wi_mgmt_reasresp_hdr {
|
||||
u_int16_t wi_capinfo;
|
||||
u_int16_t wi_status;
|
||||
u_int16_t wi_aid;
|
||||
};
|
||||
|
||||
/*
|
||||
* management probe request frame prefix
|
||||
* note: no static parameters, only variable length
|
||||
*/
|
||||
|
||||
/*
|
||||
* management probe response frame prefix
|
||||
*/
|
||||
struct wi_mgmt_proberesp_hdr {
|
||||
u_int32_t wi_ts0;
|
||||
u_int32_t wi_ts1;
|
||||
u_int16_t wi_interval;
|
||||
u_int16_t wi_capinfo;
|
||||
};
|
||||
|
||||
/*
|
||||
* management authentication frame prefix
|
||||
*/
|
||||
struct wi_mgmt_auth_hdr {
|
||||
u_int16_t wi_algo;
|
||||
u_int16_t wi_seq;
|
||||
u_int16_t wi_status;
|
||||
};
|
||||
|
||||
/*
|
||||
* management deauthentication frame
|
||||
*/
|
||||
struct wi_mgmt_deauth_hdr {
|
||||
u_int16_t wi_reason;
|
||||
};
|
||||
|
||||
/*
|
||||
* rid configuration register definitions
|
||||
*/
|
||||
#define WI_RID_SCAN_REQ 0xFCE1 /* scan request information */
|
||||
#define WI_RID_SCAN_RES 0xFD88 /* scan result information */
|
||||
|
||||
#define WI_RID_PROCFRAME 0x3137 /* Return full frame information */
|
||||
#define WI_RID_PRISM2 0x3138 /* tell if we're a prism2 card or not */
|
||||
|
||||
/*
|
||||
* 802.11 definitions
|
||||
*/
|
||||
#define WI_STAT_BADCRC 0x0001
|
||||
#define WI_STAT_UNDECRYPTABLE 0x0002
|
||||
#define WI_STAT_ERRSTAT 0x0003
|
||||
#define WI_STAT_MAC_PORT 0x0700
|
||||
#define WI_STAT_1042 0x2000
|
||||
#define WI_STAT_TUNNEL 0x4000
|
||||
#define WI_STAT_WMP_MSG 0x6000
|
||||
#define WI_RXSTAT_MSG_TYPE 0xE000
|
||||
|
||||
#define WI_FCTL_OPT_MASK 0xFF00
|
||||
#define WI_AID_SET 0xC000
|
||||
#define WI_AID_MASK 0x3FFF
|
||||
#define WI_SCTL_FRAGNUM_MASK 0x000F
|
||||
#define WI_SCTL_SEQNUM_MASK 0xFFF0
|
||||
|
||||
#define WI_STAT_UNSPEC_FAIL 1
|
||||
#define WI_STAT_CAPINFO_FAIL 10
|
||||
#define WI_STAT_REAS_DENY 11
|
||||
#define WI_STAT_ASSOC_DENY 12
|
||||
#define WI_STAT_ALGO_FAIL 13
|
||||
#define WI_STAT_SEQ_FAIL 14
|
||||
#define WI_STAT_CHAL_FAIL 15
|
||||
#define WI_STAT_TOUT_FAIL 16
|
||||
#define WI_STAT_OVERL_DENY 17
|
||||
#define WI_STAT_RATE_DENY 18
|
||||
|
||||
#define WI_FTYPE_MGMT 0x0000
|
||||
#define WI_FTYPE_CTL 0x0004
|
||||
#define WI_FTYPE_DATA 0x0008
|
||||
|
||||
#define WI_FCTL_VERS 0x0002
|
||||
#define WI_FCTL_FTYPE 0x000C
|
||||
#define WI_FCTL_STYPE 0x00F0
|
||||
#define WI_FCTL_TODS 0x0100
|
||||
#define WI_FCTL_FROMDS 0x0200
|
||||
#define WI_FCTL_MOREFRAGS 0x0400
|
||||
#define WI_FCTL_RETRY 0x0800
|
||||
#define WI_FCTL_PM 0x1000
|
||||
#define WI_FCTL_MOREDATA 0x2000
|
||||
#define WI_FCTL_WEP 0x4000
|
||||
#define WI_FCTL_ORDER 0x8000
|
||||
|
||||
#define WI_FCS_LEN 0x4 /* checksum length */
|
||||
|
||||
/*
|
||||
* management definitions
|
||||
*/
|
||||
#define WI_STYPE_MGMT_ASREQ 0x0000
|
||||
#define WI_STYPE_MGMT_ASRESP 0x0010
|
||||
#define WI_STYPE_MGMT_REASREQ 0x0020
|
||||
#define WI_STYPE_MGMT_REASRESP 0x0030
|
||||
#define WI_STYPE_MGMT_PROBEREQ 0x0040
|
||||
#define WI_STYPE_MGMT_PROBERESP 0x0050
|
||||
#define WI_STYPE_MGMT_BEACON 0x0080
|
||||
#define WI_STYPE_MGMT_ATIM 0x0090
|
||||
#define WI_STYPE_MGMT_DISAS 0x00A0
|
||||
#define WI_STYPE_MGMT_AUTH 0x00B0
|
||||
#define WI_STYPE_MGMT_DEAUTH 0x00C0
|
||||
|
||||
#define WI_CAPINFO_ESS 0x01
|
||||
#define WI_CAPINFO_IBSS 0x02
|
||||
#define WI_CAPINFO_CFPOLL 0x04
|
||||
#define WI_CAPINFO_CFPOLLREQ 0x08
|
||||
#define WI_CAPINFO_PRIV 0x10
|
||||
|
||||
#define WI_REASON_UNSPEC 1
|
||||
#define WI_REASON_AUTH_INVALID 2
|
||||
#define WI_REASON_DEAUTH_LEAVE 3
|
||||
#define WI_REASON_DISAS_INACT 4
|
||||
#define WI_REASON_DISAS_OVERL 5
|
||||
#define WI_REASON_CLASS2 6
|
||||
#define WI_REASON_CLASS3 7
|
||||
#define WI_REASON_DISAS_LEAVE 8
|
||||
#define WI_REASON_NOAUTH 9
|
||||
|
||||
#define WI_VAR_SSID 0
|
||||
#define WI_VAR_SRATES 1
|
||||
#define WI_VAR_FH 2
|
||||
#define WI_VAR_DS 3
|
||||
#define WI_VAR_CF 4
|
||||
#define WI_VAR_TIM 5
|
||||
#define WI_VAR_IBSS 6
|
||||
#define WI_VAR_CHAL 16
|
||||
|
||||
#define WI_VAR_SRATES_MASK 0x7F
|
||||
|
||||
/*
|
||||
* control definitions
|
||||
*/
|
||||
#define WI_STYPE_CTL_PSPOLL 0x00A0
|
||||
#define WI_STYPE_CTL_RTS 0x00B0
|
||||
#define WI_STYPE_CTL_CTS 0x00C0
|
||||
#define WI_STYPE_CTL_ACK 0x00D0
|
||||
#define WI_STYPE_CTL_CFEND 0x00E0
|
||||
#define WI_STYPE_CTL_CFENDCFACK 0x00F0
|
||||
|
||||
/*
|
||||
* ap scanning structures
|
||||
*/
|
||||
struct wi_scan_res {
|
||||
u_int16_t wi_chan;
|
||||
u_int16_t wi_noise;
|
||||
u_int16_t wi_signal;
|
||||
u_int8_t wi_bssid[6];
|
||||
u_int16_t wi_interval;
|
||||
u_int16_t wi_capinfo;
|
||||
u_int16_t wi_ssid_len;
|
||||
u_int8_t wi_ssid[32];
|
||||
u_int8_t wi_srates[10];
|
||||
u_int8_t wi_rate;
|
||||
u_int8_t wi_rsvd;
|
||||
};
|
||||
#define WI_WAVELAN_RES_SIZE 50
|
||||
|
||||
struct wi_scan_p2_hdr {
|
||||
u_int16_t wi_rsvd;
|
||||
u_int16_t wi_reason;
|
||||
};
|
||||
#define WI_PRISM2_RES_SIZE 62
|
||||
|
||||
/*
|
||||
* prism2 debug mode definitions
|
||||
*/
|
||||
#define SIOCSPRISM2DEBUG _IOW('i', 137, struct ifreq)
|
||||
#define SIOCGPRISM2DEBUG _IOWR('i', 138, struct ifreq)
|
||||
|
||||
#define WI_DEBUG_RESET 0x00
|
||||
#define WI_DEBUG_INIT 0x01
|
||||
#define WI_DEBUG_SLEEP 0x02
|
||||
#define WI_DEBUG_WAKE 0x03
|
||||
#define WI_DEBUG_CHAN 0x08
|
||||
#define WI_DEBUG_DELAYSUPP 0x09
|
||||
#define WI_DEBUG_TXSUPP 0x0A
|
||||
#define WI_DEBUG_MONITOR 0x0B
|
||||
#define WI_DEBUG_LEDTEST 0x0C
|
||||
#define WI_DEBUG_CONTTX 0x0E
|
||||
#define WI_DEBUG_STOPTEST 0x0F
|
||||
#define WI_DEBUG_CONTRX 0x10
|
||||
#define WI_DEBUG_SIGSTATE 0x11
|
||||
#define WI_DEBUG_CALENABLE 0x13
|
||||
#define WI_DEBUG_CONFBITS 0x15
|
||||
|
||||
#endif
|
2088
sys/dev/wi/if_wi.c
2088
sys/dev/wi/if_wi.c
File diff suppressed because it is too large
Load Diff
@ -1,148 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-4-Clause
|
||||
*
|
||||
* Copyright (c) 2013 Justin Hibbits
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
* Bill Paul <wpaul@ctr.columbia.edu>. 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Bill Paul.
|
||||
* 4. 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 Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Lucent WaveLAN/IEEE 802.11 MacIO attachment for FreeBSD.
|
||||
*
|
||||
* Based on the PCMCIA driver
|
||||
* Written by Bill Paul <wpaul@ctr.columbia.edu>
|
||||
* Electrical Engineering Department
|
||||
* Columbia University, New York City
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/rman.h>
|
||||
|
||||
#include <dev/ofw/ofw_bus.h>
|
||||
#include <dev/ofw/openfirm.h>
|
||||
#include <machine/ofw_machdep.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if_media.h>
|
||||
#include <net/if_types.h>
|
||||
|
||||
#include <net80211/ieee80211_var.h>
|
||||
#include <net80211/ieee80211_radiotap.h>
|
||||
|
||||
#include <dev/wi/if_wavelan_ieee.h>
|
||||
#include <dev/wi/if_wireg.h>
|
||||
#include <dev/wi/if_wivar.h>
|
||||
|
||||
#include <powerpc/powermac/maciovar.h>
|
||||
|
||||
static int wi_macio_probe(device_t);
|
||||
static int wi_macio_attach(device_t);
|
||||
|
||||
static device_method_t wi_macio_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, wi_macio_probe),
|
||||
DEVMETHOD(device_attach, wi_macio_attach),
|
||||
DEVMETHOD(device_detach, wi_detach),
|
||||
DEVMETHOD(device_shutdown, wi_shutdown),
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t wi_macio_driver = {
|
||||
"wi",
|
||||
wi_macio_methods,
|
||||
sizeof(struct wi_softc)
|
||||
};
|
||||
|
||||
DRIVER_MODULE(wi, macio, wi_macio_driver, wi_devclass, 0, 0);
|
||||
MODULE_DEPEND(wi, wlan, 1, 1, 1);
|
||||
|
||||
static int
|
||||
wi_macio_probe(device_t dev)
|
||||
{
|
||||
const char *name, *compat;
|
||||
|
||||
/* Make sure we're a network driver */
|
||||
name = ofw_bus_get_name(dev);
|
||||
if (name == NULL)
|
||||
return (ENXIO);
|
||||
|
||||
if (strcmp(name, "radio") != 0) {
|
||||
return ENXIO;
|
||||
}
|
||||
compat = ofw_bus_get_compat(dev);
|
||||
if (strcmp(compat, "wireless") != 0) {
|
||||
return ENXIO;
|
||||
}
|
||||
|
||||
device_set_desc(dev, "Apple Airport");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
wi_macio_attach(device_t dev)
|
||||
{
|
||||
struct wi_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
sc->wi_gone = 0;
|
||||
sc->wi_bus_type = 0;
|
||||
|
||||
error = wi_alloc(dev, 0);
|
||||
if (error == 0) {
|
||||
macio_enable_wireless(device_get_parent(dev), 1);
|
||||
/* Make sure interrupts are disabled. */
|
||||
CSR_WRITE_2(sc, WI_INT_EN, 0);
|
||||
CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF);
|
||||
|
||||
error = wi_attach(dev);
|
||||
if (error != 0)
|
||||
wi_free(dev);
|
||||
else
|
||||
gone_in_dev(dev, 13, "pccard removed, wi doesn't support modern crypto");
|
||||
}
|
||||
return error;
|
||||
}
|
@ -1,205 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-4-Clause
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
* Bill Paul <wpaul@ctr.columbia.edu>. 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Bill Paul.
|
||||
* 4. 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 Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Lucent WaveLAN/IEEE 802.11 PCMCIA driver for FreeBSD.
|
||||
*
|
||||
* Written by Bill Paul <wpaul@ctr.columbia.edu>
|
||||
* Electrical Engineering Department
|
||||
* Columbia University, New York City
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/rman.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if_media.h>
|
||||
#include <net/if_types.h>
|
||||
|
||||
#include <net80211/ieee80211_var.h>
|
||||
#include <net80211/ieee80211_radiotap.h>
|
||||
|
||||
#include <dev/pccard/pccardvar.h>
|
||||
#include <dev/pccard/pccard_cis.h>
|
||||
|
||||
#include <dev/wi/if_wavelan_ieee.h>
|
||||
#include <dev/wi/if_wireg.h>
|
||||
#include <dev/wi/if_wivar.h>
|
||||
|
||||
#include "card_if.h"
|
||||
#include "pccarddevs.h"
|
||||
|
||||
static int wi_pccard_probe(device_t);
|
||||
static int wi_pccard_attach(device_t);
|
||||
|
||||
static device_method_t wi_pccard_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, wi_pccard_probe),
|
||||
DEVMETHOD(device_attach, wi_pccard_attach),
|
||||
DEVMETHOD(device_detach, wi_detach),
|
||||
DEVMETHOD(device_shutdown, wi_shutdown),
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t wi_pccard_driver = {
|
||||
"wi",
|
||||
wi_pccard_methods,
|
||||
sizeof(struct wi_softc)
|
||||
};
|
||||
|
||||
DRIVER_MODULE(wi, pccard, wi_pccard_driver, wi_devclass, 0, 0);
|
||||
MODULE_DEPEND(wi, wlan, 1, 1, 1);
|
||||
|
||||
static const struct pccard_product wi_pccard_products[] = {
|
||||
PCMCIA_CARD(3COM, 3CRWE737A),
|
||||
PCMCIA_CARD(3COM, 3CRWE777A),
|
||||
PCMCIA_CARD(ACTIONTEC, PRISM),
|
||||
PCMCIA_CARD(ADAPTEC2, ANW8030),
|
||||
PCMCIA_CARD(ADDTRON, AWP100),
|
||||
PCMCIA_CARD(AIRVAST, WN_100B),
|
||||
PCMCIA_CARD(AIRVAST, WN_100),
|
||||
PCMCIA_CARD(ALLIEDTELESIS, WR211PCM),
|
||||
PCMCIA_CARD(ARTEM, ONAIR),
|
||||
PCMCIA_CARD(ASUS, WL100),
|
||||
PCMCIA_CARD(BAY, EMOBILITY_11B),
|
||||
PCMCIA_CARD(BROMAX, IWN),
|
||||
PCMCIA_CARD(BROMAX, IWN3),
|
||||
PCMCIA_CARD(BROMAX, WCF11),
|
||||
PCMCIA_CARD(BUFFALO, WLI_CF_S11G),
|
||||
PCMCIA_CARD(BUFFALO, WLI_PCM_S11),
|
||||
PCMCIA_CARD(COMPAQ, NC5004),
|
||||
PCMCIA_CARD(CONTEC, FX_DS110_PCC),
|
||||
PCMCIA_CARD(COREGA, WIRELESS_LAN_PCC_11),
|
||||
PCMCIA_CARD(COREGA, WIRELESS_LAN_PCCA_11),
|
||||
PCMCIA_CARD(COREGA, WIRELESS_LAN_PCCB_11),
|
||||
PCMCIA_CARD(COREGA, WIRELESS_LAN_PCCL_11),
|
||||
PCMCIA_CARD(DLINK, DWL650H),
|
||||
PCMCIA_CARD(ELSA, XI300_IEEE),
|
||||
PCMCIA_CARD(ELSA, XI325_IEEE),
|
||||
PCMCIA_CARD(ELSA, APDL325_IEEE),
|
||||
PCMCIA_CARD(ELSA, XI330_IEEE),
|
||||
PCMCIA_CARD(ELSA, XI800_IEEE),
|
||||
PCMCIA_CARD(ELSA, WIFI_FLASH),
|
||||
PCMCIA_CARD(EMTAC, WLAN),
|
||||
PCMCIA_CARD(ERICSSON, WIRELESSLAN),
|
||||
PCMCIA_CARD(GEMTEK, WLAN),
|
||||
PCMCIA_CARD(HWN, AIRWAY80211),
|
||||
PCMCIA_CARD(INTEL, PRO_WLAN_2011),
|
||||
PCMCIA_CARD(INTERSIL, ISL37100P),
|
||||
PCMCIA_CARD(INTERSIL, ISL37110P),
|
||||
PCMCIA_CARD(INTERSIL, ISL37300P),
|
||||
PCMCIA_CARD(INTERSIL2, PRISM2),
|
||||
PCMCIA_CARD(IODATA2, WCF12),
|
||||
PCMCIA_CARD(IODATA2, WNB11PCM),
|
||||
PCMCIA_CARD(FUJITSU, WL110),
|
||||
PCMCIA_CARD(LUCENT, WAVELAN_IEEE),
|
||||
PCMCIA_CARD(MICROSOFT, MN_520),
|
||||
PCMCIA_CARD(NOKIA, C020_WLAN),
|
||||
PCMCIA_CARD(NOKIA, C110_WLAN),
|
||||
PCMCIA_CARD(PLANEX, GWNS11H),
|
||||
PCMCIA_CARD(PROXIM, HARMONY),
|
||||
PCMCIA_CARD(PROXIM, RANGELANDS_8430),
|
||||
PCMCIA_CARD(SAMSUNG, SWL_2000N),
|
||||
PCMCIA_CARD(SIEMENS, SS1021),
|
||||
PCMCIA_CARD(SIEMENS, SS1021A),
|
||||
PCMCIA_CARD(SIMPLETECH, SPECTRUM24_ALT),
|
||||
PCMCIA_CARD(SOCKET, LP_WLAN_CF),
|
||||
PCMCIA_CARD(TDK, LAK_CD011WL),
|
||||
{ NULL }
|
||||
};
|
||||
PCCARD_PNP_INFO(wi_pccard_products);
|
||||
|
||||
static int
|
||||
wi_pccard_probe(device_t dev)
|
||||
{
|
||||
const struct pccard_product *pp;
|
||||
u_int32_t fcn = PCCARD_FUNCTION_UNSPEC;
|
||||
int error;
|
||||
|
||||
/* Make sure we're a network driver */
|
||||
error = pccard_get_function(dev, &fcn);
|
||||
if (error != 0)
|
||||
return error;
|
||||
if (fcn != PCCARD_FUNCTION_NETWORK)
|
||||
return ENXIO;
|
||||
|
||||
pp = pccard_product_lookup(dev, wi_pccard_products,
|
||||
sizeof(wi_pccard_products[0]), NULL);
|
||||
if (pp != NULL) {
|
||||
if (pp->pp_name != NULL)
|
||||
device_set_desc(dev, pp->pp_name);
|
||||
return 0;
|
||||
}
|
||||
return ENXIO;
|
||||
}
|
||||
|
||||
static int
|
||||
wi_pccard_attach(device_t dev)
|
||||
{
|
||||
struct wi_softc *sc;
|
||||
int error;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
sc->wi_gone = 0;
|
||||
sc->wi_bus_type = WI_BUS_PCCARD;
|
||||
|
||||
error = wi_alloc(dev, 0);
|
||||
if (error == 0) {
|
||||
/* Make sure interrupts are disabled. */
|
||||
CSR_WRITE_2(sc, WI_INT_EN, 0);
|
||||
CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF);
|
||||
|
||||
error = wi_attach(dev);
|
||||
if (error != 0)
|
||||
wi_free(dev);
|
||||
gone_in_dev(dev, 13, "pccard removed, wi doesn't support modern crypto");
|
||||
}
|
||||
return error;
|
||||
}
|
@ -1,267 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-4-Clause
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
* Bill Paul <wpaul@ctr.columbia.edu>. 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Bill Paul.
|
||||
* 4. 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 Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
|
||||
* 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$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Lucent WaveLAN/IEEE 802.11 PCMCIA driver for FreeBSD.
|
||||
*
|
||||
* Written by Bill Paul <wpaul@ctr.columbia.edu>
|
||||
* Electrical Engineering Department
|
||||
* Columbia University, New York City
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
#include <sys/rman.h>
|
||||
|
||||
#include <dev/pci/pcireg.h>
|
||||
#include <dev/pci/pcivar.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/if_var.h>
|
||||
#include <net/if_arp.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/if_media.h>
|
||||
#include <net/if_types.h>
|
||||
|
||||
#include <net80211/ieee80211_var.h>
|
||||
#include <net80211/ieee80211_radiotap.h>
|
||||
|
||||
#include <dev/wi/if_wavelan_ieee.h>
|
||||
#include <dev/wi/if_wireg.h>
|
||||
#include <dev/wi/if_wivar.h>
|
||||
|
||||
static int wi_pci_probe(device_t);
|
||||
static int wi_pci_attach(device_t);
|
||||
static int wi_pci_suspend(device_t);
|
||||
static int wi_pci_resume(device_t);
|
||||
|
||||
static device_method_t wi_pci_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_probe, wi_pci_probe),
|
||||
DEVMETHOD(device_attach, wi_pci_attach),
|
||||
DEVMETHOD(device_detach, wi_detach),
|
||||
DEVMETHOD(device_shutdown, wi_shutdown),
|
||||
DEVMETHOD(device_suspend, wi_pci_suspend),
|
||||
DEVMETHOD(device_resume, wi_pci_resume),
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
static driver_t wi_pci_driver = {
|
||||
"wi",
|
||||
wi_pci_methods,
|
||||
sizeof(struct wi_softc)
|
||||
};
|
||||
|
||||
static struct {
|
||||
unsigned int vendor,device;
|
||||
int bus_type;
|
||||
char *desc;
|
||||
} pci_ids[] = {
|
||||
/* Sorted by description */
|
||||
{0x10b7, 0x7770, WI_BUS_PCI_PLX, "3Com Airconnect"},
|
||||
{0x16ab, 0x1101, WI_BUS_PCI_PLX, "GLPRISM2 WaveLAN"},
|
||||
{0x1260, 0x3872, WI_BUS_PCI_NATIVE, "Intersil Prism3"},
|
||||
{0x1260, 0x3873, WI_BUS_PCI_NATIVE, "Intersil Prism2.5"},
|
||||
{0x16ab, 0x1102, WI_BUS_PCI_PLX, "Linksys WDT11"},
|
||||
{0x1385, 0x4100, WI_BUS_PCI_PLX, "Netgear MA301"},
|
||||
{0x1638, 0x1100, WI_BUS_PCI_PLX, "PRISM2STA WaveLAN"},
|
||||
{0x111a, 0x1023, WI_BUS_PCI_PLX, "Siemens SpeedStream"},
|
||||
{0x10b5, 0x9050, WI_BUS_PCI_PLX, "SMC 2602W"},
|
||||
{0x16ec, 0x3685, WI_BUS_PCI_PLX, "US Robotics 2415"},
|
||||
{0x4033, 0x7001, WI_BUS_PCI_PLX, "Addtron AWA-100 PCI"},
|
||||
{0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
DRIVER_MODULE(wi, pci, wi_pci_driver, wi_devclass, 0, 0);
|
||||
MODULE_DEPEND(wi, pci, 1, 1, 1);
|
||||
MODULE_DEPEND(wi, wlan, 1, 1, 1);
|
||||
|
||||
static int
|
||||
wi_pci_probe(dev)
|
||||
device_t dev;
|
||||
{
|
||||
struct wi_softc *sc;
|
||||
int i;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
for(i=0; pci_ids[i].vendor != 0; i++) {
|
||||
if ((pci_get_vendor(dev) == pci_ids[i].vendor) &&
|
||||
(pci_get_device(dev) == pci_ids[i].device)) {
|
||||
sc->wi_bus_type = pci_ids[i].bus_type;
|
||||
device_set_desc(dev, pci_ids[i].desc);
|
||||
return (BUS_PROBE_DEFAULT);
|
||||
}
|
||||
}
|
||||
return(ENXIO);
|
||||
}
|
||||
|
||||
static int
|
||||
wi_pci_attach(device_t dev)
|
||||
{
|
||||
struct wi_softc *sc;
|
||||
u_int32_t command;
|
||||
u_int16_t reg;
|
||||
int error;
|
||||
int timeout;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
|
||||
if (sc->wi_bus_type != WI_BUS_PCI_NATIVE) {
|
||||
error = wi_alloc(dev, WI_PCI_IORES);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
/* Make sure interrupts are disabled. */
|
||||
CSR_WRITE_2(sc, WI_INT_EN, 0);
|
||||
CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF);
|
||||
|
||||
/* We have to do a magic PLX poke to enable interrupts */
|
||||
sc->local_rid = WI_PCI_LOCALRES;
|
||||
sc->local = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
|
||||
&sc->local_rid, RF_ACTIVE);
|
||||
sc->wi_localtag = rman_get_bustag(sc->local);
|
||||
sc->wi_localhandle = rman_get_bushandle(sc->local);
|
||||
command = bus_space_read_4(sc->wi_localtag, sc->wi_localhandle,
|
||||
WI_LOCAL_INTCSR);
|
||||
command |= WI_LOCAL_INTEN;
|
||||
bus_space_write_4(sc->wi_localtag, sc->wi_localhandle,
|
||||
WI_LOCAL_INTCSR, command);
|
||||
bus_release_resource(dev, SYS_RES_IOPORT, sc->local_rid,
|
||||
sc->local);
|
||||
sc->local = NULL;
|
||||
|
||||
sc->mem_rid = WI_PCI_MEMRES;
|
||||
sc->mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
|
||||
&sc->mem_rid, RF_ACTIVE);
|
||||
if (sc->mem == NULL) {
|
||||
device_printf(dev, "couldn't allocate memory\n");
|
||||
wi_free(dev);
|
||||
return (ENXIO);
|
||||
}
|
||||
sc->wi_bmemtag = rman_get_bustag(sc->mem);
|
||||
sc->wi_bmemhandle = rman_get_bushandle(sc->mem);
|
||||
|
||||
/*
|
||||
* Write COR to enable PC card
|
||||
* This is a subset of the protocol that the pccard bus code
|
||||
* would do. In theory, we should parse the CIS to find the
|
||||
* COR offset. In practice, the COR_OFFSET is always 0x3e0.
|
||||
*/
|
||||
CSM_WRITE_1(sc, WI_COR_OFFSET, WI_COR_VALUE);
|
||||
reg = CSM_READ_1(sc, WI_COR_OFFSET);
|
||||
if (reg != WI_COR_VALUE) {
|
||||
device_printf(dev, "CSM_READ_1(WI_COR_OFFSET) "
|
||||
"wanted %d, got %d\n", WI_COR_VALUE, reg);
|
||||
wi_free(dev);
|
||||
return (ENXIO);
|
||||
}
|
||||
} else {
|
||||
error = wi_alloc(dev, WI_PCI_LMEMRES);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
CSR_WRITE_2(sc, WI_PCICOR_OFF, WI_PCICOR_RESET);
|
||||
DELAY(250000);
|
||||
|
||||
CSR_WRITE_2(sc, WI_PCICOR_OFF, 0x0000);
|
||||
DELAY(500000);
|
||||
|
||||
timeout=2000000;
|
||||
while ((--timeout > 0) &&
|
||||
(CSR_READ_2(sc, WI_COMMAND) & WI_CMD_BUSY))
|
||||
DELAY(10);
|
||||
|
||||
if (timeout == 0) {
|
||||
device_printf(dev, "couldn't reset prism pci core.\n");
|
||||
wi_free(dev);
|
||||
return(ENXIO);
|
||||
}
|
||||
}
|
||||
|
||||
CSR_WRITE_2(sc, WI_HFA384X_SWSUPPORT0_OFF, WI_PRISM2STA_MAGIC);
|
||||
reg = CSR_READ_2(sc, WI_HFA384X_SWSUPPORT0_OFF);
|
||||
if (reg != WI_PRISM2STA_MAGIC) {
|
||||
device_printf(dev,
|
||||
"CSR_READ_2(WI_HFA384X_SWSUPPORT0_OFF) "
|
||||
"wanted %d, got %d\n", WI_PRISM2STA_MAGIC, reg);
|
||||
wi_free(dev);
|
||||
return (ENXIO);
|
||||
}
|
||||
|
||||
error = wi_attach(dev);
|
||||
if (error != 0)
|
||||
wi_free(dev);
|
||||
else
|
||||
gone_in_dev(dev, 13, "pccard removed, wi doesn't support modern crypto");
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
wi_pci_suspend(device_t dev)
|
||||
{
|
||||
struct wi_softc *sc = device_get_softc(dev);
|
||||
|
||||
WI_LOCK(sc);
|
||||
wi_stop(sc, 1);
|
||||
WI_UNLOCK(sc);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
wi_pci_resume(device_t dev)
|
||||
{
|
||||
struct wi_softc *sc = device_get_softc(dev);
|
||||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
|
||||
WI_LOCK(sc);
|
||||
if (sc->wi_bus_type != WI_BUS_PCI_NATIVE) {
|
||||
WI_UNLOCK(sc);
|
||||
return (0);
|
||||
}
|
||||
if (ic->ic_nrunning > 0)
|
||||
wi_init(sc);
|
||||
WI_UNLOCK(sc);
|
||||
return (0);
|
||||
}
|
@ -1,726 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-4-Clause
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
* Bill Paul <wpaul@ctr.columbia.edu>. 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Bill Paul.
|
||||
* 4. 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 Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#define WI_DELAY 5
|
||||
#define WI_TIMEOUT (500000/WI_DELAY) /* 500 ms */
|
||||
|
||||
#define WI_PORT0 (0 << 8)
|
||||
#define WI_PORT1 (1 << 8)
|
||||
#define WI_PORT2 (2 << 8)
|
||||
#define WI_PORT3 (3 << 8)
|
||||
#define WI_PORT4 (4 << 8)
|
||||
#define WI_PORT5 (5 << 8)
|
||||
|
||||
#define WI_PCI_LMEMRES 0x10 /* PCI Memory (native PCI implementations) */
|
||||
#define WI_PCI_LOCALRES 0x14 /* The PLX chip's local registers */
|
||||
#define WI_PCI_MEMRES 0x18 /* The PCCard's attribute memory */
|
||||
#define WI_PCI_IORES 0x1C /* The PCCard's I/O space */
|
||||
|
||||
#define WI_LOCAL_INTCSR 0x4c
|
||||
#define WI_LOCAL_INTEN 0x40
|
||||
#define WI_HFA384X_SWSUPPORT0_OFF 0x28
|
||||
#define WI_PRISM2STA_MAGIC 0x4A2D
|
||||
#define WI_PCICOR_OFF 0x26
|
||||
#define WI_PCICOR_RESET 0x0080
|
||||
|
||||
/* Default port: 0 (only 0 exists on stations) */
|
||||
#define WI_DEFAULT_PORT WI_PORT0
|
||||
|
||||
/* Default network name: ANY */
|
||||
/*
|
||||
* [sommerfeld 1999/07/15] Changed from "ANY" to ""; according to Bill Fenner,
|
||||
* ANY is used in MS driver user interfaces, while "" is used over the
|
||||
* wire..
|
||||
*/
|
||||
#define WI_DEFAULT_NETNAME ""
|
||||
|
||||
#define WI_DEFAULT_AP_DENSITY 1
|
||||
|
||||
#define WI_DEFAULT_RTS_THRESH 2347
|
||||
|
||||
#define WI_DEFAULT_DATALEN 2304
|
||||
|
||||
#define WI_DEFAULT_CREATE_IBSS 0
|
||||
|
||||
#define WI_DEFAULT_PM_ENABLED 0
|
||||
|
||||
#define WI_DEFAULT_MAX_SLEEP 100
|
||||
|
||||
#define WI_DEFAULT_ROAMING 1
|
||||
|
||||
#define WI_DEFAULT_AUTHTYPE 1
|
||||
|
||||
#ifdef __NetBSD__
|
||||
#define OS_STRING_NAME "NetBSD"
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
#define OS_STRING_NAME "FreeBSD"
|
||||
#endif
|
||||
#ifdef __OpenBSD__
|
||||
#define OS_STRING_NAME "OpenBSD"
|
||||
#endif
|
||||
|
||||
#define WI_DEFAULT_NODENAME OS_STRING_NAME " WaveLAN/IEEE node"
|
||||
|
||||
#define WI_DEFAULT_IBSS OS_STRING_NAME " IBSS"
|
||||
|
||||
#define WI_BUS_PCCARD 0 /* pccard device */
|
||||
#define WI_BUS_PCI_PLX 1 /* PCI card w/ PLX PCI/PCMICA bridge */
|
||||
#define WI_BUS_PCI_NATIVE 2 /* native PCI device (Prism 2.5) */
|
||||
|
||||
/*
|
||||
* register space access macros
|
||||
*/
|
||||
#define CSR_WRITE_4(sc, reg, val) \
|
||||
bus_space_write_4((sc)->wi_btag, (sc)->wi_bhandle, \
|
||||
(sc)->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg)*2 : (reg), val)
|
||||
#define CSR_WRITE_2(sc, reg, val) \
|
||||
bus_space_write_2((sc)->wi_btag, (sc)->wi_bhandle, \
|
||||
(sc)->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg)*2 : (reg), val)
|
||||
#define CSR_WRITE_1(sc, reg, val) \
|
||||
bus_space_write_1((sc)->wi_btag, (sc)->wi_bhandle, \
|
||||
(sc)->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg)*2 : (reg), val)
|
||||
|
||||
#define CSR_READ_4(sc, reg) \
|
||||
bus_space_read_4((sc)->wi_btag, (sc)->wi_bhandle, \
|
||||
(sc)->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg)*2 : (reg))
|
||||
#define CSR_READ_2(sc, reg) \
|
||||
bus_space_read_2((sc)->wi_btag, (sc)->wi_bhandle, \
|
||||
(sc)->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg)*2 : (reg))
|
||||
#define CSR_READ_1(sc, reg) \
|
||||
bus_space_read_1((sc)->wi_btag, (sc)->wi_bhandle, \
|
||||
(sc)->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg)*2 : (reg))
|
||||
|
||||
#define CSM_WRITE_1(sc, off, val) \
|
||||
bus_space_write_1((sc)->wi_bmemtag, (sc)->wi_bmemhandle, off, val)
|
||||
|
||||
#define CSM_READ_1(sc, off) \
|
||||
bus_space_read_1((sc)->wi_bmemtag, (sc)->wi_bmemhandle, off)
|
||||
|
||||
#define CSR_WRITE_STREAM_2(sc, reg, val) \
|
||||
bus_space_write_stream_2(sc->wi_btag, sc->wi_bhandle, \
|
||||
(sc->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg) * 2 : (reg)), val)
|
||||
#define CSR_WRITE_MULTI_STREAM_2(sc, reg, val, count) \
|
||||
bus_space_write_multi_stream_2(sc->wi_btag, sc->wi_bhandle, \
|
||||
(sc->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg) * 2 : (reg)), val, count)
|
||||
#define CSR_READ_STREAM_2(sc, reg) \
|
||||
bus_space_read_stream_2(sc->wi_btag, sc->wi_bhandle, \
|
||||
(sc->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg) * 2 : (reg)))
|
||||
#define CSR_READ_MULTI_STREAM_2(sc, reg, buf, count) \
|
||||
bus_space_read_multi_stream_2(sc->wi_btag, sc->wi_bhandle, \
|
||||
(sc->wi_bus_type == WI_BUS_PCI_NATIVE ? (reg) * 2 : (reg)), buf, count)
|
||||
|
||||
/*
|
||||
* The WaveLAN/IEEE cards contain an 802.11 MAC controller which Lucent
|
||||
* calls 'Hermes.' In typical fashion, getting documentation about this
|
||||
* controller is about as easy as squeezing blood from a stone. Here
|
||||
* is more or less what I know:
|
||||
*
|
||||
* - The Hermes controller is firmware driven, and the host interacts
|
||||
* with the Hermes via a firmware interface, which can change.
|
||||
*
|
||||
* - The Hermes is described in a document called: "Hermes Firmware
|
||||
* WaveLAN/IEEE Station Functions," document #010245, which of course
|
||||
* Lucent will not release without an NDA.
|
||||
*
|
||||
* - Lucent has created a library called HCF (Hardware Control Functions)
|
||||
* though which it wants developers to interact with the card. The HCF
|
||||
* is needlessly complex, ill conceived and badly documented. Actually,
|
||||
* the comments in the HCP code itself aren't bad, but the publicly
|
||||
* available manual that comes with it is awful, probably due largely to
|
||||
* the fact that it has been emasculated in order to hide information
|
||||
* that Lucent wants to keep proprietary. The purpose of the HCF seems
|
||||
* to be to insulate the driver programmer from the Hermes itself so that
|
||||
* Lucent has an excuse not to release programming in for it.
|
||||
*
|
||||
* - Lucent only makes available documentation and code for 'HCF Light'
|
||||
* which is a stripped down version of HCF with certain features not
|
||||
* implemented, most notably support for 802.11 frames.
|
||||
*
|
||||
* - The HCF code which I have seen blows goats. Whoever decided to
|
||||
* use a 132 column format should be shot.
|
||||
*
|
||||
* Rather than actually use the Lucent HCF library, I have stripped all
|
||||
* the useful information from it and used it to create a driver in the
|
||||
* usual BSD form. Note: I don't want to hear anybody whining about the
|
||||
* fact that the Lucent code is GPLed and mine isn't. I did not actually
|
||||
* put any of Lucent's code in this driver: I only used it as a reference
|
||||
* to obtain information about the underlying hardware. The Hermes
|
||||
* programming interface is not GPLed, so bite me.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Size of Hermes & Prism2 I/O space.
|
||||
*/
|
||||
#define WI_IOSIZ 0x40
|
||||
|
||||
/*
|
||||
* Hermes & Prism2 register definitions
|
||||
*/
|
||||
|
||||
/* Hermes command/status registers. */
|
||||
#define WI_COMMAND 0x00
|
||||
#define WI_PARAM0 0x02
|
||||
#define WI_PARAM1 0x04
|
||||
#define WI_PARAM2 0x06
|
||||
#define WI_STATUS 0x08
|
||||
#define WI_RESP0 0x0A
|
||||
#define WI_RESP1 0x0C
|
||||
#define WI_RESP2 0x0E
|
||||
|
||||
/* Command register values. */
|
||||
#define WI_CMD_BUSY 0x8000 /* busy bit */
|
||||
#define WI_CMD_INI 0x0000 /* initialize */
|
||||
#define WI_CMD_ENABLE 0x0001 /* enable */
|
||||
#define WI_CMD_DISABLE 0x0002 /* disable */
|
||||
#define WI_CMD_DIAG 0x0003
|
||||
#define WI_CMD_ALLOC_MEM 0x000A /* allocate NIC memory */
|
||||
#define WI_CMD_TX 0x000B /* transmit */
|
||||
#define WI_CMD_NOTIFY 0x0010
|
||||
#define WI_CMD_INQUIRE 0x0011
|
||||
#define WI_CMD_ACCESS 0x0021
|
||||
#define WI_CMD_ACCESS_WRITE 0x0121
|
||||
#define WI_CMD_PROGRAM 0x0022
|
||||
#define WI_CMD_READEE 0x0030 /* symbol only */
|
||||
#define WI_CMD_READMIF 0x0030 /* prism2 */
|
||||
#define WI_CMD_WRITEMIF 0x0031 /* prism2 */
|
||||
#define WI_CMD_DEBUG 0x0038 /* Various test commands */
|
||||
|
||||
#define WI_CMD_CODE_MASK 0x003F
|
||||
|
||||
/*
|
||||
* Various cmd test stuff.
|
||||
*/
|
||||
#define WI_TEST_MONITOR 0x0B
|
||||
#define WI_TEST_STOP 0x0F
|
||||
#define WI_TEST_CFG_BITS 0x15
|
||||
#define WI_TEST_CFG_BIT_ALC 0x08
|
||||
|
||||
/*
|
||||
* Reclaim qualifier bit, applicable to the
|
||||
* TX and INQUIRE commands.
|
||||
*/
|
||||
#define WI_RECLAIM 0x0100 /* reclaim NIC memory */
|
||||
|
||||
/*
|
||||
* ACCESS command qualifier bits.
|
||||
*/
|
||||
#define WI_ACCESS_READ 0x0000
|
||||
#define WI_ACCESS_WRITE 0x0100
|
||||
|
||||
/*
|
||||
* PROGRAM command qualifier bits.
|
||||
*/
|
||||
#define WI_PROGRAM_DISABLE 0x0000
|
||||
#define WI_PROGRAM_ENABLE_RAM 0x0100
|
||||
#define WI_PROGRAM_ENABLE_NVRAM 0x0200
|
||||
#define WI_PROGRAM_NVRAM 0x0300
|
||||
|
||||
/* Status register values */
|
||||
#define WI_STAT_CMD_CODE 0x003F
|
||||
#define WI_STAT_DIAG_ERR 0x0100
|
||||
#define WI_STAT_INQ_ERR 0x0500
|
||||
#define WI_STAT_CMD_RESULT 0x7F00
|
||||
|
||||
/* memory handle management registers */
|
||||
#define WI_INFO_FID 0x10
|
||||
#define WI_RX_FID 0x20
|
||||
#define WI_ALLOC_FID 0x22
|
||||
#define WI_TX_CMP_FID 0x24
|
||||
|
||||
/*
|
||||
* Buffer Access Path (BAP) registers.
|
||||
* These are I/O channels. I believe you can use each one for
|
||||
* any desired purpose independently of the other. In general
|
||||
* though, we use BAP1 for reading and writing LTV records and
|
||||
* reading received data frames, and BAP0 for writing transmit
|
||||
* frames. This is a convention though, not a rule.
|
||||
*/
|
||||
#define WI_SEL0 0x18
|
||||
#define WI_SEL1 0x1A
|
||||
#define WI_OFF0 0x1C
|
||||
#define WI_OFF1 0x1E
|
||||
#define WI_DATA0 0x36
|
||||
#define WI_DATA1 0x38
|
||||
#define WI_BAP0 WI_DATA0
|
||||
#define WI_BAP1 WI_DATA1
|
||||
|
||||
#define WI_OFF_BUSY 0x8000
|
||||
#define WI_OFF_ERR 0x4000
|
||||
#define WI_OFF_DATAOFF 0x0FFF
|
||||
|
||||
/* Event registers */
|
||||
#define WI_EVENT_STAT 0x30 /* Event status */
|
||||
#define WI_INT_EN 0x32 /* Interrupt enable/disable */
|
||||
#define WI_EVENT_ACK 0x34 /* Ack event */
|
||||
|
||||
/* Events */
|
||||
#define WI_EV_TICK 0x8000 /* aux timer tick */
|
||||
#define WI_EV_RES 0x4000 /* controller h/w error (time out) */
|
||||
#define WI_EV_INFO_DROP 0x2000 /* no RAM to build unsolicited frame */
|
||||
#define WI_EV_NO_CARD 0x0800 /* card removed (hunh?) */
|
||||
#define WI_EV_DUIF_RX 0x0400 /* wavelan management packet received */
|
||||
#define WI_EV_INFO 0x0080 /* async info frame */
|
||||
#define WI_EV_CMD 0x0010 /* command completed */
|
||||
#define WI_EV_ALLOC 0x0008 /* async alloc/reclaim completed */
|
||||
#define WI_EV_TX_EXC 0x0004 /* async xmit completed with failure */
|
||||
#define WI_EV_TX 0x0002 /* async xmit completed successfully */
|
||||
#define WI_EV_RX 0x0001 /* async rx completed */
|
||||
|
||||
/* Host software registers */
|
||||
#define WI_SW0 0x28
|
||||
#define WI_SW1 0x2A
|
||||
#define WI_SW2 0x2C
|
||||
#define WI_SW3 0x2E /* does not appear in Prism2 */
|
||||
|
||||
#define WI_CNTL 0x14
|
||||
|
||||
#define WI_CNTL_AUX_ENA 0xC000
|
||||
#define WI_CNTL_AUX_ENA_STAT 0xC000
|
||||
#define WI_CNTL_AUX_DIS_STAT 0x0000
|
||||
#define WI_CNTL_AUX_ENA_CNTL 0x8000
|
||||
#define WI_CNTL_AUX_DIS_CNTL 0x4000
|
||||
|
||||
#define WI_AUX_PAGE 0x3A
|
||||
#define WI_AUX_OFFSET 0x3C
|
||||
#define WI_AUX_DATA 0x3E
|
||||
|
||||
#define WI_AUX_PGSZ 128
|
||||
#define WI_AUX_KEY0 0xfe01
|
||||
#define WI_AUX_KEY1 0xdc23
|
||||
#define WI_AUX_KEY2 0xba45
|
||||
|
||||
#define WI_COR 0x40 /* only for Symbol */
|
||||
#define WI_COR_RESET 0x0080
|
||||
#define WI_COR_IOMODE 0x0041
|
||||
|
||||
#define WI_HCR 0x42 /* only for Symbol */
|
||||
#define WI_HCR_4WIRE 0x0010
|
||||
#define WI_HCR_RUN 0x0007
|
||||
#define WI_HCR_HOLD 0x000f
|
||||
#define WI_HCR_EEHOLD 0x00ce
|
||||
|
||||
#define WI_COR_OFFSET 0x3e0 /* OK for PCI, default COR for Prism PC Card */
|
||||
#define WI_COR_VALUE 0x41
|
||||
|
||||
/*
|
||||
* One form of communication with the Hermes is with what Lucent calls
|
||||
* LTV records, where LTV stands for Length, Type and Value. The length
|
||||
* and type are 16 bits and are in native byte order. The value is in
|
||||
* multiples of 16 bits and is in little endian byte order.
|
||||
*/
|
||||
struct wi_lt_hdr {
|
||||
u_int16_t wi_len;
|
||||
u_int16_t wi_type;
|
||||
/* value is vary depends on resource id */
|
||||
};
|
||||
|
||||
/*
|
||||
* Download buffer location and length (0xFD01).
|
||||
*/
|
||||
struct wi_dnld_buf {
|
||||
u_int16_t wi_buf_pg; /* page addr of intermediate dl buf*/
|
||||
u_int16_t wi_buf_off; /* offset of idb */
|
||||
u_int16_t wi_buf_len; /* len of idb */
|
||||
};
|
||||
|
||||
/*
|
||||
* Mem sizes (0xFD02).
|
||||
*/
|
||||
struct wi_memsz {
|
||||
u_int16_t wi_mem_ram;
|
||||
u_int16_t wi_mem_nvram;
|
||||
};
|
||||
|
||||
/*
|
||||
* NIC Identification (0xFD0B, 0xFD20)
|
||||
*/
|
||||
struct wi_ver {
|
||||
u_int16_t wi_ver[4];
|
||||
};
|
||||
|
||||
/* define card ident */
|
||||
#define WI_NIC_LUCENT_ID 0x0001
|
||||
#define WI_NIC_LUCENT_STR "Lucent Technologies, WaveLAN/IEEE"
|
||||
|
||||
#define WI_NIC_SONY_ID 0x0002
|
||||
#define WI_NIC_SONY_STR "Sony WaveLAN/IEEE"
|
||||
|
||||
#define WI_NIC_LUCENT_EMB_ID 0x0005
|
||||
#define WI_NIC_LUCENT_EMB_STR "Lucent Embedded WaveLAN/IEEE"
|
||||
|
||||
#define WI_NIC_EVB2_ID 0x8000
|
||||
#define WI_NIC_EVB2_STR "RF:PRISM2 MAC:HFA3841"
|
||||
|
||||
#define WI_NIC_HWB3763_ID 0x8001
|
||||
#define WI_NIC_HWB3763_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3763 rev.B"
|
||||
|
||||
#define WI_NIC_HWB3163_ID 0x8002
|
||||
#define WI_NIC_HWB3163_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.A"
|
||||
|
||||
#define WI_NIC_HWB3163B_ID 0x8003
|
||||
#define WI_NIC_HWB3163B_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3163 rev.B"
|
||||
|
||||
#define WI_NIC_EVB3_ID 0x8004
|
||||
#define WI_NIC_EVB3_STR "RF:PRISM2 MAC:HFA3842 CARD:HFA3842 EVAL"
|
||||
|
||||
#define WI_NIC_HWB1153_ID 0x8007
|
||||
#define WI_NIC_HWB1153_STR "RF:PRISM1 MAC:HFA3841 CARD:HWB1153"
|
||||
|
||||
#define WI_NIC_P2_SST_ID 0x8008 /* Prism2 with SST flush */
|
||||
#define WI_NIC_P2_SST_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3163-SST-flash"
|
||||
|
||||
#define WI_NIC_EVB2_SST_ID 0x8009
|
||||
#define WI_NIC_EVB2_SST_STR "RF:PRISM2 MAC:HFA3841 CARD:HWB3163-SST-flash"
|
||||
|
||||
#define WI_NIC_3842_EVA_ID 0x800A /* 3842 Evaluation Board */
|
||||
#define WI_NIC_3842_EVA_STR "RF:PRISM2 MAC:HFA3842 CARD:HFA3842 EVAL"
|
||||
|
||||
#define WI_NIC_3842_PCMCIA_AMD_ID 0x800B /* Prism2.5 PCMCIA */
|
||||
#define WI_NIC_3842_PCMCIA_SST_ID 0x800C
|
||||
#define WI_NIC_3842_PCMCIA_ATL_ID 0x800D
|
||||
#define WI_NIC_3842_PCMCIA_ATS_ID 0x800E
|
||||
#define WI_NIC_3842_PCMCIA_STR "RF:PRISM2.5 MAC:ISL3873"
|
||||
|
||||
#define WI_NIC_3842_MINI_AMD_ID 0x8012 /* Prism2.5 Mini-PCI */
|
||||
#define WI_NIC_3842_MINI_SST_ID 0x8013
|
||||
#define WI_NIC_3842_MINI_ATL_ID 0x8014
|
||||
#define WI_NIC_3842_MINI_ATS_ID 0x8015
|
||||
#define WI_NIC_3842_MINI_STR "RF:PRISM2.5 MAC:ISL3874A(Mini-PCI)"
|
||||
|
||||
#define WI_NIC_3842_PCI_AMD_ID 0x8016 /* Prism2.5 PCI-bridge */
|
||||
#define WI_NIC_3842_PCI_SST_ID 0x8017
|
||||
#define WI_NIC_3842_PCI_ATL_ID 0x8018
|
||||
#define WI_NIC_3842_PCI_ATS_ID 0x8019
|
||||
#define WI_NIC_3842_PCI_STR "RF:PRISM2.5 MAC:ISL3874A(PCI-bridge)"
|
||||
|
||||
#define WI_NIC_P3_PCMCIA_AMD_ID 0x801A /* Prism3 PCMCIA */
|
||||
#define WI_NIC_P3_PCMCIA_SST_ID 0x801B
|
||||
#define WI_NIC_P3_PCMCIA_ATL_ID 0x801C
|
||||
#define WI_NIC_P3_PCMCIA_ATS_ID 0x801D
|
||||
#define WI_NIC_P3_PCMCIA_STR "RF:PRISM3(PCMCIA)"
|
||||
|
||||
#define WI_NIC_P3_USB_AMD_ID 0x801E
|
||||
#define WI_NIC_P3_USB_SST_ID 0x801F
|
||||
#define WI_NIC_P3_USB_ATL_ID 0x8020
|
||||
|
||||
#define WI_NIC_P3_MINI_AMD_ID 0x8021 /* Prism3 Mini-PCI */
|
||||
#define WI_NIC_P3_MINI_SST_ID 0x8022
|
||||
#define WI_NIC_P3_MINI_ATL_ID 0x8023
|
||||
#define WI_NIC_P3_MINI_ATS_ID 0x8024
|
||||
#define WI_NIC_P3_MINI_STR "RF:PRISM3(Mini-PCI)"
|
||||
|
||||
/*
|
||||
* List of intended regulatory domains (0xFD11).
|
||||
*/
|
||||
struct wi_ltv_domains {
|
||||
u_int16_t wi_len;
|
||||
u_int16_t wi_type;
|
||||
u_int16_t wi_num_dom;
|
||||
u_int8_t wi_domains[10];
|
||||
};
|
||||
|
||||
/*
|
||||
* CIS struct (0xFD13).
|
||||
*/
|
||||
struct wi_cis {
|
||||
u_int16_t wi_cis[240];
|
||||
};
|
||||
|
||||
/*
|
||||
* Communications quality (0xFD43).
|
||||
*/
|
||||
struct wi_commqual {
|
||||
u_int16_t wi_coms_qual;
|
||||
u_int16_t wi_sig_lvl;
|
||||
u_int16_t wi_noise_lvl;
|
||||
};
|
||||
|
||||
/*
|
||||
* Actual system scale thresholds (0xFC06, 0xFD46).
|
||||
*/
|
||||
struct wi_scalethresh {
|
||||
u_int16_t wi_energy_detect;
|
||||
u_int16_t wi_carrier_detect;
|
||||
u_int16_t wi_defer;
|
||||
u_int16_t wi_cell_search;
|
||||
u_int16_t wi_out_of_range;
|
||||
u_int16_t wi_delta_snr;
|
||||
};
|
||||
|
||||
/*
|
||||
* PCF info struct (0xFD87).
|
||||
*/
|
||||
struct wi_pcf {
|
||||
u_int16_t wi_medium_occupancy_limit;
|
||||
u_int16_t wi_cfp_period;
|
||||
u_int16_t wi_cfp_max_duration;
|
||||
};
|
||||
|
||||
/*
|
||||
* Connection control characteristics. (0xFC00)
|
||||
* 0 == IBSS (802.11 compliant mode) (Only PRISM2)
|
||||
* 1 == Basic Service Set (BSS)
|
||||
* 2 == Wireless Distribudion System (WDS)
|
||||
* 3 == Pseudo IBSS
|
||||
* (Only PRISM2; not 802.11 compliant mode, testing use only)
|
||||
* 6 == HOST AP (Only PRISM2)
|
||||
*/
|
||||
#define WI_PORTTYPE_IBSS 0x0
|
||||
#define WI_PORTTYPE_BSS 0x1
|
||||
#define WI_PORTTYPE_WDS 0x2
|
||||
#define WI_PORTTYPE_ADHOC 0x3
|
||||
#define WI_PORTTYPE_APSILENT 0x5
|
||||
#define WI_PORTTYPE_HOSTAP 0x6
|
||||
|
||||
/*
|
||||
* Mac addresses. (0xFC01, 0xFC08)
|
||||
*/
|
||||
struct wi_macaddr {
|
||||
u_int8_t wi_mac_addr[6];
|
||||
};
|
||||
|
||||
/*
|
||||
* Station set identification (SSID). (0xFC02, 0xFC04)
|
||||
*/
|
||||
struct wi_ssid {
|
||||
u_int16_t wi_len;
|
||||
u_int8_t wi_ssid[32];
|
||||
};
|
||||
|
||||
/*
|
||||
* Set our station name. (0xFC0E)
|
||||
*/
|
||||
struct wi_nodename {
|
||||
u_int16_t wi_nodelen;
|
||||
u_int8_t wi_nodename[32];
|
||||
};
|
||||
|
||||
/*
|
||||
* Multicast addresses to be put in filter. We're
|
||||
* allowed up to 16 addresses in the filter. (0xFC80)
|
||||
*/
|
||||
struct wi_mcast {
|
||||
struct ether_addr wi_mcast[16];
|
||||
};
|
||||
|
||||
/*
|
||||
* Join request. (0xFCE2)
|
||||
*/
|
||||
struct wi_joinreq {
|
||||
struct ether_addr wi_bssid;
|
||||
u_int16_t wi_chan;
|
||||
};
|
||||
|
||||
/*
|
||||
* supported rates. (0xFCB4)
|
||||
*/
|
||||
#define WI_SUPPRATES_1M 0x0001
|
||||
#define WI_SUPPRATES_2M 0x0002
|
||||
#define WI_SUPPRATES_5M 0x0004
|
||||
#define WI_SUPPRATES_11M 0x0008
|
||||
#define WI_RATES_BITS "\20\0011M\0022M\0035.5M\00411M"
|
||||
|
||||
/*
|
||||
* Information frame types.
|
||||
*/
|
||||
#define WI_INFO_NOTIFY 0xF000 /* Handover address */
|
||||
#define WI_INFO_COUNTERS 0xF100 /* Statistics counters */
|
||||
#define WI_INFO_SCAN_RESULTS 0xF101 /* Scan results */
|
||||
#define WI_INFO_HOST_SCAN_RESULTS 0xF104 /* Scan results */
|
||||
#define WI_INFO_LINK_STAT 0xF200 /* Link status */
|
||||
#define WI_INFO_LINK_STAT_CONNECTED 1
|
||||
#define WI_INFO_LINK_STAT_DISCONNECTED 2
|
||||
#define WI_INFO_LINK_STAT_AP_CHG 3 /* AP Change */
|
||||
#define WI_INFO_LINK_STAT_AP_OOR 4 /* AP Out Of Range */
|
||||
#define WI_INFO_LINK_STAT_AP_INR 5 /* AP In Range */
|
||||
#define WI_INFO_LINK_STAT_ASSOC_FAILED 6
|
||||
#define WI_INFO_ASSOC_STAT 0xF201 /* Association status */
|
||||
#define WI_INFO_AUTH_REQUEST 0xF202 /* Authentication Request (AP) */
|
||||
#define WI_INFO_POWERSAVE_COUNT 0xF203 /* PowerSave User Count (AP) */
|
||||
|
||||
struct wi_assoc {
|
||||
u_int16_t wi_assoc_stat; /* Association Status */
|
||||
#define ASSOC 1
|
||||
#define REASSOC 2
|
||||
#define DISASSOC 3
|
||||
#define ASSOCFAIL 4
|
||||
#define AUTHFAIL 5
|
||||
u_int8_t wi_assoc_sta[6]; /* Station Address */
|
||||
u_int8_t wi_assoc_osta[6]; /* OLD Station Address */
|
||||
u_int16_t wi_assoc_reason; /* Reason */
|
||||
u_int16_t wi_assoc_reserve; /* Reserved */
|
||||
};
|
||||
|
||||
/*
|
||||
* Scan Results of Prism2 chip
|
||||
*/
|
||||
|
||||
struct wi_scan_header {
|
||||
u_int16_t wi_reserve; /* future use */
|
||||
u_int16_t wi_reason; /* The reason this scan was initiated
|
||||
1: Host initiated
|
||||
2: Firmware initiated
|
||||
3: Inquiry request from host */
|
||||
};
|
||||
|
||||
struct wi_scan_data_p2 {
|
||||
u_int16_t wi_chid; /* BSS Channel ID from Probe Res.(PR)*/
|
||||
u_int16_t wi_noise; /* Average Noise Level of the PR */
|
||||
u_int16_t wi_signal; /* Signal Level on the PR */
|
||||
u_int8_t wi_bssid[6]; /* MACaddress of BSS responder from PR */
|
||||
u_int16_t wi_interval; /* BSS beacon interval */
|
||||
u_int16_t wi_capinfo; /* BSS Capability Information
|
||||
IEEE Std 802.11(1997) ,see 7.3.1.4 */
|
||||
u_int16_t wi_namelen; /* Length of SSID strings */
|
||||
u_int8_t wi_name[32]; /* SSID strings */
|
||||
u_int16_t wi_suprate[5]; /* Supported Rates element from the PR
|
||||
IEEE Std 802.11(1997) ,see 7.3.2.2 */
|
||||
u_int16_t wi_rate; /* Data rate of the PR */
|
||||
#define WI_APRATE_1 0x0A /* 1 Mbps */
|
||||
#define WI_APRATE_2 0x14 /* 2 Mbps */
|
||||
#define WI_APRATE_5 0x37 /* 5.5 Mbps */
|
||||
#define WI_APRATE_11 0x6E /* 11 Mbps */
|
||||
};
|
||||
|
||||
/*
|
||||
* Scan Results of Lucent chip
|
||||
*/
|
||||
struct wi_scan_data {
|
||||
u_int16_t wi_chid; /* BSS Channel ID from PR */
|
||||
u_int16_t wi_noise; /* Average Noise Level of the PR */
|
||||
u_int16_t wi_signal; /* Signal Level on the PR */
|
||||
u_int8_t wi_bssid[6]; /* MACaddress of BSS responder from PR */
|
||||
u_int16_t wi_interval; /* BSS beacon interval */
|
||||
u_int16_t wi_capinfo; /* BSS Capability Information
|
||||
IEEE Std 802.11(1997) ,see 7.3.1.4 */
|
||||
u_int16_t wi_namelen; /* Length of SSID strings */
|
||||
u_int8_t wi_name[32]; /* SSID strings */
|
||||
};
|
||||
|
||||
/*
|
||||
* transmit/receive frame structure
|
||||
*/
|
||||
struct wi_frame {
|
||||
u_int16_t wi_status; /* 0x00 */
|
||||
u_int16_t wi_rx_tstamp1; /* 0x02 */
|
||||
u_int16_t wi_rx_tstamp0; /* 0x04 */
|
||||
u_int8_t wi_rx_silence; /* 0x06 */
|
||||
u_int8_t wi_rx_signal; /* 0x07 */
|
||||
u_int8_t wi_rx_rate; /* 0x08 */
|
||||
u_int8_t wi_rx_flow; /* 0x09 */
|
||||
u_int8_t wi_tx_rtry; /* 0x0a */ /* Prism2 AP Only */
|
||||
u_int8_t wi_tx_rate; /* 0x0b */ /* Prism2 AP Only */
|
||||
u_int16_t wi_tx_ctl; /* 0x0c */
|
||||
struct ieee80211_frame_addr4 wi_whdr; /* 0x0e */
|
||||
u_int16_t wi_dat_len; /* 0x2c */
|
||||
struct ether_header wi_ehdr; /* 0x2e */
|
||||
} __attribute__((__packed__));
|
||||
|
||||
/* Tx Status Field */
|
||||
#define WI_TXSTAT_RET_ERR 0x0001
|
||||
#define WI_TXSTAT_AGED_ERR 0x0002
|
||||
#define WI_TXSTAT_DISCONNECT 0x0004
|
||||
#define WI_TXSTAT_FORM_ERR 0x0008
|
||||
|
||||
/* Rx Status Field */
|
||||
#define WI_STAT_BADCRC 0x0001
|
||||
#define WI_STAT_UNDECRYPTABLE 0x0002
|
||||
#define WI_STAT_ERRSTAT 0x0003
|
||||
#define WI_STAT_MAC_PORT 0x0700
|
||||
#define WI_STAT_PCF 0x1000
|
||||
#define WI_RXSTAT_MSG_TYPE 0xE000
|
||||
#define WI_STAT_1042 0x2000 /* RFC1042 encoded */
|
||||
#define WI_STAT_TUNNEL 0x4000 /* Bridge-tunnel encoded */
|
||||
#define WI_STAT_WMP_MSG 0x6000 /* WaveLAN-II management protocol */
|
||||
#define WI_STAT_MGMT 0x8000 /* 802.11b management frames */
|
||||
|
||||
#define WI_ENC_TX_E_II 0x0E
|
||||
|
||||
#define WI_ENC_TX_1042 0x00
|
||||
#define WI_ENC_TX_TUNNEL 0xF8
|
||||
|
||||
/* TxControl Field (enhanced) */
|
||||
#define WI_TXCNTL_TX_OK 0x0002
|
||||
#define WI_TXCNTL_TX_EX 0x0004
|
||||
#define WI_TXCNTL_STRUCT_TYPE 0x0018
|
||||
#define WI_ENC_TX_802_3 0x00
|
||||
#define WI_ENC_TX_802_11 0x08
|
||||
#define WI_TXCNTL_ALTRTRY 0x0020
|
||||
#define WI_TXCNTL_NOCRYPT 0x0080
|
||||
|
||||
/*
|
||||
* HFA3861/3863 (BBP) Control Registers
|
||||
*/
|
||||
#define WI_HFA386X_CR_A_D_TEST_MODES2 0x1A
|
||||
#define WI_HFA386X_CR_MANUAL_TX_POWER 0x3E
|
||||
|
||||
#ifdef IEEE80211_RADIOTAP_F_CFP
|
||||
/*
|
||||
* Radio capture format for Prism.
|
||||
*/
|
||||
#define WI_RX_RADIOTAP_PRESENT \
|
||||
((1 << IEEE80211_RADIOTAP_TSFT) | \
|
||||
(1 << IEEE80211_RADIOTAP_FLAGS) | \
|
||||
(1 << IEEE80211_RADIOTAP_RATE) | \
|
||||
(1 << IEEE80211_RADIOTAP_CHANNEL) | \
|
||||
(1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) | \
|
||||
(1 << IEEE80211_RADIOTAP_DB_ANTNOISE))
|
||||
|
||||
struct wi_rx_radiotap_header {
|
||||
struct ieee80211_radiotap_header wr_ihdr;
|
||||
u_int64_t wr_tsf;
|
||||
u_int8_t wr_flags;
|
||||
u_int8_t wr_rate;
|
||||
u_int16_t wr_chan_freq;
|
||||
u_int16_t wr_chan_flags;
|
||||
u_int8_t wr_antsignal;
|
||||
u_int8_t wr_antnoise;
|
||||
} __packed __aligned(8);
|
||||
|
||||
#define WI_TX_RADIOTAP_PRESENT \
|
||||
((1 << IEEE80211_RADIOTAP_FLAGS) | \
|
||||
(1 << IEEE80211_RADIOTAP_RATE) | \
|
||||
(1 << IEEE80211_RADIOTAP_CHANNEL))
|
||||
|
||||
struct wi_tx_radiotap_header {
|
||||
struct ieee80211_radiotap_header wt_ihdr;
|
||||
u_int8_t wt_flags;
|
||||
u_int8_t wt_rate;
|
||||
u_int16_t wt_chan_freq;
|
||||
u_int16_t wt_chan_flags;
|
||||
} __packed;
|
||||
#endif /* IEEE80211_RADIOTAP_F_CFP */
|
@ -1,189 +0,0 @@
|
||||
/*-
|
||||
* SPDX-License-Identifier: BSD-4-Clause
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
|
||||
* Copyright (c) 2002 M Warner Losh <imp@FreeBSD.org>
|
||||
*
|
||||
* 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. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Bill Paul.
|
||||
* 4. 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 Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
|
||||
* 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$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Encryption controls. We can enable or disable encryption as
|
||||
* well as specify up to 4 encryption keys. We can also specify
|
||||
* which of the four keys will be used for transmit encryption.
|
||||
*/
|
||||
#define WI_RID_ENCRYPTION 0xFC20
|
||||
#define WI_RID_AUTHTYPE 0xFC21
|
||||
#define WI_RID_DEFLT_CRYPT_KEYS 0xFCB0
|
||||
#define WI_RID_TX_CRYPT_KEY 0xFCB1
|
||||
#define WI_RID_WEP_AVAIL 0xFD4F
|
||||
#define WI_RID_P2_TX_CRYPT_KEY 0xFC23
|
||||
#define WI_RID_P2_CRYPT_KEY0 0xFC24
|
||||
#define WI_RID_P2_CRYPT_KEY1 0xFC25
|
||||
#define WI_RID_MICROWAVE_OVEN 0xFC25
|
||||
#define WI_RID_P2_CRYPT_KEY2 0xFC26
|
||||
#define WI_RID_P2_CRYPT_KEY3 0xFC27
|
||||
#define WI_RID_P2_ENCRYPTION 0xFC28
|
||||
#define WI_RID_ROAMING_MODE 0xFC2D
|
||||
#define WI_RID_CUR_TX_RATE 0xFD44 /* current TX rate */
|
||||
|
||||
#define WI_MAX_AID 256 /* max stations for ap operation */
|
||||
|
||||
struct wi_vap {
|
||||
struct ieee80211vap wv_vap;
|
||||
|
||||
void (*wv_recv_mgmt)(struct ieee80211_node *, struct mbuf *,
|
||||
int, const struct ieee80211_rx_stats *rxs, int, int);
|
||||
int (*wv_newstate)(struct ieee80211vap *,
|
||||
enum ieee80211_state, int);
|
||||
};
|
||||
#define WI_VAP(vap) ((struct wi_vap *)(vap))
|
||||
|
||||
struct wi_softc {
|
||||
struct ieee80211com sc_ic;
|
||||
struct mbufq sc_snd;
|
||||
device_t sc_dev;
|
||||
struct mtx sc_mtx;
|
||||
struct callout sc_watchdog;
|
||||
int sc_unit;
|
||||
int wi_gone;
|
||||
int sc_enabled;
|
||||
int sc_reset;
|
||||
int sc_firmware_type;
|
||||
#define WI_NOTYPE 0
|
||||
#define WI_LUCENT 1
|
||||
#define WI_INTERSIL 2
|
||||
#define WI_SYMBOL 3
|
||||
int sc_pri_firmware_ver; /* Primary firmware */
|
||||
int sc_sta_firmware_ver; /* Station firmware */
|
||||
unsigned int sc_nic_id; /* Type of NIC */
|
||||
char * sc_nic_name;
|
||||
|
||||
int wi_bus_type; /* Bus attachment type */
|
||||
struct resource * local;
|
||||
int local_rid;
|
||||
struct resource * iobase;
|
||||
int iobase_rid;
|
||||
struct resource * irq;
|
||||
int irq_rid;
|
||||
struct resource * mem;
|
||||
int mem_rid;
|
||||
bus_space_handle_t wi_localhandle;
|
||||
bus_space_tag_t wi_localtag;
|
||||
bus_space_handle_t wi_bhandle;
|
||||
bus_space_tag_t wi_btag;
|
||||
bus_space_handle_t wi_bmemhandle;
|
||||
bus_space_tag_t wi_bmemtag;
|
||||
void * wi_intrhand;
|
||||
struct ieee80211_channel *wi_channel;
|
||||
int wi_io_addr;
|
||||
int wi_cmd_count;
|
||||
|
||||
int sc_flags;
|
||||
int sc_bap_id;
|
||||
int sc_bap_off;
|
||||
|
||||
int sc_porttype;
|
||||
u_int16_t sc_portnum;
|
||||
u_int16_t sc_encryption;
|
||||
u_int16_t sc_monitor_port;
|
||||
u_int16_t sc_chanmask;
|
||||
|
||||
/* RSSI interpretation */
|
||||
u_int16_t sc_min_rssi; /* clamp sc_min_rssi < RSSI */
|
||||
u_int16_t sc_max_rssi; /* clamp RSSI < sc_max_rssi */
|
||||
u_int16_t sc_dbm_offset; /* dBm ~ RSSI - sc_dbm_offset */
|
||||
|
||||
int sc_buflen; /* TX buffer size */
|
||||
int sc_ntxbuf;
|
||||
#define WI_NTXBUF 3
|
||||
struct {
|
||||
int d_fid;
|
||||
int d_len;
|
||||
} sc_txd[WI_NTXBUF]; /* TX buffers */
|
||||
int sc_txnext; /* index of next TX */
|
||||
int sc_txcur; /* index of current TX*/
|
||||
int sc_tx_timer;
|
||||
|
||||
struct wi_counters sc_stats;
|
||||
u_int16_t sc_ibss_port;
|
||||
|
||||
struct timeval sc_last_syn;
|
||||
int sc_false_syns;
|
||||
|
||||
u_int16_t sc_txbuf[IEEE80211_MAX_LEN/2];
|
||||
|
||||
struct wi_tx_radiotap_header sc_tx_th;
|
||||
struct wi_rx_radiotap_header sc_rx_th;
|
||||
};
|
||||
|
||||
/* maximum consecutive false change-of-BSSID indications */
|
||||
#define WI_MAX_FALSE_SYNS 10
|
||||
|
||||
#define WI_FLAGS_HAS_ENHSECURITY 0x0001
|
||||
#define WI_FLAGS_HAS_WPASUPPORT 0x0002
|
||||
#define WI_FLAGS_HAS_ROAMING 0x0020
|
||||
#define WI_FLAGS_HAS_FRAGTHR 0x0200
|
||||
#define WI_FLAGS_HAS_DBMADJUST 0x0400
|
||||
#define WI_FLAGS_RUNNING 0x0800
|
||||
#define WI_FLAGS_PROMISC 0x1000
|
||||
|
||||
struct wi_card_ident {
|
||||
u_int16_t card_id;
|
||||
char *card_name;
|
||||
u_int8_t firm_type;
|
||||
};
|
||||
|
||||
#define WI_PRISM_MIN_RSSI 0x1b
|
||||
#define WI_PRISM_MAX_RSSI 0x9a
|
||||
#define WI_PRISM_DBM_OFFSET 100 /* XXX */
|
||||
|
||||
#define WI_LUCENT_MIN_RSSI 47
|
||||
#define WI_LUCENT_MAX_RSSI 138
|
||||
#define WI_LUCENT_DBM_OFFSET 149
|
||||
|
||||
#define WI_RSSI_TO_DBM(sc, rssi) (MIN((sc)->sc_max_rssi, \
|
||||
MAX((sc)->sc_min_rssi, (rssi))) - (sc)->sc_dbm_offset)
|
||||
|
||||
#define WI_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
|
||||
#define WI_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
|
||||
#define WI_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED)
|
||||
|
||||
int wi_attach(device_t);
|
||||
int wi_detach(device_t);
|
||||
int wi_shutdown(device_t);
|
||||
int wi_alloc(device_t, int);
|
||||
void wi_free(device_t);
|
||||
extern devclass_t wi_devclass;
|
||||
void wi_intr(void *);
|
||||
int wi_mgmt_xmit(struct wi_softc *, caddr_t, int);
|
||||
void wi_stop(struct wi_softc *, int);
|
||||
void wi_init(struct wi_softc *);
|
@ -282,7 +282,6 @@ device iwn # Intel 4965/1000/5000/6000 wireless NICs.
|
||||
device malo # Marvell Libertas wireless NICs.
|
||||
device mwl # Marvell 88W8363 802.11n wireless NICs.
|
||||
device ral # Ralink Technology RT2500 wireless NICs.
|
||||
device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
|
||||
device wpi # Intel 3945ABG wireless NICs.
|
||||
|
||||
# Pseudo devices.
|
||||
|
@ -384,7 +384,6 @@ SUBDIR= \
|
||||
vr \
|
||||
vte \
|
||||
${_wbwd} \
|
||||
${_wi} \
|
||||
wlan \
|
||||
wlan_acl \
|
||||
wlan_amrr \
|
||||
@ -646,7 +645,6 @@ _speaker= speaker
|
||||
_splash= splash
|
||||
_sppp= sppp
|
||||
_wbwd= wbwd
|
||||
_wi= wi
|
||||
|
||||
_aac= aac
|
||||
_aacraid= aacraid
|
||||
@ -784,7 +782,6 @@ _ffec= ffec
|
||||
_nvd= nvd
|
||||
_nvme= nvme
|
||||
_pccard= pccard
|
||||
_wi= wi
|
||||
_virtio= virtio
|
||||
.endif
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${SRCTOP}/sys/dev/wi
|
||||
|
||||
KMOD= if_wi
|
||||
SRCS= if_wi.c if_wi_pccard.c if_wi_pci.c \
|
||||
card_if.h device_if.h bus_if.h pci_if.h pccarddevs.h \
|
||||
opt_wlan.h
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "powerpc"
|
||||
SRCS+= if_wi_macio.c
|
||||
SRCS+= ofw_bus_if.h
|
||||
.endif
|
||||
|
||||
.include <bsd.kmod.mk>
|
@ -1,21 +0,0 @@
|
||||
# Doxyfile 1.5.2
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "FreeBSD kernel WI device code"
|
||||
OUTPUT_DIRECTORY = $(DOXYGEN_DEST_PATH)/dev_wi/
|
||||
EXTRACT_ALL = YES # for undocumented src, no warnings enabled
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = $(DOXYGEN_SRC_PATH)/dev/wi/ \
|
||||
$(NOTREVIEWED)
|
||||
|
||||
GENERATE_TAGFILE = dev_wi/dev_wi.tag
|
||||
|
||||
@INCLUDE_PATH = $(DOXYGEN_INCLUDE_PATH)
|
||||
@INCLUDE = common-Doxyfile
|
||||
|
Loading…
x
Reference in New Issue
Block a user