diff --git a/contrib/wpa/src/drivers/driver_bsd.c b/contrib/wpa/src/drivers/driver_bsd.c --- a/contrib/wpa/src/drivers/driver_bsd.c +++ b/contrib/wpa/src/drivers/driver_bsd.c @@ -526,6 +526,9 @@ __func__); return -1; } +#ifdef __FreeBSD__ + ((bsd_driver_data *)priv)->ifr_flags |= IFF_UP; +#endif return 0; } @@ -1033,6 +1036,10 @@ if (bsd_get_iface_flags(drv) < 0) goto bad; +#ifdef __FreeBSD__ + drv->ifr_flags &= ~IFF_UP; +#endif + if (bsd_set_mediaopt(drv, IFM_OMASK, IFM_IEEE80211_HOSTAP) < 0) { wpa_printf(MSG_ERROR, "%s: failed to set operation mode", __func__); @@ -1688,6 +1695,10 @@ if (drv->ifindex != 0 && !drv->if_removed) { wpa_driver_bsd_set_wpa(drv, 0); +#ifdef __FreeBSD__ + drv->ifr_flags &= ~IFF_UP; +#endif + wpa_driver_bsd_set_wpa_internal(drv, drv->prev_wpa, drv->prev_privacy); diff --git a/libexec/rc/rc.d/wpa_supplicant b/libexec/rc/rc.d/wpa_supplicant --- a/libexec/rc/rc.d/wpa_supplicant +++ b/libexec/rc/rc.d/wpa_supplicant @@ -12,7 +12,6 @@ name="wpa_supplicant" desc="WPA/802.11i Supplicant for wireless network devices" -start_postcmd="wpa_poststart" rcvar= ifn="$2" @@ -20,11 +19,6 @@ return 1 fi -wpa_poststart() { - ifconfig ${ifn} down - ifconfig ${ifn} up -} - if is_wired_interface ${ifn} ; then driver="wired" else