Date: Sun, 19 Nov 2017 20:18:22 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326001 - head/etc Message-ID: <201711192018.vAJKIM73037946@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Sun Nov 19 20:18:21 2017 New Revision: 326001 URL: https://svnweb.freebsd.org/changeset/base/326001 Log: Reduce code duplication for wlan(4) interface creation in network.subr. Since wlandebug(8) can accept any (original or changed) interface name this part may be simplified a bit. Modified: head/etc/network.subr Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Sun Nov 19 20:13:11 2017 (r326000) +++ head/etc/network.subr Sun Nov 19 20:18:21 2017 (r326001) @@ -1270,22 +1270,14 @@ wlan_up() fi if expr $child : 'wlan[0-9][0-9]*$' >/dev/null 2>&1; then ${IFCONFIG_CMD} $child create ${create_args} && cfg=0 - if [ $? -eq 0 ]; then - _list="$_list $child" - fi - if [ -n "${debug_flags}" ]; then - wlandebug -i $child ${debug_flags} - fi else - i=`${IFCONFIG_CMD} wlan create ${create_args}` - # XXXGL: wlandebug should accept any name - if [ -n "${debug_flags}" ]; then - wlandebug -i $i ${debug_flags} - fi - ${IFCONFIG_CMD} $i name $child && cfg=0 - if [ $? -eq 0 ]; then - _list="$_list $child" - fi + ${IFCONFIG_CMD} wlan create ${create_args} name $child && cfg=0 + fi + if [ $? -eq 0 ]; then + _list="$_list $child" + fi + if [ -n "${debug_flags}" ]; then + wlandebug -i $child ${debug_flags} fi done done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711192018.vAJKIM73037946>