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
This commit is contained in:
parent
d876124d6a
commit
89b5b33da2
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user