diff options
author | avos <avos@FreeBSD.org> | 2016-02-29 20:21:54 +0000 |
---|---|---|
committer | avos <avos@FreeBSD.org> | 2016-02-29 20:21:54 +0000 |
commit | 6651465b382acb71573b4989e07ff5a42d575239 (patch) | |
tree | 80be20411ed4a6e149ade9af5f243351f92c0494 /etc | |
parent | ac01d0e42d905f1758cecc124bcf65024cb3a2d4 (diff) | |
download | FreeBSD-src-6651465b382acb71573b4989e07ff5a42d575239.zip FreeBSD-src-6651465b382acb71573b4989e07ff5a42d575239.tar.gz |
network.subr: avoid unnecessary reinitialization
Do not start interface when wpa_supplicant or hostapd is used;
they will restart it anyway
Tested with:
* Intel 3945BG, STA mode (wpa_supplicant)
* RTL8188EU, HOSTAP mode (hostapd)
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5486
Diffstat (limited to 'etc')
-rw-r--r-- | etc/network.subr | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/etc/network.subr b/etc/network.subr index 0e5911b..2410e2d 100644 --- a/etc/network.subr +++ b/etc/network.subr @@ -214,16 +214,14 @@ ifconfig_up() ifalias $1 link alias ifalias $1 ether alias - if [ ${_cfg} -eq 0 ]; then - ${IFCONFIG_CMD} $1 up - fi - if wpaif $1; then /etc/rc.d/wpa_supplicant start $1 _cfg=0 # XXX: not sure this should count elif hostapif $1; then /etc/rc.d/hostapd start $1 _cfg=0 + elif [ ${_cfg} -eq 0 ]; then + ${IFCONFIG_CMD} $1 up fi if dhcpif $1; then |