Commit Graph

70 Commits

Author SHA1 Message Date
Pedro F. Giffuni
df57947f08 spdx: initial adoption of licensing ID tags.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

Initially, only tag files that use BSD 4-Clause "Original" license.

RelNotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13133
2017-11-18 14:26:50 +00:00
Warner Losh
f6cea53f9d Create a generic PCCARD_PNP_INFO from the MODULE_PNP_INFO building
block. Use it in all the PNP drivers to export either the current PNP
table. For uart, create a custom table and export it using
MODULE_PNP_INFO since it's the only one that matches on function
number.

Differential Review: https://reviews.freebsd.org/D3461
2015-12-11 05:27:56 +00:00
Gleb Smirnoff
7a79cebfba Replay r286410. Change KPI of how device drivers that provide wireless
connectivity interact with the net80211 stack.

Historical background: originally wireless devices created an interface,
just like Ethernet devices do. Name of an interface matched the name of
the driver that created. Later, wlan(4) layer was introduced, and the
wlanX interfaces become the actual interface, leaving original ones as
"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer
and a driver became a mix of methods that pass a pointer to struct ifnet
as identifier and methods that pass pointer to struct ieee80211com. From
user point of view, the parent interface just hangs on in the ifconfig
list, and user can't do anything useful with it.

Now, the struct ifnet goes away. The struct ieee80211com is the only
KPI between a device driver and net80211. Details:

- The struct ieee80211com is embedded into drivers softc.
- Packets are sent via new ic_transmit method, which is very much like
  the previous if_transmit.
- Bringing parent up/down is done via new ic_parent method, which notifies
  driver about any changes: number of wlan(4) interfaces, number of them
  in promisc or allmulti state.
- Device specific ioctls (if any) are received on new ic_ioctl method.
- Packets/errors accounting are done by the stack. In certain cases, when
  driver experiences errors and can not attribute them to any specific
  interface, driver updates ic_oerrors or ic_ierrors counters.

Details on interface configuration with new world order:
- A sequence of commands needed to bring up wireless DOESN"T change.
- /etc/rc.conf parameters DON'T change.
- List of devices that can be used to create wlan(4) interfaces is
  now provided by net.wlan.devices sysctl.

Most drivers in this change were converted by me, except of wpi(4),
that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing
changes to at least 8 drivers. Thanks to pluknet@, Oliver Hartmann,
Olivier Cochard, gjb@, mmoll@, op@ and lev@, who also participated in
testing.

Reviewed by:	adrian
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2015-08-27 08:56:39 +00:00
Adrian Chadd
ba2c1fbc03 Revert the wifi ifnet changes until things are more baked and tested.
* 286410
* 286413
* 286416

The initial commit broke a variety of debug and features that aren't
in the GENERIC kernels but are enabled in other platforms.
2015-08-08 01:10:17 +00:00
Gleb Smirnoff
79d2c5e857 Change KPI of how device drivers that provide wireless connectivity interact
with the net80211 stack.

Historical background: originally wireless devices created an interface,
just like Ethernet devices do. Name of an interface matched the name of
the driver that created. Later, wlan(4) layer was introduced, and the
wlanX interfaces become the actual interface, leaving original ones as
"a parent interface" of wlanX. Kernelwise, the KPI between net80211 layer
and a driver became a mix of methods that pass a pointer to struct ifnet
as identifier and methods that pass pointer to struct ieee80211com. From
user point of view, the parent interface just hangs on in the ifconfig
list, and user can't do anything useful with it.

Now, the struct ifnet goes away. The struct ieee80211com is the only
KPI between a device driver and net80211. Details:

- The struct ieee80211com is embedded into drivers softc.
- Packets are sent via new ic_transmit method, which is very much like
  the previous if_transmit.
- Bringing parent up/down is done via new ic_parent method, which notifies
  driver about any changes: number of wlan(4) interfaces, number of them
  in promisc or allmulti state.
- Device specific ioctls (if any) are received on new ic_ioctl method.
- Packets/errors accounting are done by the stack. In certain cases, when
  driver experiences errors and can not attribute them to any specific
  interface, driver updates ic_oerrors or ic_ierrors counters.

Details on interface configuration with new world order:
- A sequence of commands needed to bring up wireless DOESN"T change.
- /etc/rc.conf parameters DON'T change.
- List of devices that can be used to create wlan(4) interfaces is
  now provided by net.wlan.devices sysctl.

Most drivers in this change were converted by me, except of wpi(4),
that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing
changes to at least 8 drivers. Thanks to Olivier Cochard, gjb@, mmoll@,
op@ and lev@, who also participated in testing. Details here:

https://wiki.freebsd.org/projects/ifnet/net80211

Still, drivers: ndis, wtap, mwl, ipw, bwn, wi, upgt, uath were not
tested. Changes to mwl, ipw, bwn, wi, upgt are trivial and chances
of problems are low. The wtap wasn't compilable even before this change.
But the ndis driver is complex, and it is likely to be broken with this
commit. Help with testing and debugging it is appreciated.

