BSD: Only down the interface once we are sure we can work with it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 664db839838a3a962ebf19c361fb9339d82a117a
Author: Roy Marples <roy@xxxxxxxxxxxx>
Date:   Tue Mar 15 10:19:39 2016 +0000

    BSD: Only down the interface once we are sure we can work with it.

    Signed-off-by: Roy Marples <roy@xxxxxxxxxxxx>

diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 99f3504..a6ca9a8 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -1542,11 +1542,7 @@ wpa_driver_bsd_init(void *ctx, const char *ifname, void *priv)
 
 	drv->ctx = ctx;
 	drv->global = priv;
-
 	os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
-	/* Down interface during setup. */
-	if (bsd_ctrl_iface(drv, 0) < 0)
-		goto fail;
 
 	if (!GETPARAM(drv, IEEE80211_IOC_ROAMING, drv->prev_roaming)) {
 		wpa_printf(MSG_DEBUG, "%s: failed to get roaming state: %s",
@@ -1567,6 +1563,10 @@ wpa_driver_bsd_init(void *ctx, const char *ifname, void *priv)
 	if (wpa_driver_bsd_capa(drv))
 		goto fail;
 
+	/* Down interface during setup. */
+	if (bsd_ctrl_iface(drv, 0) < 0)
+		goto fail;
+
 	drv->opmode = get80211opmode(drv);
 	dl_list_add(&drv->global->ifaces, &drv->list);
 
_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux