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>
Copied the key cache management functions from ath9k (common.c and hw.c) to
ath/key.c so we can use them from ath5k, later.
Minor changes have been made:
- renamed ath9k_* to ath_*
- replaced ah->caps.keycache_size with common->keymax
- removed ATH9K_IS_MIC_ENABLED since it is always true.
- the AR_PCU_MIC_NEW_LOC_ENA flag is replaced with (splitmic == 0).
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Also make ath5k and ath9k use it, and share register definitions.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>