diff options
author | Nick Kossifidis <mick@madwifi.org> | 2008-04-16 11:49:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-16 16:00:03 -0400 |
commit | 194828a292db3cf421ae7f82232f2fc655fbbc3c (patch) | |
tree | 1525b49d4db5b979d8cc4058207b855a4386fc28 /drivers/net/wireless/ath5k/base.c | |
parent | 136bfc798fe5378c7c1b5f5294abcfd1428438b3 (diff) |
ath5k: Misc fixes/cleanups
*Handle MIB interrupts and pass low level stats to mac80211
*Add Power On Self Test function
*Update to match recent dumps
*Let RF2425 attach so we can further test it
*Remove unused files regdom.c and regdom.h
base.c
Changes-licensed-under: 3-clause-BSD
rest
Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index dfd202ddcff3..e18305b781c9 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -2342,7 +2342,8 @@ ath5k_init(struct ath5k_softc *sc) | |||
2342 | * Enable interrupts. | 2342 | * Enable interrupts. |
2343 | */ | 2343 | */ |
2344 | sc->imask = AR5K_INT_RX | AR5K_INT_TX | AR5K_INT_RXEOL | | 2344 | sc->imask = AR5K_INT_RX | AR5K_INT_TX | AR5K_INT_RXEOL | |
2345 | AR5K_INT_RXORN | AR5K_INT_FATAL | AR5K_INT_GLOBAL; | 2345 | AR5K_INT_RXORN | AR5K_INT_FATAL | AR5K_INT_GLOBAL | |
2346 | AR5K_INT_MIB; | ||
2346 | 2347 | ||
2347 | ath5k_hw_set_intr(sc->ah, sc->imask); | 2348 | ath5k_hw_set_intr(sc->ah, sc->imask); |
2348 | /* Set ack to be sent at low bit-rates */ | 2349 | /* Set ack to be sent at low bit-rates */ |
@@ -2522,7 +2523,11 @@ ath5k_intr(int irq, void *dev_id) | |||
2522 | if (status & AR5K_INT_BMISS) { | 2523 | if (status & AR5K_INT_BMISS) { |
2523 | } | 2524 | } |
2524 | if (status & AR5K_INT_MIB) { | 2525 | if (status & AR5K_INT_MIB) { |
2525 | /* TODO */ | 2526 | /* |
2527 | * These stats are also used for ANI i think | ||
2528 | * so how about updating them more often ? | ||
2529 | */ | ||
2530 | ath5k_hw_update_mib_counters(ah, &sc->ll_stats); | ||
2526 | } | 2531 | } |
2527 | } | 2532 | } |
2528 | } while (ath5k_hw_is_intr_pending(ah) && counter-- > 0); | 2533 | } while (ath5k_hw_is_intr_pending(ah) && counter-- > 0); |
@@ -3015,6 +3020,10 @@ ath5k_get_stats(struct ieee80211_hw *hw, | |||
3015 | struct ieee80211_low_level_stats *stats) | 3020 | struct ieee80211_low_level_stats *stats) |
3016 | { | 3021 | { |
3017 | struct ath5k_softc *sc = hw->priv; | 3022 | struct ath5k_softc *sc = hw->priv; |
3023 | struct ath5k_hw *ah = sc->ah; | ||
3024 | |||
3025 | /* Force update */ | ||
3026 | ath5k_hw_update_mib_counters(ah, &sc->ll_stats); | ||
3018 | 3027 | ||
3019 | memcpy(stats, &sc->ll_stats, sizeof(sc->ll_stats)); | 3028 | memcpy(stats, &sc->ll_stats, sizeof(sc->ll_stats)); |
3020 | 3029 | ||