summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/defaults/rc.conf1
-rw-r--r--etc/network.subr10
-rw-r--r--share/man/man5/rc.conf.510
3 files changed, 20 insertions, 1 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf
index 17c9f3730180..bc81ab3c3797 100644
--- a/etc/defaults/rc.conf
+++ b/etc/defaults/rc.conf
@@ -197,6 +197,7 @@ ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration.
#ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry.
#ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0.
#wlans_ath0="wlan0" # wlan(4) interfaces for ath0 device
+#wlandebug_wlan0="scan+auth+assoc" # Set debug flags with wlanddebug(8)
#ipv4_addrs_fxp0="192.168.0.1/24 192.168.1.1-5/28" # example IPv4 address entry.
#
#autobridge_interfaces="bridge0" # List of bridges to check
diff --git a/etc/network.subr b/etc/network.subr
index 0a64f96d6493..66fe25052f81 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -499,7 +499,7 @@ clone_down()
#
childif_create()
{
- local cfg child child_wlans create_args ifn i
+ local cfg child child_wlans create_args debug_flags ifn i
cfg=1
ifn=$1
@@ -509,10 +509,18 @@ childif_create()
for child in ${child_wlans}; do
create_args="wlandev $ifn `get_if_var $child create_args_IF`"
+ debug_flags="`get_if_var $child wlandebug_IF`"
+
if expr $child : 'wlan[0-9][0-9]*$' >/dev/null 2>&1; then
ifconfig $child create ${create_args} && cfg=0
+ if [ -n "${debug_flags}" ]; then
+ wlandebug -i $child ${debug_flags}
+ fi
else
i=`ifconfig wlan create ${create_args}`
+ if [ -n "${debug_flags}" ]; then
+ wlandebug -i $i ${debug_flags}
+ fi
ifconfig $i name $child && cfg=0
fi
if autoif $child; then
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index 77e835cd58ad..84b686adee03 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -1169,6 +1169,15 @@ One or more
.Xr wlan 4
devices must be created for each wireless devices as of
.Fx 8.0 .
+Debugging flags for
+.Xr wlan 4
+devices as set by
+.Xr wlandebug 8
+may be specified with an
+.Va wlandebug_ Ns Aq Ar interface
+variable.
+The contents of this variable will be passed directly to
+.Xr wlandebug 8 .
.Pp
If the
.Va ifconfig_ Ns Aq Ar interface
@@ -4065,6 +4074,7 @@ Default
.Xr sysctl 8 ,
.Xr syslogd 8 ,
.Xr timed 8 ,
+.Xr wlandebug 8 ,
.Xr yp 8 ,
.Xr ypbind 8 ,
.Xr ypserv 8 ,