diff mbox

[2/2] at76c50x-usb: cancel scan work at stop callback

Message ID 1248720984-15922-3-git-send-email-lrodriguez@atheros.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Luis Rodriguez July 27, 2009, 6:56 p.m. UTC
This should fix suspend as mac80211 expects all work queued
to the mac80211 workqueue to be canceled at driver stop().

Cc: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/at76c50x-usb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Kalle Valo July 29, 2009, 5:41 a.m. UTC | #1
"Luis R. Rodriguez" <lrodriguez@Atheros.com> writes:

> This should fix suspend as mac80211 expects all work queued
> to the mac80211 workqueue to be canceled at driver stop().
>
> Cc: Kalle Valo <kalle.valo@iki.fi>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Indeed, the original implementation doesn't make any sense. Thanks for
looking at at76c50x-usb.

Acked-by: Kalle Valo <kalle.valo@iki.fi>
diff mbox

Patch

diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index bbf5277..f46e2b3 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);
 	}