diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2009-03-03 12:23:33 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-05 14:39:46 -0500 |
commit | 9580a222b8a371c145d7439c1a289b9e77f8fe31 (patch) | |
tree | 6dd8ba41fe920e029c107bf249b9bb7ff89b03cd /drivers/net/wireless/ath9k/virtual.c | |
parent | 0e2dedf971f3feefd4d3d3d8cb5c57b1757f1101 (diff) |
ath9k: Make start/stop operations aware of virtual wiphys
Instead of always going through initialization/deinitialization steps,
do this only for the first/last wiphy to not break the other wiphys.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/virtual.c')
-rw-r--r-- | drivers/net/wireless/ath9k/virtual.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/virtual.c b/drivers/net/wireless/ath9k/virtual.c index 76ffdfa860ed..b66aa24d3186 100644 --- a/drivers/net/wireless/ath9k/virtual.c +++ b/drivers/net/wireless/ath9k/virtual.c | |||
@@ -477,3 +477,22 @@ int ath9k_wiphy_select(struct ath_wiphy *aphy) | |||
477 | 477 | ||
478 | return 0; | 478 | return 0; |
479 | } | 479 | } |
480 | |||
481 | bool ath9k_wiphy_started(struct ath_softc *sc) | ||
482 | { | ||
483 | int i; | ||
484 | spin_lock_bh(&sc->wiphy_lock); | ||
485 | if (sc->pri_wiphy->state != ATH_WIPHY_INACTIVE) { | ||
486 | spin_unlock_bh(&sc->wiphy_lock); | ||
487 | return true; | ||
488 | } | ||
489 | for (i = 0; i < sc->num_sec_wiphy; i++) { | ||
490 | if (sc->sec_wiphy[i] && | ||
491 | sc->sec_wiphy[i]->state != ATH_WIPHY_INACTIVE) { | ||
492 | spin_unlock_bh(&sc->wiphy_lock); | ||
493 | return true; | ||
494 | } | ||
495 | } | ||
496 | spin_unlock_bh(&sc->wiphy_lock); | ||
497 | return false; | ||
498 | } | ||