Skip to content

Commit

Permalink
ath9k: fix aphy / wiphy idle mismatch
Browse files Browse the repository at this point in the history
ath9k supports its own set of virtual wiphys, and it uses
the mac80211 idle notifications to know when a device needs
to be idle or not. We recently changed ath9k to force idle
on driver stop() and on resume but forgot to take into account
ath9k's own virtual wiphy idle states. These are used internally
by ath9k to check if the device's radio should be powered down
on each idle call. Without this change its possible that the
device could have been forced off but the virtual wiphy idle
was left on.

Cc: stable@kernel.org
Cc: Paul Stewart <pstew@google.com>
Cc: Amod Bodas <amod.bodas@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Dec 22, 2010
1 parent d584747 commit afe68d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
ath9k_ps_restore(sc);

sc->ps_idle = true;
ath9k_set_wiphy_idle(aphy, true);
ath_radio_disable(sc, hw);

sc->sc_flags |= SC_OP_INVALID;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath9k/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ static int ath_pci_resume(struct device *device)
ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);

sc->ps_idle = true;
ath9k_set_wiphy_idle(aphy, true);
ath_radio_disable(sc, hw);

return 0;
Expand Down

0 comments on commit afe68d0

Please sign in to comment.