diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-10-08 22:13:53 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-11 15:04:20 -0400 |
commit | b5bfc5683db44a121ad47ec0a9f4efd4aac040e0 (patch) | |
tree | b9d182f42cbbfdea95ad7ab425302617c5f40db9 /drivers/net/wireless/ath/ath.h | |
parent | 9d119f3ebd074bde0b801f476a44ca60d222efb2 (diff) | |
download | blackbird-op-linux-b5bfc5683db44a121ad47ec0a9f4efd4aac040e0.tar.gz blackbird-op-linux-b5bfc5683db44a121ad47ec0a9f4efd4aac040e0.zip |
ath9k_hw: move the cycle counter tracking to ath
Instead of keeping track of wraparound, clear the counters on every
access and keep separate deltas for ANI and later survey use.
Also moves the function for calculating the 'listen time' for ANI
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath.h')
-rw-r--r-- | drivers/net/wireless/ath/ath.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index b36d9d770ff1..501050c0296f 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h @@ -19,6 +19,7 @@ #include <linux/skbuff.h> #include <linux/if_ether.h> +#include <linux/spinlock.h> #include <net/mac80211.h> /* @@ -42,6 +43,13 @@ struct ath_ani { struct timer_list timer; }; +struct ath_cycle_counters { + u32 cycles; + u32 rx_busy; + u32 rx_frame; + u32 tx_frame; +}; + enum ath_device_state { ATH_HW_UNAVAILABLE, ATH_HW_INITIALIZED, @@ -147,6 +155,10 @@ struct ath_common { unsigned int clockrate; + spinlock_t cc_lock; + struct ath_cycle_counters cc_ani; + struct ath_cycle_counters cc_survey; + struct ath_regulatory regulatory; const struct ath_ops *ops; const struct ath_bus_ops *bus_ops; @@ -163,5 +175,7 @@ int ath_key_config(struct ath_common *common, struct ieee80211_sta *sta, struct ieee80211_key_conf *key); bool ath_hw_keyreset(struct ath_common *common, u16 entry); +void ath_hw_cycle_counters_update(struct ath_common *common); +int32_t ath_hw_get_listen_time(struct ath_common *common); #endif /* ATH_H */ |