On Fri, Apr 27, 2018 at 02:50:34PM +0200, Stefan Sperling wrote:
> On Fri, Apr 27, 2018 at 03:04:27PM +0300, Paul Irofti wrote:
> > Any reason to just sleep here besides anoying the user? OK?
> > 
> 
> Have you tested this with hardware?

No. I don't think I need to. If the hardware needs to sleep it should do
it in init. And if it does need to put userland to sleep, then something
is broken elsewhere and we need to fix it. It has no reason to sleep in
the SCAN ioctl.

> 
> > 
> > diff --git sys/dev/ic/pgt.c sys/dev/ic/pgt.c
> > index 45a85503221..477fda34c40 100644
> > --- sys/dev/ic/pgt.c
> > +++ sys/dev/ic/pgt.c
> > @@ -2250,13 +2250,6 @@ pgt_ioctl(struct ifnet *ifp, u_long cmd, caddr_t req)
> >             /*
> >              * This chip scans always as soon as it gets initialized.
> >              */
> > -
> > -           /*
> > -            * Give us a bit time to scan in case we were not
> > -            * initialized before and let the userland process wait.
> > -            */
> > -           tsleep(&sc->sc_flags, 0, "pgtsca", hz * SCAN_TIMEOUT);
> > -
> >             break;
> >     case SIOCG80211ALLNODES: {
> >             struct ieee80211_nodereq *nr = NULL;

Reply via email to