* [PATCH v6] ath10k: provide survey info as accumulated data
@ 2020-06-15 14:51 Kalle Valo
2020-06-16 8:16 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Kalle Valo @ 2020-06-15 14:51 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, 24601deerej, sven, markus.theil
From: Venkateswara Naralasetty <vnaralas@codeaurora.org>
It is expected that the returned counters by .get_survey are monotonic
increasing. But the data from ath10k gets reset to zero regularly. Channel
active/busy time are then showing incorrect values (less than previous or
sometimes zero) for the currently active channel during successive survey
dump commands.
example:
$ iw dev wlan0 survey dump
Survey data from wlan0
frequency: 5180 MHz [in use]
channel active time: 54995 ms
channel busy time: 432 ms
channel receive time: 0 ms
channel transmit time: 59 ms
...
$ iw dev wlan0 survey dump
Survey data from wlan0
frequency: 5180 MHz [in use]
channel active time: 32592 ms
channel busy time: 254 ms
channel receive time: 0 ms
channel transmit time: 0 ms
...
The correct way to handle this is to use the non-clearing
WMI_BSS_SURVEY_REQ_TYPE_READ wmi_bss_survey_req_type. The firmware will
then accumulate the survey data and handle wrap arounds.
Tested on:
* QCA9984 hw1.0 firmware 10.4-3.5.3-00057
* QCA988X hw2.0 firmware 10.2.4-1.0-00047
* QCA9888 hw2.0 firmware 10.4-3.9.0.2-00024
* QCA4019 hw1.0 firmware 10.4-3.6-00140
Fixes: fa7937e3d5c2 ("ath10k: update bss channel survey information")
Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
Tested-by: Markus Theil <markus.theil@tu-ilmenau.de>
Tested-by: John Deere <24601deerej@gmail.com>
[sven@narfation.org: adjust commit message]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
v6:
* cc linux-wireless so patchwork sees this
v5:
* add additional tested devices
* restructure commit message
v4:
* updated signed-off-by
v3:
* Rebased on TOT and added Tested-by
Everything expect QCA9984 hw1.0 firmware 10.4-3.5.3-00057 was also tested
by Sven.
drivers/net/wireless/ath/ath10k/mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 919d15584d4a..77daca67a8e1 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -7283,7 +7283,7 @@ ath10k_mac_update_bss_chan_survey(struct ath10k *ar,
struct ieee80211_channel *channel)
{
int ret;
- enum wmi_bss_survey_req_type type = WMI_BSS_SURVEY_REQ_TYPE_READ_CLEAR;
+ enum wmi_bss_survey_req_type type = WMI_BSS_SURVEY_REQ_TYPE_READ;
lockdep_assert_held(&ar->conf_mutex);
--
2.7.4
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v6] ath10k: provide survey info as accumulated data
2020-06-15 14:51 [PATCH v6] ath10k: provide survey info as accumulated data Kalle Valo
@ 2020-06-16 8:16 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-06-16 8:16 UTC (permalink / raw)
To: Kalle Valo; +Cc: 24601deerej, linux-wireless, sven, ath10k, markus.theil
Kalle Valo <kvalo@codeaurora.org> wrote:
> It is expected that the returned counters by .get_survey are monotonic
> increasing. But the data from ath10k gets reset to zero regularly. Channel
> active/busy time are then showing incorrect values (less than previous or
> sometimes zero) for the currently active channel during successive survey
> dump commands.
>
> example:
>
> $ iw dev wlan0 survey dump
> Survey data from wlan0
> frequency: 5180 MHz [in use]
> channel active time: 54995 ms
> channel busy time: 432 ms
> channel receive time: 0 ms
> channel transmit time: 59 ms
> ...
>
> $ iw dev wlan0 survey dump
> Survey data from wlan0
> frequency: 5180 MHz [in use]
> channel active time: 32592 ms
> channel busy time: 254 ms
> channel receive time: 0 ms
> channel transmit time: 0 ms
> ...
>
> The correct way to handle this is to use the non-clearing
> WMI_BSS_SURVEY_REQ_TYPE_READ wmi_bss_survey_req_type. The firmware will
> then accumulate the survey data and handle wrap arounds.
>
> Tested-on: QCA9984 hw1.0 10.4-3.5.3-00057
> Tested-on: QCA988X hw2.0 10.2.4-1.0-00047
> Tested-on: QCA9888 hw2.0 10.4-3.9.0.2-00024
> Tested-on: QCA4019 hw1.0 10.4-3.6-00140
>
> Fixes: fa7937e3d5c2 ("ath10k: update bss channel survey information")
> Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
> Tested-by: Markus Theil <markus.theil@tu-ilmenau.de>
> Tested-by: John Deere <24601deerej@gmail.com>
> [sven@narfation.org: adjust commit message]
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
720e5c03e5cb ath10k: provide survey info as accumulated data
--
https://patchwork.kernel.org/patch/11605281/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-16 8:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 14:51 [PATCH v6] ath10k: provide survey info as accumulated data Kalle Valo
2020-06-16 8:16 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).