freebsd-dev/sys/net80211
Marko Zec 21ca7b57bd Change the curvnet variable from a global const struct vnet *,
previously always pointing to the default vnet context, to a
dynamically changing thread-local one.  The currvnet context
should be set on entry to networking code via CURVNET_SET() macros,
and reverted to previous state via CURVNET_RESTORE().  Recursions
on curvnet are permitted, though strongly discuouraged.

This change should have no functional impact on nooptions VIMAGE
kernel builds, where CURVNET_* macros expand to whitespace.

The curthread->td_vnet (aka curvnet) variable's purpose is to be an
indicator of the vnet context in which the current network-related
operation takes place, in case we cannot deduce the current vnet
context from any other source, such as by looking at mbuf's
m->m_pkthdr.rcvif->if_vnet, sockets's so->so_vnet etc.  Moreover, so
far curvnet has turned out to be an invaluable consistency checking
aid: it helps to catch cases when sockets, ifnets or any other
vnet-aware structures may have leaked from one vnet to another.

The exact placement of the CURVNET_SET() / CURVNET_RESTORE() macros
was a result of an empirical iterative process, whith an aim to
reduce recursions on CURVNET_SET() to a minimum, while still reducing
the scope of CURVNET_SET() to networking only operations - the
alternative would be calling CURVNET_SET() on each system call entry.
In general, curvnet has to be set in three typicall cases: when
processing socket-related requests from userspace or from within the
kernel; when processing inbound traffic flowing from device drivers
to upper layers of the networking stack, and when executing
timer-driven networking functions.

This change also introduces a DDB subcommand to show the list of all
vnet instances.

Approved by:	julian (mentor)
2009-05-05 10:56:12 +00:00
..
_ieee80211.h Add modes for 1/2 and 1/4-width channels so we have separate roaming 2009-02-19 05:21:54 +00:00
ieee80211_acl.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_adhoc.c whitespace 2009-05-02 20:18:18 +00:00
ieee80211_adhoc.h Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_amrr.c Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_amrr.h Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_crypto_ccmp.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_crypto_none.c Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_crypto_tkip.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_crypto_wep.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_crypto.c add/improve debug msgs 2008-10-25 23:23:41 +00:00
ieee80211_crypto.h o add IEEE80211_KEY_BITS for %b printing of wk_flags 2009-02-05 19:20:34 +00:00
ieee80211_ddb.c don't say "ac WME_AC_BE"; remove "ac" 2009-05-02 20:28:55 +00:00
ieee80211_dfs.c schedule the correct timer when receiving a radar event during CAC 2008-08-02 17:58:39 +00:00
ieee80211_dfs.h Fix definition of IEEE80211_CHAN_MAX; it was defined as 255 but 2008-12-15 01:26:33 +00:00
ieee80211_freebsd.c Change the curvnet variable from a global const struct vnet *, 2009-05-05 10:56:12 +00:00
ieee80211_freebsd.h Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_hostap.c print both fc bytes when hitting a protocol version mismatch 2009-04-26 21:50:21 +00:00
ieee80211_hostap.h Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_ht.c allow drivers to hook ampdu rx start/stop 2009-04-26 22:54:51 +00:00
ieee80211_ht.h promote ieee80211_seq typedef 2009-05-02 20:25:22 +00:00
ieee80211_input.c split Atheros SuperG support out into it's own file that's included only 2009-03-24 20:39:08 +00:00
ieee80211_input.h split Atheros SuperG support out into it's own file that's included only 2009-03-24 20:39:08 +00:00
ieee80211_ioctl.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_ioctl.h Hoist 802.11 encapsulation up into net80211: 2009-03-30 21:53:27 +00:00
ieee80211_monitor.c Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_monitor.h Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_node.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_node.h promote ieee80211_seq typedef 2009-05-02 20:25:22 +00:00
ieee80211_output.c Store the tx seq# of an 802.11 frame in the mbuf pkthdr; this will be 2009-04-27 17:39:41 +00:00
ieee80211_phy.c use 1/2 and 1/4 rate phy types to simplify txtime calculation 2009-02-19 17:44:23 +00:00
ieee80211_phy.h Update PLCP<->rate mapping support: 2008-05-12 00:32:52 +00:00
ieee80211_power.c convert MALLOC/FREE to malloc/free 2008-12-18 23:00:09 +00:00
ieee80211_power.h New ap-side power save implementation; the main change is to allow drivers 2008-10-26 01:04:46 +00:00
ieee80211_proto.c Relax the condition for printing the lost state transition message. The new 2009-05-03 18:29:04 +00:00
ieee80211_proto.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
ieee80211_radiotap.h update channel flag defs to match _ieee80211.h so cpp doesn't complain 2007-12-13 01:23:40 +00:00
ieee80211_regdomain.c Add modes for 1/2 and 1/4-width channels so we have separate roaming 2009-02-19 05:21:54 +00:00
ieee80211_regdomain.h o add country codes from Atheros regulatory; these are not listed in 2009-01-27 23:09:55 +00:00
ieee80211_rssadapt.c Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_rssadapt.h Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_scan_sta.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_scan.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_scan.h Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211_sta.c whitespace 2009-04-26 22:44:23 +00:00
ieee80211_sta.h Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_superg.c make superg/fast-frames state dynamically-allocated (and indirect off 2009-05-02 20:16:55 +00:00
ieee80211_superg.h make superg/fast-frames state dynamically-allocated (and indirect off 2009-05-02 20:16:55 +00:00
ieee80211_tdma.c setup turboA/G fixed rate parameters too; this is needed, in particular, 2009-04-13 20:53:12 +00:00
ieee80211_tdma.h o move tdma+superg protocol defs out of public view 2009-03-26 21:29:03 +00:00
ieee80211_var.h make superg/fast-frames state dynamically-allocated (and indirect off 2009-05-02 20:16:55 +00:00
ieee80211_wds.c print both fc bytes when hitting a protocol version mismatch 2009-04-26 21:50:21 +00:00
ieee80211_wds.h Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211_xauth.c Multi-bss (aka vap) support for 802.11 devices. 2008-04-20 20:35:46 +00:00
ieee80211.c Create a taskqueue for each wireless interface which provides a serialised 2009-05-02 15:14:18 +00:00
ieee80211.h promote ieee80211_seq typedef 2009-05-02 20:25:22 +00:00