On Fri, 2013-11-01 at 20:16 +0100, Bernhard Schmidt wrote:
> On Fri, Nov 1, 2013 at 7:40 PM, clutton <clut...@zoho.com> wrote:
> > On Wed, 2013-10-23 at 21:43 -0700, Adrian Chadd wrote:
> >> IT's not. It's devd doing something dumb.
> >>
> >>
> >> -a
> >>
> >>
> >> On 23 October 2013 21:30, clutton <clut...@zoho.com> wrote:
> >>
> >> > Indeed.
> >> >
> >> > I have looked at a sys/net80211 and at a sys/dev/ath.
> >> > But I still have no idea which one triggers rc script and how on the
> >> > earth it can be done.
> >> >
> >> > On Wed, 2013-10-23 at 16:57 -0700, Adrian Chadd wrote:
> >> > > . that needs to be fixed. It definitely shouldn't be started twice!
> >> > >
> >> > >
> >> > >
> >> > > -adrian
> >> > >
> >> > >
> >> > >
> >> > > On 23 October 2013 16:56, clutton <clut...@zoho.com> wrote:
> >> > >
> >> > > > What is the best way to restart a wireless stack?
> >> > > >
> >> > > > A command "ifconfig wlan0 create wlandev ath0" starts the
> >> > wpa_supplicant
> >> > > > by itself. It means that the netif script runs the wpa_supplicant
> >> > twice,
> >> > > > always. Is it ok?
> >> > > >
> >> > > > There is my debug during booting:
> >> > > >
> >> > > > [netif.network_common()] START:
> >> > > > [netif.network_common()] ITERATION:
> >> > > > [wpa_supplicant] SUPPID=30067
> >> > > > [wpa_supplicant] SUPPID=30067
> >> > > > [netif.network_common()] STOP:
> >> > > >
> >> > > > It means that during running a network_common() from the
> >> > /etc/rc.d/netif
> >> > > > the /etc/rc.d/wpa_supplicant was called twice.
> >> > > >
> >> > > > /etc/rc.conf
> >> > > > wlans_ath0="wlan0"
> >> > > > ifconfig_wlan0="WPA DHCP"
> >> > > > ifconfig_em0="DHCP"
> >> > > > ipsec_enable="YES"
> >> > > >
> >> > > > /etc/wpa_supplicant.conf
> >> > > > network={
> >> > > >   ssid="ssid"
> >> > > >   psk="psk"
> >> > > > }
> >> > > >
> >> > > > 11.0-CURRENT
> >> > > >
> >> > > _______________________________________________
> >> > > freebsd-wireless@freebsd.org mailing list
> >> > > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> >> > > To unsubscribe, send any mail to "
> >> > freebsd-wireless-unsubscr...@freebsd.org"
> >> >
> >> >
> >> _______________________________________________
> >> freebsd-wireless@freebsd.org mailing list
> >> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> >> To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"
> >
> > Yes, it's not a bug, just misconfigured devd.
> > Here the patch:
> >
> > Ξ ~ → diff -u /usr/src/etc/devd.conf /etc/devd.conf
> > --- /usr/src/etc/devd.conf      2013-09-29 17:24:16.759250174 +0300
> > +++ /etc/devd.conf      2013-11-01 10:52:02.731746832 +0200
> > @@ -38,7 +38,7 @@
> >  #
> >  notify 0 {
> >         match "system"          "IFNET";
> > -       match "subsystem"       "!usbus[0-9]+";
> > +       match "subsystem"       "!(usbus|wlan)[0-9]+";
> >         match "type"            "ATTACH";
> >         action "/etc/pccard_ether $subsystem start";
> >  };
> > zsh: exit 1     diff -u /usr/src/etc/devd.conf /etc/devd.conf
> > ↑1 ~ →
> >
> > Is it good enough? Should I make an pr?
> > I believe that the wlan iface may be avoided and all cases, am I wrong?
> 
> That actually is a design question I once wrapped my head around
> unsuccessfully. The lines above are responsible for configuring wlan0
> if it is created, eg.
> ifconfig wlan0 destroy
> ifconfig wlan0 create wlandev ath0
> will invoke above code which will then invoke pccard_ether. Changing
> the code as you intent to will prevent this.
> 
> Someone should step up an decide what is supposed to happen, should
> wlan0 in that case be configured as stated in rc.conf, or not?
> 
> The actual issue though, is in wpa_supplicant itself. It has code to
> prevent it being started twice, but that doesn't kick in because the
> instances are started to fast and we loose (have not yet setup enough)
> information in our net code.
> 
> -- 
> Bernhard

At least it shouldn't call the pccard_ether. My wifi card is not the
pccard nor the ether card :). Here we have an old design + a new
implementation of wlan devices.

And yes, it occurs that the FreeBSD has some kind of a NetworkManager.
In my view it should be optional, because rc.d scripts is mandatory
anyway.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to