freebsd-skq/tools
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
..
bsdbox Add mv / expr ; these are used by the updated freebsd-wifi-build environment. 2015-05-19 03:02:52 +00:00
build Remove old GNU Binutils tools now provided by ELF Tool Chain 2015-08-05 18:30:00 +00:00
bus_space Add an example program (in Python) for the AMD Am79c900 (ILACC) 2015-08-02 21:24:03 +00:00
debugscripts Remove debugging code that sneaked in. 2015-04-09 07:52:03 +00:00
diag NO_MAN= has been deprecated in favor of MAN= for some time, go ahead 2014-04-13 05:21:56 +00:00
ifnet * Handle ++x as well as x++ while converting. 2014-06-25 15:22:14 +00:00
kerneldoc Clean up more lindev(4) vestiges. 2014-05-02 11:09:01 +00:00
KSE NO_MAN= has been deprecated in favor of MAN= for some time, go ahead 2014-04-13 05:21:56 +00:00
LibraryReport
regression Add a missing break statement, which made the code default to IPv6. 2015-07-14 15:24:50 +00:00
sched Add a new thread state "spinning" to schedgraph and add tracepoints at the 2014-11-04 16:35:56 +00:00
test Remove the old DTrace test suite makefile - it was somewhat primitive and 2015-02-28 23:35:29 +00:00
tools Change KPI of how device drivers that provide wireless connectivity interact 2015-08-07 11:43:14 +00:00
install.sh Use = not == in test arguments. 2013-01-24 20:47:37 +00:00
make_libdeps.sh Avoid rs(1) hitting LINE_MAX with custom trees that have large dependencies. 2014-09-08 17:01:30 +00:00
README
tinder.sh Add a comment that shows how to limit the build to the specific list of arches. 2011-11-28 14:03:36 +00:00

$FreeBSD$

This directory tree contains tools used for the maintenance and
testing of FreeBSD.  There is no toplevel Makefile structure since
these tools are not meant to be built as part of the standard system,
though there may be individual Makefiles in some of the subdirs.

Please read the README files in the subdirs for further information.