OSDN Git Service

ath10k: fix cycle counter wraparound handling for QCA4019
authorVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Tue, 7 Jun 2016 12:47:06 +0000 (15:47 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 14 Jun 2016 11:57:54 +0000 (14:57 +0300)
commit8e100354a985e7e9d547684f1038a47e109a0158
tree2ceb5eadd071bc1f60e702e866a15601002b1611
parent26c197600b4345f5143676d62260b4985da0b47b
ath10k: fix cycle counter wraparound handling for QCA4019

In QCA4019, cycle counter wraparound is not tied to rx
clear counter. Each counter would wraparound individually
and after wraparound the respective counter will be reset
to 0x7fffffff while other counter still running unaffected.
Define a new wraparound type for this behaviour and handle
it separately so that rx clear counter wraparound is also
handled just like cycle counter. With this type of
wraparound we can accurately compute and report channel
active/busy time when any of the counter overflows.

Fixes: ee9ca147c59 ("ath10k: Fix survey reporting with QCA4019")
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/hw.c
drivers/net/wireless/ath/ath10k/hw.h