diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/virtual.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/virtual.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/virtual.c b/drivers/net/wireless/ath/ath9k/virtual.c index bc7d173b6fae..e6a50f3aa472 100644 --- a/drivers/net/wireless/ath/ath9k/virtual.c +++ b/drivers/net/wireless/ath/ath9k/virtual.c | |||
@@ -668,15 +668,26 @@ void ath9k_wiphy_set_scheduler(struct ath_softc *sc, unsigned int msec_int) | |||
668 | bool ath9k_all_wiphys_idle(struct ath_softc *sc) | 668 | bool ath9k_all_wiphys_idle(struct ath_softc *sc) |
669 | { | 669 | { |
670 | unsigned int i; | 670 | unsigned int i; |
671 | if (sc->pri_wiphy->state != ATH_WIPHY_INACTIVE) { | 671 | if (!sc->pri_wiphy->idle) |
672 | return false; | 672 | return false; |
673 | } | ||
674 | for (i = 0; i < sc->num_sec_wiphy; i++) { | 673 | for (i = 0; i < sc->num_sec_wiphy; i++) { |
675 | struct ath_wiphy *aphy = sc->sec_wiphy[i]; | 674 | struct ath_wiphy *aphy = sc->sec_wiphy[i]; |
676 | if (!aphy) | 675 | if (!aphy) |
677 | continue; | 676 | continue; |
678 | if (aphy->state != ATH_WIPHY_INACTIVE) | 677 | if (!aphy->idle) |
679 | return false; | 678 | return false; |
680 | } | 679 | } |
681 | return true; | 680 | return true; |
682 | } | 681 | } |
682 | |||
683 | /* caller must hold wiphy_lock */ | ||
684 | void ath9k_set_wiphy_idle(struct ath_wiphy *aphy, bool idle) | ||
685 | { | ||
686 | struct ath_softc *sc = aphy->sc; | ||
687 | |||
688 | aphy->idle = idle; | ||
689 | ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_CONFIG, | ||
690 | "Marking %s as %s\n", | ||
691 | wiphy_name(aphy->hw->wiphy), | ||
692 | idle ? "idle" : "not-idle"); | ||
693 | } | ||