Date: Sat, 20 Dec 2014 11:41:43 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Matthias Apitz <guru@unixarea.de> Cc: "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>, Nathan Whitehorn <nwhitehorn@freebsd.org> Subject: Re: Issues with urtwn Message-ID: <CAJ-Vmo=%2B%2BNXjKpEQ-=fh9AMgB_%2B_dxYCytG9A2GMqeE5LEKjdw@mail.gmail.com> In-Reply-To: <20141220105506.GA3170@unixarea.DDR.dd> References: <20141102152953.GA20263@unixarea.DDR.dd> <54564E4D.4020703@freebsd.org> <CAJ-Vmomhzsyn0k5Ym1=qm-LibJmW=8zb2LunYHNf4sSvWsP1=w@mail.gmail.com> <20141103054633.GA3258@unixarea.DDR.dd> <20141103095530.GA42402@unixarea.DDR.dd> <CAJ-Vmokn_Kqos%2B7HhN0EmB6JohD3g%2BVaXaqkhG-6%2BYZkgDoZFA@mail.gmail.com> <20141123163811.GA5739@unixarea.DDR.dd> <CAJ-VmomHguekQzfJ17gbK4_tTsuDPCfkDOjcTmviddDrmEEzoQ@mail.gmail.com> <20141219075339.GA1748@unixarea.DDR.dd> <CAJ-VmomFoRqnkKp0cyzC6sYKckXgrKQ%2B=nFJJKd18uqD2CMhDg@mail.gmail.com> <20141220105506.GA3170@unixarea.DDR.dd>
next in thread | previous in thread | raw e-mail | index | archive | help
It's a race condition in the scan handling. :( When scan is cancelled (eg because something cancels it, or the state transitions to IDLE or something because the VAP resets) then it should be setting a flag to cancel things and the VAP should come out of powerstate. However, there seems to be some conditions where the scan is coming out of that loop because it's been aborted/stopped, so it's not complete - but then it stays in powersave mode because whatever's supposed to either change it (eg a state change, a received becaon, TIM coming in, etc) doesn't follow. So it stays in power save. The driver routines are called without the comlock held, so that's a small, narrow window for some state change to come through that doesn't trigger the scan code to see the scan is canceled and "finish" the scan (which would reset the vap powersave state.) I've added another cancel check in scan_task(). Please update this and see what happens! -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=%2B%2BNXjKpEQ-=fh9AMgB_%2B_dxYCytG9A2GMqeE5LEKjdw>