Sergey Matyukevich <sergey.matyukevich.os@xxxxxxxxxxxxx> writes: > 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 <igor.mitsyanko.os@xxxxxxxxxxxxx> > Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@xxxxxxxxxxxxx> > Signed-off-by: Avinash Patil <avinashp@xxxxxxxxxxxxx> [...] > --- 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(&mac->scan_timeout)) > + del_timer_sync(&mac->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