Differential Revision:	D2655, D2740
Sponsored by:	Nginx, Inc.
Sponsored by:	Netflix
2015-08-07 11:43:14 +00:00
Warner Losh
2f1c4b0c87 Retire old, transition code for managing the FreeBSD 5 -> 6 migration. 2014-11-22 18:40:14 +00:00
Gleb Smirnoff
76039bc84f The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare
to this event, adding if_var.h to files that do need it. Also, include
all includes that now are included due to implicit pollution via if_var.h

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2013-10-26 17:58:36 +00:00
Warner Losh
db4ba9a33e Remove opt_wi.h 2008-08-27 05:39:44 +00:00
Warner Losh
dcf77c235d The APDL-325 is a Wireless LAN pcmcia adapter that sits inside some
Billion Access Points.  Fix wi(4) to recognise the adapter.

PR:		77913
Submitted by:	Daan Vreeken [PA4DAN]
MFC after:	3 days
2008-08-27 04:52:27 +00:00
Warner Losh
24b934392e Add an altnerative Siemens SpeedStream ID. This one is for a Prism 3
card.  I got a pair of these at a garage sale for US$1.00 today...
2008-08-02 20:50:13 +00:00
Sam Leffler
b032f27c36 Multi-bss (aka vap) support for 802.11 devices.
Note this includes changes to all drivers and moves some device firmware
loading to use firmware(9) and a separate module (e.g. ral).  Also there
no longer are separate wlan_scan* modules; this functionality is now
bundled into the wlan module.

Supported by:	Hobnob and Marvell
Reviewed by:	many
Obtained from:	Atheros (some bits)
2008-04-20 20:35:46 +00:00
Warner Losh
29d8617285 Add ELSA XI330 product. This is rebadged and sold as SMC 2532W-B and
I/O Data also resells it.  Add an alternative airvast an100 id.
2005-10-14 15:06:16 +00:00
Warner Losh
0ed03bc788 MFp4: save mac addr hint, eliminage OLDCARD shims 2005-09-22 05:11:50 +00:00
Warner Losh
ba8f34770d Add a boatload of new device ids, gleaned from the pcmcia-cs-3.2.8
distribution.  Add the appropriate devices to the man pages.

Obtained from: pcmcia-cs
Approved by: re (scottl)
2005-07-10 02:00:35 +00:00
Warner Losh
ab581af779 Eliminate unused argument in PCMCIA_CARD macro.
Provide a backwards compatible way to have the extra macro by defining
PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that
want/need to have the same driver on 5 and 6 with pccard attachments.

Approved by: re (dwhite)
2005-06-24 14:36:54 +00:00
Warner Losh
ee051f83d5 Unbreak style(9) breakage from last commit. We try to avoid defining
variables in internal blocks.
Also, go ahead and fail if we can't load the firmware.  It should have
failed like this, but never did (firmware loads generally don't fail).
2005-03-27 17:04:47 +00:00
Pawel Jakub Dawidek
ded25de729 Unbreak LINT. 2005-03-27 15:57:42 +00:00
Sam Leffler
155fb57323 purge dead code
Noticed by:	Coverity Prevent analysis tool
2005-03-26 23:51:39 +00:00
Warner Losh
8d2ad0b460 The two PLANEX cards listed in pccarddevs, identified only by their
CIS, weren't actually used anywhere (other than the generic PC Card
code when certain variables are defined).  They aren't used in NetBSD
either.  Make things simpler by removing them.  Change PLANEX_2 to
PLANEX and tweak wi and owi to use that instead.  The PLANEX id seems
to actually be pci ID assigned to planex, not its pcmcia id.  Ooops.
I don't know if this is a reporting error from where this entry came
from, or if it is a mistake on PLANEX's part.  I suspect the latter,
as ACTIONTEC and NEWMEDIA made the same mistake (although new media
may be because it uses an advansys chip inside).  Make a note of this
in the file.  The 0xc entires may be JEITA assigned, so note that as
well.

# This leaves just 3 entries that are totally unknown: airvast, archos
# and edimax although the arivast number is the same assigned to
# avertec in usb...
2005-02-01 18:28:09 +00:00
Warner Losh
c5c0655590 Use Intersil chip names for the symbols, since many makers use the
intersil IDs but their own name in the CIS.
2005-01-20 18:34:22 +00:00
Warner Losh
7610c28cf1 Add support for SENAO SL-2511CD
Info submitted by: Paulo Fragoso
2005-01-20 17:46:05 +00:00
Warner Losh
c3bd3b5978 Call wi_free after we turn off the interrupts. If we call it before,
then we reference parts of the softc.

# My appologies, but this was sent to me by someone whose name I've lost.
2005-01-19 01:26:44 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Warner Losh
8c81529f45 Only match cards that claim to be network cards. I've had two
different cards that matched vendor/id, but weren't wi cards.  This is
because the vendor foolishly didn't have unique product ids.  Symbol
has a serial card that would otherwise match the wi driver, for
example...

Taken from a patch for xe posted by: Carlos Velasco
2004-06-09 06:31:40 +00:00
Warner Losh
2e31e339d1 Fix disordering of pccarddevs.h noticed by bde. Also remove a few
redundant includes and fix some of the include disordering.

