Re: [PATCH v2 09/12] qtnfmac: implement scan timeout
Sergey Matyukevichwrites: >> > + if (timer_pending(>scan_timeout)) >> > + del_timer_sync(>scan_timeout); >> >> What if the device is removed while the timer is pending, is that >> handled? > > Good point. I took another look at this kind of corner cases. Timer is not > disabled > explicitely. But ongoing scan request is explicitely aborted in relevant > cfg80211 ops, e.g. on virtual interface change or removal. Though it looks > like > some of AP usecases are not handled: e.g. when AP is stopped while scan is > in progress. I will queue the fix into the next cleanup/bugfix patch series > if it is needed to abort scan in such a case. Good, thanks for checking. -- Kalle Valo
Re: [PATCH v2 09/12] qtnfmac: implement scan timeout
> > + if (timer_pending(>scan_timeout)) > > + del_timer_sync(>scan_timeout); > > What if the device is removed while the timer is pending, is that > handled? Good point. I took another look at this kind of corner cases. Timer is not disabled explicitely. But ongoing scan request is explicitely aborted in relevant cfg80211 ops, e.g. on virtual interface change or removal. Though it looks like some of AP usecases are not handled: e.g. when AP is stopped while scan is in progress. I will queue the fix into the next cleanup/bugfix patch series if it is needed to abort scan in such a case. Thanks, Sergey
Re: [PATCH v2 09/12] qtnfmac: implement scan timeout
Sergey Matyukevichwrites: > Userspace tools may hang on scan in the case when scan completion event > is not returned by firmware. This patch implements the scan timeout > to avoid such situation. > > Signed-off-by: Igor Mitsyanko > Signed-off-by: Sergey Matyukevich > Signed-off-by: Avinash Patil [...] > --- a/drivers/net/wireless/quantenna/qtnfmac/event.c > +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c > @@ -345,6 +345,8 @@ qtnf_event_handle_scan_complete(struct qtnf_wmac *mac, > return -EINVAL; > } > > + if (timer_pending(>scan_timeout)) > + del_timer_sync(>scan_timeout); What if the device is removed while the timer is pending, is that handled? No need to resend because of this, a followup patch is fine. Just started to wonder this while reviewing the patches. -- Kalle Valo