summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2008-04-25 23:50:49 +0000
committerbrooks <brooks@FreeBSD.org>2008-04-25 23:50:49 +0000
commit5c95bbcacbc4cac6e930e149471bee3ff2d97f46 (patch)
tree5e83fa1a69001b0e0d8e11583f1297809f2c82d6
parent18b082dc884f7777e44d186f6dc1a605b48654f0 (diff)
downloadFreeBSD-src-5c95bbcacbc4cac6e930e149471bee3ff2d97f46.zip
FreeBSD-src-5c95bbcacbc4cac6e930e149471bee3ff2d97f46.tar.gz
Replace the prototype vaps_<ifn> and vap_create_<ifn> variables with
more wlans_<ifn> and create_args_<ifn> Add documentation for these variants and generally update the wireless device example. There is are very short lived shim from vaps_<ifn> which produces a warning and vap_create_<ifn> which does not. Misuse the MFC notification service to remind me to remove them. MFC after: 3 weeks
-rw-r--r--etc/network.subr25
-rw-r--r--share/man/man5/rc.conf.530
2 files changed, 42 insertions, 13 deletions
diff --git a/etc/network.subr b/etc/network.subr
index 55bc94c..e9be52c 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -476,7 +476,7 @@ clone_up()
_prefix=
_list=
for ifn in ${cloned_interfaces}; do
- ifconfig ${ifn} create
+ ifconfig ${ifn} create `get_if_var ${ifn} create_args_IF`
if [ $? -eq 0 ]; then
_list="${_list}${_prefix}${ifn}"
[ -z "$_prefix" ] && _prefix=' '
@@ -507,15 +507,22 @@ clone_down()
#
childif_create()
{
- local cfg child child_vaps create_args ifn i
+ local cfg child child_wlans create_args ifn i
cfg=1
ifn=$1
- # Create VAPs
- child_vaps=`get_if_var $ifn vaps_IF`
- for child in ${child_vaps}; do
- create_args="wlandev $ifn `get_if_var $child vap_create_IF`"
+ # Create wireless interfaces
+ child_wlans=`get_if_var $ifn wlans_IF`
+ if [ -z "${child_wlans}" ]; then
+ child_wlans=`get_if_var $ifn vaps_IF`
+ if [ -n "${child_wlans}" ]; then
+ warn "soon to be deleted vaps_$ifn variable defined use wlans_$ifn"
+ fi
+ fi
+
+ for child in ${child_wlans}; do
+ create_args="wlandev $ifn `get_if_var $child create_args_IF` `get_if_var $child vap_create_IF`"
if expr $child : 'wlan[0-9][0-9]*$' >/dev/null 2>&1; then
ifconfig $child create ${create_args} && cfg=0
else
@@ -532,10 +539,10 @@ childif_create()
#
childif_destroy()
{
- local cfg child child_vaps ifn
+ local cfg child child_wlans ifn
- child_vaps=`get_if_var $ifn vaps_IF`
- for child in ${child_vaps}; do
+ child_wlans="`get_if_var $ifn wlans_IF` `get_if_var $ifn vaps_IF`"
+ for child in ${child_wlans}; do
ifconfig $child destroy && cfg=0
done
}
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index 7727fc9..cf291a5 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -1146,6 +1146,26 @@ and
.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n
variables.
.Pp
+If a
+.Va wlans_ Ns Aq Ar interface
+variable is set,
+an
+.Xr wlan 4
+interface will be created for each item in the list with the
+.Ar wlandev
+argument set to
+.Ar interface .
+Further wlan cloning arguments may be passed to the
+.Xr ifconfig 8
+.Cm create
+command by setting the
+.Va create_args_ Ns Aq Ar interface
+variable.
+One or more
+.Xr wlan 4
+devices must be created for each wireless devices as of
+.Fx 8.0 .
+.Pp
If the
.Va ifconfig_ Ns Aq Ar interface
contains the keyword
@@ -1184,12 +1204,14 @@ Finally, you can add
options in this variable, in addition to the
.Pa /etc/start_if. Ns Aq Ar interface
file.
-For instance, to initialize the
-.Li wi0
-device via DHCP, using WPA authentication and 802.11b mode, it is
+For instance, configure an
+.Xr ath 4
+wireless device in station mode with an address obtained
+via DHCP, using WPA authentication and 802.11b mode, it is
possible to use something like:
.Bd -literal
-ifconfig_wi0="DHCP WPA mode 11b"
+wlans_ath0="wlan0"
+ifconfig_wlan0="DHCP WPA mode 11b"
.Ed
.Pp
In addition to the
OpenPOWER on IntegriCloud