On Fri, 2010-09-03 at 13:57 +0200, Stanislaw Gruszka wrote: > Always cancel scan when stooping device and scan is currently pending, > we should newer have scan running after down device. > > To assure we start scan cancel from restart work we have to schedule > abort_scan to different workqueue than priv->workqueue. Hmmm... > --- a/drivers/net/wireless/iwlwifi/iwl-agn.c > +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c > @@ -2875,8 +2875,9 @@ static void __iwl_down(struct iwl_priv *priv) > > IWL_DEBUG_INFO(priv, DRV_NAME " is going down\n"); > > - if (!exit_pending) > - set_bit(STATUS_EXIT_PENDING, &priv->status); > + iwl_scan_cancel_timeout(priv, 200); This introduces a locking issue, because iwl_scan_cancel_timeout() drops the mutex. I suspect you fix that later though, but for example the restart work uses the mutex to atomically track a few BT related variables. johannes -- 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