Submitted by: bde
2004-05-27 03:49:45 +00:00
Warner Losh
dba6dd177b Move to generating pccarddevs.h on the fly, both for the kernel and
the modules.

Also generate usbdevs.h automatically now, but a non-kernel file is
stopping that at the moment.
2004-05-26 00:53:10 +00:00
Warner Losh
fbfb97942e It turns out that the module dependency on pccard is in error. Since
there's not dependencies on pccard symboles, such a dependency is not
necessary.  This means that drivers that have multiple attachments can
not drag bogus devices into the kernel at load time.

We can't (yet) do this with pci and isa.  Drivers written for them
actually do seem to have symbols that depend on these busses'
implementation code.

ndis not touched until other things can be tested.
2004-05-08 06:04:06 +00:00
Warner Losh
2104f15e11 Add support for a new variant of the prism3 that has appaered in the
wild.  This one is marketed by D-Link model DWL-650, but appears to be
a ISL3710P-10 under the hood.

Reported by: Brian O'Shea
2004-03-25 21:58:55 +00:00
Warner Losh
81e2d98d9e Fix slight disordering of supported cards. 2003-12-27 18:07:50 +00:00
Warner Losh
2e6a21aa7f Sony PEGA-WL110 Wireless LAN
Obtained from: NetBSD (onoe-san)
2003-09-22 05:33:22 +00:00
Warner Losh
45a3024ec7 New Proxim Harmony OEM card.
Submitted by: Jeremy Bingham
2003-09-20 05:27:18 +00:00
Sam Leffler
8df91fc8bc o add experimental radiotap capture format
o add netbsd logic to convert rssi to device-independent values

Obtained from:	NetBSD (rssi conversion code)
2003-09-05 22:29:30 +00:00
Warner Losh
76387a8ff1 This doesn't work, so back them out. 2003-08-24 05:18:10 +00:00
Warner Losh
cfab163573 Return -100 rather than 0 for pccard probe routines. This allows
other drivers to attach to these cards, if so desired.
2003-08-24 03:32:47 +00:00
Warner Losh
9125ded8ee LINKSYS2 -> BROMAX 2003-08-21 17:40:59 +00:00
Warner Losh
3d844b955b Update to reflect NETGEAR_2 -> INTERSIL and INTERSIL -> INTERSIL2
changes to pccarddevs.
2003-08-21 17:13:33 +00:00
Warner Losh
88755a2793 Add microsoft mn-520 wlan card.
Submitted by: Kirk Strauser
2003-08-14 06:30:06 +00:00
Warner Losh
9b92f5db40 Add Linksys WCF12: from Scott Lambert 2003-07-19 05:51:44 +00:00
Warner Losh
fa3682c1c9 OpenBSD calls this AIRVAST, so use that instead 2003-07-15 07:22:21 +00:00
Warner Losh
6a78c9e48a Add Siemens SpeedStream 1021
Obainted from: openbsd (in spirit); millert
2003-07-15 03:34:08 +00:00
Warner Losh
40d3bedc9e Add support for asus wl100
PR: 49033/53249
2003-07-11 09:19:04 +00:00
Warner Losh
247056ed2a Add corega PCCL-11 to match entry added to pccarddevs a while ago.
Noticed going into openbsd...
2003-07-07 07:57:35 +00:00
Sam Leffler
2c71d3c795 update for new 802.11 support 2003-06-28 06:17:26 +00:00
Warner Losh
c88a674b8d ARtem ONAIR card
Submitted by: Ben Gras
2003-06-11 16:56:02 +00:00
Warner Losh
459caa871c Call wi_free on the failure cases of pccard.
Tested by: scottl
2003-06-11 16:39:20 +00:00
Warner Losh
7110005e4b Add generic OEM1 PRISM3 card.
Submitted by: mwlucas
2003-04-27 03:34:05 +00:00
Matthew N. Dodd
f246e4a17f - Express hard dependencies on bus (pci, isa, pccard) and
network layer (ether).
- Don't abuse module names to facilitate ifconfig module loading;
  such abuse isn't really needed.  (And if we do need type information
  associated with a module then we should make it explicit and not
  use hacks.)
2003-04-15 06:37:30 +00:00
Warner Losh
f5746231ff Make sure that pp_name is non-null before setting the device
description.  This allows us to rely entirely on the CIS entries if
necessary...
2003-04-10 04:36:02 +00:00
Warner Losh
2701fed4cf Back out the _ND change. I plan on making all drivers default to that with
a special _DESC version for those cards whose CIS is insufficient for some
reason.  This should save about 3k of kernel strings when complete.
2003-04-10 04:14:35 +00:00
Warner Losh
b899d58ee4 Use the new _ND macros to not include the description strings. If any
of the entries have a description, we'll use that to override the
description that the pccard layer generates for us.

This saves about 930 bytes in the module, so I feel it won't hurt the
crowded boot disks....

# other modules to follow
2003-04-08 15:36:43 +00:00