From: Luis R. Rodriguez Date: Mon, 27 Jul 2009 18:56:24 +0000 (-0700) Subject: at76c50x-usb: cancel scan work at stop callback X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9ed21d390166ceb89e011d3dbd277475ff2f33c4;p=linux-beck.git at76c50x-usb: cancel scan work at stop callback This should fix suspend as mac80211 expects all work queued to the mac80211 workqueue to be canceled at driver stop(). Signed-off-by: Luis R. Rodriguez Acked-by: Kalle Valo Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c index bbf5277aeef4..f46e2b33b1f9 100644 --- a/drivers/net/wireless/at76c50x-usb.c +++ b/drivers/net/wireless/at76c50x-usb.c @@ -1773,6 +1773,7 @@ static void at76_mac80211_stop(struct ieee80211_hw *hw) at76_dbg(DBG_MAC80211, "%s()", __func__); + cancel_delayed_work(&priv->dwork_hw_scan); cancel_work_sync(&priv->work_set_promisc); mutex_lock(&priv->mtx); @@ -2298,7 +2299,6 @@ static void at76_delete_device(struct at76_priv *priv) tasklet_kill(&priv->rx_tasklet); if (priv->mac80211_registered) { - cancel_delayed_work(&priv->dwork_hw_scan); flush_workqueue(priv->hw->workqueue); ieee80211_unregister_hw(priv->hw); }