On Wed, Sep 01, 2010 at 04:26:44PM +0200, Johannes Berg wrote: > Ah, but Tejun will kill us if we add more workqueues to the current > kernel :-) Ok, I wanna live ... > > > > For sure abort_scan and abort_timeout works have to be scheduled on something > > > > other than priv->workqueue. I'm queuing all scan works on priv->scan_workqueue > > > > for consistency. > > > > > > Remind me: The reason is that we need to cancel them from within the > > > workqueue? But if we're on the same workqueue, it seems like they > > > couldn't be running already, so cancel_work_sync() would always cancel > > > them? > > > > Problem is not canceling, but exactly that we can not run new work when > > old one does not finish. For example, if queued to priv->workqueue > > abort_timeout will not be able run when we are performing iwl_bg_restart. > > Will run after iwl_bg_restart finish, we don't want that. > > Ok ... Not sure I understand. Why do we care about abort_timeout work > coming after it? We'd cancel it anyway, when we kill the scan from > bg_restart, no? I wanted abort_timeout finish to avoid warning I putted in iwl_scan_cancel_sleep, but I could just remove the warning ... Cancel at the end of iwl_cancel_scan_deferred_work() is for case when we still get notification from f/w and clear STATUS_SCAN_HW bit in iwl_rx_scan_complete_notif. This can happen when firmware is in some sane state but we do restart (for example: when debugfs force_reset file was used). For the same reason we need have to iwl_bg_scan_completed allow to run in parallel with iwl_bg_restart. To complete scanning when performing restart, but f/w is responsible. Stanislaw -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html