Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 2013 11:03:48 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        clutton <clutton@zoho.com>, "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: service netif restart [iface] runs a wpa_supplicant twice
Message-ID:  <CAJ-VmomUiOzC0g-k%2BLOXkv0BZq22NEcAfGUMYEOY1S2f236tng@mail.gmail.com>
In-Reply-To: <201311051154.18872.jhb@freebsd.org>
References:  <1382572583.1862.39.camel@eva02.mbsd> <1383419596.3253.42.camel@eva02.mbsd> <CAJ-VmomAiBTFiiFn6ENtJMjBurhq-U2nFh_vWeOxkN=3d6MZTQ@mail.gmail.com> <201311051154.18872.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 5 November 2013 08:54, John Baldwin <jhb@freebsd.org> wrote:

> Note that devd just runs netif (via /etc/pccard_ether), so it's already
> just one script, and having netif bail if devd is running would make
> netif not do anything in the common case.
>
> What normally happens during boot is that '/etc/rc.d/netif start' creates
> wlan0 and runs wpa_supplicant via 'childif_create' making a nested call to
> ifn_start for wlan0.  That is, childif_create autoruns /etc/rc.d/netif
> explicitly after it creates the device.  Probably that is what should be
> removed.  That would let devd always start wpa_supplicant via
> /etc/pccard_ether.  I've just tested this by doing a stop/start on iwn0
> (parent of wlan0, so wlan0 gets destroyed and re-created) and it started
> wpa_supplicant correctly.
>
> Index: head/etc/network.subr
> ===================================================================
> --- network.subr        (revision 257705)
> +++ network.subr        (working copy)
> @@ -1429,9 +1429,6 @@ childif_create()
>                         fi
>                         ${IFCONFIG_CMD} $i name $child && cfg=0
>                 fi
> -               if autoif $child; then
> -                       ifn_start $child
> -               fi
>         done
>
>         # Create vlan interfaces
>
> I also tested vlans created via vlans_<if> and they should use the same fix as
> well.  Note that this model is more consistent with how cloned_interfaces
> works where ifn_start is not explicitly run when each interface is created.
> Instead, we rely on devd kicking off pccard_ether for those as well.

Well, if you'd like to do the honours.. ?

I'd like this fixed before 10.0-REL. It should make the normal use
case for wifi actually work reliably again.



-adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomUiOzC0g-k%2BLOXkv0BZq22NEcAfGUMYEOY1S2f236tng>