ath9k: cancel all workqueue activity when going idle
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 36315c8..714c7d8 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1595,8 +1595,11 @@
* of the changes. Likewise we must only disable the radio towards
* the end.
*/
- if (changed & IEEE80211_CONF_CHANGE_IDLE)
+ if (changed & IEEE80211_CONF_CHANGE_IDLE) {
sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
+ if (sc->ps_idle)
+ ath_cancel_work(sc);
+ }
/*
* We just prepare to enable PS. We have to wait until our AP has