All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 15:41 ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-04 15:41 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, ath10k, ath11k, Markus Theil

ath10k currently reports survey results for the last interval between each
invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
can lead to unexpectedly small results, e.g. when hostapd uses survey
data and iw survey dump is invoked in parallel. Fix this by returning
cumulative results, that don't depend on the last invocation. Other
drivers, e.g. ath9k or mt76 also use this behavior.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/net/wireless/ath/ath10k/wmi.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index a81a1ab2de19..451c8275d07b 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5802,16 +5802,16 @@ static int ath10k_wmi_event_pdev_bss_chan_info(struct ath10k *ar,
 
 	survey = &ar->survey[idx];
 
-	survey->noise     = noise_floor;
-	survey->time      = div_u64(total, cc_freq_hz);
-	survey->time_busy = div_u64(busy, cc_freq_hz);
-	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
-	survey->time_tx   = div_u64(tx, cc_freq_hz);
-	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
-			     SURVEY_INFO_TIME |
-			     SURVEY_INFO_TIME_BUSY |
-			     SURVEY_INFO_TIME_RX |
-			     SURVEY_INFO_TIME_TX);
+	survey->noise      = noise_floor;
+	survey->time      += div_u64(total, cc_freq_hz);
+	survey->time_busy += div_u64(busy, cc_freq_hz);
+	survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
+	survey->time_tx   += div_u64(tx, cc_freq_hz);
+	survey->filled    |= (SURVEY_INFO_NOISE_DBM |
+			      SURVEY_INFO_TIME |
+			      SURVEY_INFO_TIME_BUSY |
+			      SURVEY_INFO_TIME_RX |
+			      SURVEY_INFO_TIME_TX);
 exit:
 	spin_unlock_bh(&ar->data_lock);
 	complete(&ar->bss_survey_done);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 15:41 ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-04 15:41 UTC (permalink / raw)
  To: linux-wireless; +Cc: Markus Theil, ath10k, kvalo, ath11k

ath10k currently reports survey results for the last interval between each
invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
can lead to unexpectedly small results, e.g. when hostapd uses survey
data and iw survey dump is invoked in parallel. Fix this by returning
cumulative results, that don't depend on the last invocation. Other
drivers, e.g. ath9k or mt76 also use this behavior.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/net/wireless/ath/ath10k/wmi.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index a81a1ab2de19..451c8275d07b 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5802,16 +5802,16 @@ static int ath10k_wmi_event_pdev_bss_chan_info(struct ath10k *ar,
 
 	survey = &ar->survey[idx];
 
-	survey->noise     = noise_floor;
-	survey->time      = div_u64(total, cc_freq_hz);
-	survey->time_busy = div_u64(busy, cc_freq_hz);
-	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
-	survey->time_tx   = div_u64(tx, cc_freq_hz);
-	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
-			     SURVEY_INFO_TIME |
-			     SURVEY_INFO_TIME_BUSY |
-			     SURVEY_INFO_TIME_RX |
-			     SURVEY_INFO_TIME_TX);
+	survey->noise      = noise_floor;
+	survey->time      += div_u64(total, cc_freq_hz);
+	survey->time_busy += div_u64(busy, cc_freq_hz);
+	survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
+	survey->time_tx   += div_u64(tx, cc_freq_hz);
+	survey->filled    |= (SURVEY_INFO_NOISE_DBM |
+			      SURVEY_INFO_TIME |
+			      SURVEY_INFO_TIME_BUSY |
+			      SURVEY_INFO_TIME_RX |
+			      SURVEY_INFO_TIME_TX);
 exit:
 	spin_unlock_bh(&ar->data_lock);
 	complete(&ar->bss_survey_done);
-- 
2.26.2


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 15:41 ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-04 15:41 UTC (permalink / raw)
  To: linux-wireless; +Cc: Markus Theil, ath10k, kvalo, ath11k

ath10k currently reports survey results for the last interval between each
invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
can lead to unexpectedly small results, e.g. when hostapd uses survey
data and iw survey dump is invoked in parallel. Fix this by returning
cumulative results, that don't depend on the last invocation. Other
drivers, e.g. ath9k or mt76 also use this behavior.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/net/wireless/ath/ath10k/wmi.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index a81a1ab2de19..451c8275d07b 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5802,16 +5802,16 @@ static int ath10k_wmi_event_pdev_bss_chan_info(struct ath10k *ar,
 
 	survey = &ar->survey[idx];
 
-	survey->noise     = noise_floor;
-	survey->time      = div_u64(total, cc_freq_hz);
-	survey->time_busy = div_u64(busy, cc_freq_hz);
-	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
-	survey->time_tx   = div_u64(tx, cc_freq_hz);
-	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
-			     SURVEY_INFO_TIME |
-			     SURVEY_INFO_TIME_BUSY |
-			     SURVEY_INFO_TIME_RX |
-			     SURVEY_INFO_TIME_TX);
+	survey->noise      = noise_floor;
+	survey->time      += div_u64(total, cc_freq_hz);
+	survey->time_busy += div_u64(busy, cc_freq_hz);
+	survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
+	survey->time_tx   += div_u64(tx, cc_freq_hz);
+	survey->filled    |= (SURVEY_INFO_NOISE_DBM |
+			      SURVEY_INFO_TIME |
+			      SURVEY_INFO_TIME_BUSY |
+			      SURVEY_INFO_TIME_RX |
+			      SURVEY_INFO_TIME_TX);
 exit:
 	spin_unlock_bh(&ar->data_lock);
 	complete(&ar->bss_survey_done);
-- 
2.26.2


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH 2/2] ath11k: use cumulative survey statistics
  2020-05-04 15:41 ` Markus Theil
  (?)
@ 2020-05-04 15:41   ` Markus Theil
  -1 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-04 15:41 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, ath10k, ath11k, Markus Theil

ath11k currently reports survey results for the last interval between each
invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
can lead to unexpectedly small results, e.g. when hostapd uses survey
data and iw survey dump is invoked in parallel. Fix this by returning
cumulative results, that don't depend on the last invocation. Other
drivers, e.g. ath9k or mt76 also use this behavior.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/net/wireless/ath/ath11k/wmi.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index c2a972377687..322ddfda5bfd 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct ath11k_base *ab, struct sk_buff *skb)
 
 	survey = &ar->survey[idx];
 
-	survey->noise     = bss_ch_info_ev.noise_floor;
-	survey->time      = div_u64(total, cc_freq_hz);
-	survey->time_busy = div_u64(busy, cc_freq_hz);
-	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
-	survey->time_tx   = div_u64(tx, cc_freq_hz);
-	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
-			     SURVEY_INFO_TIME |
-			     SURVEY_INFO_TIME_BUSY |
-			     SURVEY_INFO_TIME_RX |
-			     SURVEY_INFO_TIME_TX);
+	survey->noise      = bss_ch_info_ev.noise_floor;
+	survey->time      += div_u64(total, cc_freq_hz);
+	survey->time_busy += div_u64(busy, cc_freq_hz);
+	survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
+	survey->time_tx   += div_u64(tx, cc_freq_hz);
+	survey->filled    |= (SURVEY_INFO_NOISE_DBM |
+			      SURVEY_INFO_TIME |
+			      SURVEY_INFO_TIME_BUSY |
+			      SURVEY_INFO_TIME_RX |
+			      SURVEY_INFO_TIME_TX);
 exit:
 	spin_unlock_bh(&ar->data_lock);
 	complete(&ar->bss_survey_done);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-04 15:41   ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-04 15:41 UTC (permalink / raw)
  To: linux-wireless; +Cc: Markus Theil, ath10k, kvalo, ath11k

ath11k currently reports survey results for the last interval between each
invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
can lead to unexpectedly small results, e.g. when hostapd uses survey
data and iw survey dump is invoked in parallel. Fix this by returning
cumulative results, that don't depend on the last invocation. Other
drivers, e.g. ath9k or mt76 also use this behavior.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/net/wireless/ath/ath11k/wmi.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index c2a972377687..322ddfda5bfd 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct ath11k_base *ab, struct sk_buff *skb)
 
 	survey = &ar->survey[idx];
 
-	survey->noise     = bss_ch_info_ev.noise_floor;
-	survey->time      = div_u64(total, cc_freq_hz);
-	survey->time_busy = div_u64(busy, cc_freq_hz);
-	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
-	survey->time_tx   = div_u64(tx, cc_freq_hz);
-	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
-			     SURVEY_INFO_TIME |
-			     SURVEY_INFO_TIME_BUSY |
-			     SURVEY_INFO_TIME_RX |
-			     SURVEY_INFO_TIME_TX);
+	survey->noise      = bss_ch_info_ev.noise_floor;
+	survey->time      += div_u64(total, cc_freq_hz);
+	survey->time_busy += div_u64(busy, cc_freq_hz);
+	survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
+	survey->time_tx   += div_u64(tx, cc_freq_hz);
+	survey->filled    |= (SURVEY_INFO_NOISE_DBM |
+			      SURVEY_INFO_TIME |
+			      SURVEY_INFO_TIME_BUSY |
+			      SURVEY_INFO_TIME_RX |
+			      SURVEY_INFO_TIME_TX);
 exit:
 	spin_unlock_bh(&ar->data_lock);
 	complete(&ar->bss_survey_done);
-- 
2.26.2


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-04 15:41   ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-04 15:41 UTC (permalink / raw)
  To: linux-wireless; +Cc: Markus Theil, ath10k, kvalo, ath11k

ath11k currently reports survey results for the last interval between each
invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
can lead to unexpectedly small results, e.g. when hostapd uses survey
data and iw survey dump is invoked in parallel. Fix this by returning
cumulative results, that don't depend on the last invocation. Other
drivers, e.g. ath9k or mt76 also use this behavior.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 drivers/net/wireless/ath/ath11k/wmi.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index c2a972377687..322ddfda5bfd 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct ath11k_base *ab, struct sk_buff *skb)
 
 	survey = &ar->survey[idx];
 
-	survey->noise     = bss_ch_info_ev.noise_floor;
-	survey->time      = div_u64(total, cc_freq_hz);
-	survey->time_busy = div_u64(busy, cc_freq_hz);
-	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
-	survey->time_tx   = div_u64(tx, cc_freq_hz);
-	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
-			     SURVEY_INFO_TIME |
-			     SURVEY_INFO_TIME_BUSY |
-			     SURVEY_INFO_TIME_RX |
-			     SURVEY_INFO_TIME_TX);
+	survey->noise      = bss_ch_info_ev.noise_floor;
+	survey->time      += div_u64(total, cc_freq_hz);
+	survey->time_busy += div_u64(busy, cc_freq_hz);
+	survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
+	survey->time_tx   += div_u64(tx, cc_freq_hz);
+	survey->filled    |= (SURVEY_INFO_NOISE_DBM |
+			      SURVEY_INFO_TIME |
+			      SURVEY_INFO_TIME_BUSY |
+			      SURVEY_INFO_TIME_RX |
+			      SURVEY_INFO_TIME_TX);
 exit:
 	spin_unlock_bh(&ar->data_lock);
 	complete(&ar->bss_survey_done);
-- 
2.26.2


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-04 15:41 ` Markus Theil
  (?)
@ 2020-05-04 16:29   ` Sven Eckelmann
  -1 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-04 16:29 UTC (permalink / raw)
  To: ath11k; +Cc: Markus Theil, linux-wireless, ath10k, kvalo

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

On Monday, 4 May 2020 17:41:21 CEST Markus Theil wrote:
> ath10k currently reports survey results for the last interval between each
> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
> can lead to unexpectedly small results, e.g. when hostapd uses survey
> data and iw survey dump is invoked in parallel. Fix this by returning
> cumulative results, that don't depend on the last invocation. Other
> drivers, e.g. ath9k or mt76 also use this behavior.

It is (unfortunately) not that trivial:

See code and comments from other people:

* https://patchwork.kernel.org/cover/11150285/
* https://patchwork.kernel.org/patch/11150287/
* https://patchwork.kernel.org/patch/11150289/

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 16:29   ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-04 16:29 UTC (permalink / raw)
  To: ath11k; +Cc: kvalo, linux-wireless, Markus Theil, ath10k


[-- Attachment #1.1: Type: text/plain, Size: 720 bytes --]

On Monday, 4 May 2020 17:41:21 CEST Markus Theil wrote:
> ath10k currently reports survey results for the last interval between each
> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
> can lead to unexpectedly small results, e.g. when hostapd uses survey
> data and iw survey dump is invoked in parallel. Fix this by returning
> cumulative results, that don't depend on the last invocation. Other
> drivers, e.g. ath9k or mt76 also use this behavior.

It is (unfortunately) not that trivial:

See code and comments from other people:

* https://patchwork.kernel.org/cover/11150285/
* https://patchwork.kernel.org/patch/11150287/
* https://patchwork.kernel.org/patch/11150289/

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 16:29   ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-04 16:29 UTC (permalink / raw)
  To: ath11k; +Cc: kvalo, linux-wireless, Markus Theil, ath10k


[-- Attachment #1.1: Type: text/plain, Size: 720 bytes --]

On Monday, 4 May 2020 17:41:21 CEST Markus Theil wrote:
> ath10k currently reports survey results for the last interval between each
> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
> can lead to unexpectedly small results, e.g. when hostapd uses survey
> data and iw survey dump is invoked in parallel. Fix this by returning
> cumulative results, that don't depend on the last invocation. Other
> drivers, e.g. ath9k or mt76 also use this behavior.

It is (unfortunately) not that trivial:

See code and comments from other people:

* https://patchwork.kernel.org/cover/11150285/
* https://patchwork.kernel.org/patch/11150287/
* https://patchwork.kernel.org/patch/11150289/

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-04 16:29   ` Sven Eckelmann
  (?)
@ 2020-05-04 16:33     ` Markus Theil
  -1 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-04 16:33 UTC (permalink / raw)
  To: Sven Eckelmann, ath11k; +Cc: linux-wireless, ath10k, kvalo

On 5/4/20 6:29 PM, Sven Eckelmann wrote:
> On Monday, 4 May 2020 17:41:21 CEST Markus Theil wrote:
>> ath10k currently reports survey results for the last interval between each
>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>> data and iw survey dump is invoked in parallel. Fix this by returning
>> cumulative results, that don't depend on the last invocation. Other
>> drivers, e.g. ath9k or mt76 also use this behavior.
> It is (unfortunately) not that trivial:
>
> See code and comments from other people:
>
> * https://patchwork.kernel.org/cover/11150285/
> * https://patchwork.kernel.org/patch/11150287/
> * https://patchwork.kernel.org/patch/11150289/
>
> Kind regards,
> 	Sven
Thanks a lot for pointing this out! I was not aware of your patch.


^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 16:33     ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-04 16:33 UTC (permalink / raw)
  To: Sven Eckelmann, ath11k; +Cc: linux-wireless, kvalo, ath10k

On 5/4/20 6:29 PM, Sven Eckelmann wrote:
> On Monday, 4 May 2020 17:41:21 CEST Markus Theil wrote:
>> ath10k currently reports survey results for the last interval between each
>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>> data and iw survey dump is invoked in parallel. Fix this by returning
>> cumulative results, that don't depend on the last invocation. Other
>> drivers, e.g. ath9k or mt76 also use this behavior.
> It is (unfortunately) not that trivial:
>
> See code and comments from other people:
>
> * https://patchwork.kernel.org/cover/11150285/
> * https://patchwork.kernel.org/patch/11150287/
> * https://patchwork.kernel.org/patch/11150289/
>
> Kind regards,
> 	Sven
Thanks a lot for pointing this out! I was not aware of your patch.


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 16:33     ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-04 16:33 UTC (permalink / raw)
  To: Sven Eckelmann, ath11k; +Cc: linux-wireless, kvalo, ath10k

On 5/4/20 6:29 PM, Sven Eckelmann wrote:
> On Monday, 4 May 2020 17:41:21 CEST Markus Theil wrote:
>> ath10k currently reports survey results for the last interval between each
>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>> data and iw survey dump is invoked in parallel. Fix this by returning
>> cumulative results, that don't depend on the last invocation. Other
>> drivers, e.g. ath9k or mt76 also use this behavior.
> It is (unfortunately) not that trivial:
>
> See code and comments from other people:
>
> * https://patchwork.kernel.org/cover/11150285/
> * https://patchwork.kernel.org/patch/11150287/
> * https://patchwork.kernel.org/patch/11150289/
>
> Kind regards,
> 	Sven
Thanks a lot for pointing this out! I was not aware of your patch.


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
  2020-05-04 15:41   ` Markus Theil
  (?)
@ 2020-05-04 16:36     ` Sven Eckelmann
  -1 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-04 16:36 UTC (permalink / raw)
  To: ath10k; +Cc: Markus Theil, linux-wireless, kvalo, ath11k

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

On Monday, 4 May 2020 17:41:22 CEST Markus Theil wrote:
[...]
> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
> index c2a972377687..322ddfda5bfd 100644
> --- a/drivers/net/wireless/ath/ath11k/wmi.c
> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
> @@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct ath11k_base *ab, struct sk_buff *skb)
[...]

What about the survey modifying code in ath11k_chan_info_event?

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-04 16:36     ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-04 16:36 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Markus Theil, kvalo, ath11k


[-- Attachment #1.1: Type: text/plain, Size: 483 bytes --]

On Monday, 4 May 2020 17:41:22 CEST Markus Theil wrote:
[...]
> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
> index c2a972377687..322ddfda5bfd 100644
> --- a/drivers/net/wireless/ath/ath11k/wmi.c
> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
> @@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct ath11k_base *ab, struct sk_buff *skb)
[...]

What about the survey modifying code in ath11k_chan_info_event?

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-04 16:36     ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-04 16:36 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Markus Theil, kvalo, ath11k


[-- Attachment #1.1: Type: text/plain, Size: 483 bytes --]

On Monday, 4 May 2020 17:41:22 CEST Markus Theil wrote:
[...]
> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
> index c2a972377687..322ddfda5bfd 100644
> --- a/drivers/net/wireless/ath/ath11k/wmi.c
> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
> @@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct ath11k_base *ab, struct sk_buff *skb)
[...]

What about the survey modifying code in ath11k_chan_info_event?

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
  2020-05-04 15:41   ` Markus Theil
  (?)
@ 2020-05-04 23:37     ` Rajkumar Manoharan
  -1 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-04 23:37 UTC (permalink / raw)
  To: Markus Theil; +Cc: linux-wireless, kvalo, ath10k, ath11k, linux-wireless-owner

On 2020-05-04 08:41, Markus Theil wrote:
> ath11k currently reports survey results for the last interval between 
> each
> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
> can lead to unexpectedly small results, e.g. when hostapd uses survey
> data and iw survey dump is invoked in parallel. Fix this by returning
> cumulative results, that don't depend on the last invocation. Other
> drivers, e.g. ath9k or mt76 also use this behavior.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> ---
>  drivers/net/wireless/ath/ath11k/wmi.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c
> b/drivers/net/wireless/ath/ath11k/wmi.c
> index c2a972377687..322ddfda5bfd 100644
> --- a/drivers/net/wireless/ath/ath11k/wmi.c
> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
> @@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct
> ath11k_base *ab, struct sk_buff *skb)
> 
>  	survey = &ar->survey[idx];
> 
> -	survey->noise     = bss_ch_info_ev.noise_floor;
> -	survey->time      = div_u64(total, cc_freq_hz);
> -	survey->time_busy = div_u64(busy, cc_freq_hz);
> -	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
> -	survey->time_tx   = div_u64(tx, cc_freq_hz);
> -	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
> -			     SURVEY_INFO_TIME |
> -			     SURVEY_INFO_TIME_BUSY |
> -			     SURVEY_INFO_TIME_RX |
> -			     SURVEY_INFO_TIME_TX);
> +	survey->noise      = bss_ch_info_ev.noise_floor;
> +	survey->time      += div_u64(total, cc_freq_hz);
> +	survey->time_busy += div_u64(busy, cc_freq_hz);
> +	survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
> +	survey->time_tx   += div_u64(tx, cc_freq_hz);
> +	survey->filled    |= (SURVEY_INFO_NOISE_DBM |
> +			      SURVEY_INFO_TIME |
> +			      SURVEY_INFO_TIME_BUSY |
> +			      SURVEY_INFO_TIME_RX |
> +			      SURVEY_INFO_TIME_TX);

Markus,

It depends on type of survey request is given to firmware. In ath11k, 
firmware reports
accumulated values. So the above addition is wrong and report double 
value. Have you
tested this change?

-Rajkumar

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-04 23:37     ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-04 23:37 UTC (permalink / raw)
  To: Markus Theil; +Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k

On 2020-05-04 08:41, Markus Theil wrote:
> ath11k currently reports survey results for the last interval between 
> each
> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
> can lead to unexpectedly small results, e.g. when hostapd uses survey
> data and iw survey dump is invoked in parallel. Fix this by returning
> cumulative results, that don't depend on the last invocation. Other
> drivers, e.g. ath9k or mt76 also use this behavior.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> ---
>  drivers/net/wireless/ath/ath11k/wmi.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c
> b/drivers/net/wireless/ath/ath11k/wmi.c
> index c2a972377687..322ddfda5bfd 100644
> --- a/drivers/net/wireless/ath/ath11k/wmi.c
> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
> @@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct
> ath11k_base *ab, struct sk_buff *skb)
> 
>  	survey = &ar->survey[idx];
> 
> -	survey->noise     = bss_ch_info_ev.noise_floor;
> -	survey->time      = div_u64(total, cc_freq_hz);
> -	survey->time_busy = div_u64(busy, cc_freq_hz);
> -	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
> -	survey->time_tx   = div_u64(tx, cc_freq_hz);
> -	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
> -			     SURVEY_INFO_TIME |
> -			     SURVEY_INFO_TIME_BUSY |
> -			     SURVEY_INFO_TIME_RX |
> -			     SURVEY_INFO_TIME_TX);
> +	survey->noise      = bss_ch_info_ev.noise_floor;
> +	survey->time      += div_u64(total, cc_freq_hz);
> +	survey->time_busy += div_u64(busy, cc_freq_hz);
> +	survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
> +	survey->time_tx   += div_u64(tx, cc_freq_hz);
> +	survey->filled    |= (SURVEY_INFO_NOISE_DBM |
> +			      SURVEY_INFO_TIME |
> +			      SURVEY_INFO_TIME_BUSY |
> +			      SURVEY_INFO_TIME_RX |
> +			      SURVEY_INFO_TIME_TX);

Markus,

It depends on type of survey request is given to firmware. In ath11k, 
firmware reports
accumulated values. So the above addition is wrong and report double 
value. Have you
tested this change?

-Rajkumar

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-04 23:37     ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-04 23:37 UTC (permalink / raw)
  To: Markus Theil; +Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k

On 2020-05-04 08:41, Markus Theil wrote:
> ath11k currently reports survey results for the last interval between 
> each
> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
> can lead to unexpectedly small results, e.g. when hostapd uses survey
> data and iw survey dump is invoked in parallel. Fix this by returning
> cumulative results, that don't depend on the last invocation. Other
> drivers, e.g. ath9k or mt76 also use this behavior.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> ---
>  drivers/net/wireless/ath/ath11k/wmi.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c
> b/drivers/net/wireless/ath/ath11k/wmi.c
> index c2a972377687..322ddfda5bfd 100644
> --- a/drivers/net/wireless/ath/ath11k/wmi.c
> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
> @@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct
> ath11k_base *ab, struct sk_buff *skb)
> 
>  	survey = &ar->survey[idx];
> 
> -	survey->noise     = bss_ch_info_ev.noise_floor;
> -	survey->time      = div_u64(total, cc_freq_hz);
> -	survey->time_busy = div_u64(busy, cc_freq_hz);
> -	survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
> -	survey->time_tx   = div_u64(tx, cc_freq_hz);
> -	survey->filled   |= (SURVEY_INFO_NOISE_DBM |
> -			     SURVEY_INFO_TIME |
> -			     SURVEY_INFO_TIME_BUSY |
> -			     SURVEY_INFO_TIME_RX |
> -			     SURVEY_INFO_TIME_TX);
> +	survey->noise      = bss_ch_info_ev.noise_floor;
> +	survey->time      += div_u64(total, cc_freq_hz);
> +	survey->time_busy += div_u64(busy, cc_freq_hz);
> +	survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
> +	survey->time_tx   += div_u64(tx, cc_freq_hz);
> +	survey->filled    |= (SURVEY_INFO_NOISE_DBM |
> +			      SURVEY_INFO_TIME |
> +			      SURVEY_INFO_TIME_BUSY |
> +			      SURVEY_INFO_TIME_RX |
> +			      SURVEY_INFO_TIME_TX);

Markus,

It depends on type of survey request is given to firmware. In ath11k, 
firmware reports
accumulated values. So the above addition is wrong and report double 
value. Have you
tested this change?

-Rajkumar

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-04 15:41 ` Markus Theil
  (?)
@ 2020-05-04 23:46   ` Rajkumar Manoharan
  -1 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-04 23:46 UTC (permalink / raw)
  To: Markus Theil; +Cc: linux-wireless, kvalo, ath10k, ath11k, linux-wireless-owner

On 2020-05-04 08:41, Markus Theil wrote:
> ath10k currently reports survey results for the last interval between 
> each
> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
> can lead to unexpectedly small results, e.g. when hostapd uses survey
> data and iw survey dump is invoked in parallel. Fix this by returning
> cumulative results, that don't depend on the last invocation. Other
> drivers, e.g. ath9k or mt76 also use this behavior.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> 

IIRC this was fixed a while ago by below patch. Somehow it never landed 
in ath.git.
Simple one line change is enough.

https://patchwork.kernel.org/patch/10550707/

-Rajkumar

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 23:46   ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-04 23:46 UTC (permalink / raw)
  To: Markus Theil; +Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k

On 2020-05-04 08:41, Markus Theil wrote:
> ath10k currently reports survey results for the last interval between 
> each
> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
> can lead to unexpectedly small results, e.g. when hostapd uses survey
> data and iw survey dump is invoked in parallel. Fix this by returning
> cumulative results, that don't depend on the last invocation. Other
> drivers, e.g. ath9k or mt76 also use this behavior.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> 

IIRC this was fixed a while ago by below patch. Somehow it never landed 
in ath.git.
Simple one line change is enough.

https://patchwork.kernel.org/patch/10550707/

-Rajkumar

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 23:46   ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-04 23:46 UTC (permalink / raw)
  To: Markus Theil; +Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k

On 2020-05-04 08:41, Markus Theil wrote:
> ath10k currently reports survey results for the last interval between 
> each
> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
> can lead to unexpectedly small results, e.g. when hostapd uses survey
> data and iw survey dump is invoked in parallel. Fix this by returning
> cumulative results, that don't depend on the last invocation. Other
> drivers, e.g. ath9k or mt76 also use this behavior.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
> 

IIRC this was fixed a while ago by below patch. Somehow it never landed 
in ath.git.
Simple one line change is enough.

https://patchwork.kernel.org/patch/10550707/

-Rajkumar

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-04 23:46   ` Rajkumar Manoharan
  (?)
@ 2020-05-04 23:49     ` Ben Greear
  -1 siblings, 0 replies; 54+ messages in thread
From: Ben Greear @ 2020-05-04 23:49 UTC (permalink / raw)
  To: Rajkumar Manoharan, Markus Theil
  Cc: linux-wireless, kvalo, ath10k, ath11k, linux-wireless-owner



On 05/04/2020 04:46 PM, Rajkumar Manoharan wrote:
> On 2020-05-04 08:41, Markus Theil wrote:
>> ath10k currently reports survey results for the last interval between each
>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>> data and iw survey dump is invoked in parallel. Fix this by returning
>> cumulative results, that don't depend on the last invocation. Other
>> drivers, e.g. ath9k or mt76 also use this behavior.
>>
>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>
>
> IIRC this was fixed a while ago by below patch. Somehow it never landed in ath.git.
> Simple one line change is enough.
>
> https://patchwork.kernel.org/patch/10550707/
>
> -Rajkumar

Have you tested this with wave-1?  Lots of older, at least, firmware has brokenness in this area.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 23:49     ` Ben Greear
  0 siblings, 0 replies; 54+ messages in thread
From: Ben Greear @ 2020-05-04 23:49 UTC (permalink / raw)
  To: Rajkumar Manoharan, Markus Theil
  Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k



On 05/04/2020 04:46 PM, Rajkumar Manoharan wrote:
> On 2020-05-04 08:41, Markus Theil wrote:
>> ath10k currently reports survey results for the last interval between each
>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>> data and iw survey dump is invoked in parallel. Fix this by returning
>> cumulative results, that don't depend on the last invocation. Other
>> drivers, e.g. ath9k or mt76 also use this behavior.
>>
>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>
>
> IIRC this was fixed a while ago by below patch. Somehow it never landed in ath.git.
> Simple one line change is enough.
>
> https://patchwork.kernel.org/patch/10550707/
>
> -Rajkumar

Have you tested this with wave-1?  Lots of older, at least, firmware has brokenness in this area.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 23:49     ` Ben Greear
  0 siblings, 0 replies; 54+ messages in thread
From: Ben Greear @ 2020-05-04 23:49 UTC (permalink / raw)
  To: Rajkumar Manoharan, Markus Theil
  Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k



On 05/04/2020 04:46 PM, Rajkumar Manoharan wrote:
> On 2020-05-04 08:41, Markus Theil wrote:
>> ath10k currently reports survey results for the last interval between each
>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>> data and iw survey dump is invoked in parallel. Fix this by returning
>> cumulative results, that don't depend on the last invocation. Other
>> drivers, e.g. ath9k or mt76 also use this behavior.
>>
>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>
>
> IIRC this was fixed a while ago by below patch. Somehow it never landed in ath.git.
> Simple one line change is enough.
>
> https://patchwork.kernel.org/patch/10550707/
>
> -Rajkumar

Have you tested this with wave-1?  Lots of older, at least, firmware has brokenness in this area.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-04 23:49     ` Ben Greear
  (?)
@ 2020-05-04 23:52       ` Rajkumar Manoharan
  -1 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-04 23:52 UTC (permalink / raw)
  To: Ben Greear
  Cc: Markus Theil, linux-wireless-owner, linux-wireless, ath10k,
	kvalo, ath11k

On 2020-05-04 16:49, Ben Greear wrote:
> On 05/04/2020 04:46 PM, Rajkumar Manoharan wrote:
>> On 2020-05-04 08:41, Markus Theil wrote:
>>> ath10k currently reports survey results for the last interval between 
>>> each
>>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, 
>>> this
>>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>>> data and iw survey dump is invoked in parallel. Fix this by returning
>>> cumulative results, that don't depend on the last invocation. Other
>>> drivers, e.g. ath9k or mt76 also use this behavior.
>>> 
>>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>> 
>> 
>> IIRC this was fixed a while ago by below patch. Somehow it never 
>> landed in ath.git.
>> Simple one line change is enough.
>> 
>> https://patchwork.kernel.org/patch/10550707/
>> 
>> -Rajkumar
> 
> Have you tested this with wave-1?  Lots of older, at least, firmware
> has brokenness in this area.
> 
Yes. It was tested in wave-1 as well. Venkat replied to your comment on 
original change.

-Rajkumar

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 23:52       ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-04 23:52 UTC (permalink / raw)
  To: Ben Greear
  Cc: linux-wireless-owner, linux-wireless, Markus Theil, ath10k,
	ath11k, kvalo

On 2020-05-04 16:49, Ben Greear wrote:
> On 05/04/2020 04:46 PM, Rajkumar Manoharan wrote:
>> On 2020-05-04 08:41, Markus Theil wrote:
>>> ath10k currently reports survey results for the last interval between 
>>> each
>>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, 
>>> this
>>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>>> data and iw survey dump is invoked in parallel. Fix this by returning
>>> cumulative results, that don't depend on the last invocation. Other
>>> drivers, e.g. ath9k or mt76 also use this behavior.
>>> 
>>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>> 
>> 
>> IIRC this was fixed a while ago by below patch. Somehow it never 
>> landed in ath.git.
>> Simple one line change is enough.
>> 
>> https://patchwork.kernel.org/patch/10550707/
>> 
>> -Rajkumar
> 
> Have you tested this with wave-1?  Lots of older, at least, firmware
> has brokenness in this area.
> 
Yes. It was tested in wave-1 as well. Venkat replied to your comment on 
original change.

-Rajkumar

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-04 23:52       ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-04 23:52 UTC (permalink / raw)
  To: Ben Greear
  Cc: linux-wireless-owner, linux-wireless, Markus Theil, ath10k,
	ath11k, kvalo

On 2020-05-04 16:49, Ben Greear wrote:
> On 05/04/2020 04:46 PM, Rajkumar Manoharan wrote:
>> On 2020-05-04 08:41, Markus Theil wrote:
>>> ath10k currently reports survey results for the last interval between 
>>> each
>>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, 
>>> this
>>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>>> data and iw survey dump is invoked in parallel. Fix this by returning
>>> cumulative results, that don't depend on the last invocation. Other
>>> drivers, e.g. ath9k or mt76 also use this behavior.
>>> 
>>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>> 
>> 
>> IIRC this was fixed a while ago by below patch. Somehow it never 
>> landed in ath.git.
>> Simple one line change is enough.
>> 
>> https://patchwork.kernel.org/patch/10550707/
>> 
>> -Rajkumar
> 
> Have you tested this with wave-1?  Lots of older, at least, firmware
> has brokenness in this area.
> 
Yes. It was tested in wave-1 as well. Venkat replied to your comment on 
original change.

-Rajkumar

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-04 23:52       ` Rajkumar Manoharan
  (?)
@ 2020-05-05  0:02         ` Ben Greear
  -1 siblings, 0 replies; 54+ messages in thread
From: Ben Greear @ 2020-05-05  0:02 UTC (permalink / raw)
  To: Rajkumar Manoharan
  Cc: linux-wireless-owner, linux-wireless, Markus Theil, ath10k,
	ath11k, kvalo



On 05/04/2020 04:52 PM, Rajkumar Manoharan wrote:
> On 2020-05-04 16:49, Ben Greear wrote:
>> On 05/04/2020 04:46 PM, Rajkumar Manoharan wrote:
>>> On 2020-05-04 08:41, Markus Theil wrote:
>>>> ath10k currently reports survey results for the last interval between each
>>>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>>>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>>>> data and iw survey dump is invoked in parallel. Fix this by returning
>>>> cumulative results, that don't depend on the last invocation. Other
>>>> drivers, e.g. ath9k or mt76 also use this behavior.
>>>>
>>>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>>>
>>>
>>> IIRC this was fixed a while ago by below patch. Somehow it never landed in ath.git.
>>> Simple one line change is enough.
>>>
>>> https://patchwork.kernel.org/patch/10550707/
>>>
>>> -Rajkumar
>>
>> Have you tested this with wave-1?  Lots of older, at least, firmware
>> has brokenness in this area.
>>
> Yes. It was tested in wave-1 as well. Venkat replied to your comment on original change.

Ahh, sorry I missed that.

Hopefully no one is using the broken firmware anymore then!

--Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05  0:02         ` Ben Greear
  0 siblings, 0 replies; 54+ messages in thread
From: Ben Greear @ 2020-05-05  0:02 UTC (permalink / raw)
  To: Rajkumar Manoharan
  Cc: linux-wireless-owner, linux-wireless, Markus Theil, ath10k,
	ath11k, kvalo



On 05/04/2020 04:52 PM, Rajkumar Manoharan wrote:
> On 2020-05-04 16:49, Ben Greear wrote:
>> On 05/04/2020 04:46 PM, Rajkumar Manoharan wrote:
>>> On 2020-05-04 08:41, Markus Theil wrote:
>>>> ath10k currently reports survey results for the last interval between each
>>>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>>>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>>>> data and iw survey dump is invoked in parallel. Fix this by returning
>>>> cumulative results, that don't depend on the last invocation. Other
>>>> drivers, e.g. ath9k or mt76 also use this behavior.
>>>>
>>>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>>>
>>>
>>> IIRC this was fixed a while ago by below patch. Somehow it never landed in ath.git.
>>> Simple one line change is enough.
>>>
>>> https://patchwork.kernel.org/patch/10550707/
>>>
>>> -Rajkumar
>>
>> Have you tested this with wave-1?  Lots of older, at least, firmware
>> has brokenness in this area.
>>
> Yes. It was tested in wave-1 as well. Venkat replied to your comment on original change.

Ahh, sorry I missed that.

Hopefully no one is using the broken firmware anymore then!

--Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05  0:02         ` Ben Greear
  0 siblings, 0 replies; 54+ messages in thread
From: Ben Greear @ 2020-05-05  0:02 UTC (permalink / raw)
  To: Rajkumar Manoharan
  Cc: linux-wireless-owner, linux-wireless, Markus Theil, ath10k,
	ath11k, kvalo



On 05/04/2020 04:52 PM, Rajkumar Manoharan wrote:
> On 2020-05-04 16:49, Ben Greear wrote:
>> On 05/04/2020 04:46 PM, Rajkumar Manoharan wrote:
>>> On 2020-05-04 08:41, Markus Theil wrote:
>>>> ath10k currently reports survey results for the last interval between each
>>>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>>>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>>>> data and iw survey dump is invoked in parallel. Fix this by returning
>>>> cumulative results, that don't depend on the last invocation. Other
>>>> drivers, e.g. ath9k or mt76 also use this behavior.
>>>>
>>>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>>>>
>>>
>>> IIRC this was fixed a while ago by below patch. Somehow it never landed in ath.git.
>>> Simple one line change is enough.
>>>
>>> https://patchwork.kernel.org/patch/10550707/
>>>
>>> -Rajkumar
>>
>> Have you tested this with wave-1?  Lots of older, at least, firmware
>> has brokenness in this area.
>>
> Yes. It was tested in wave-1 as well. Venkat replied to your comment on original change.

Ahh, sorry I missed that.

Hopefully no one is using the broken firmware anymore then!

--Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
  2020-05-04 23:37     ` Rajkumar Manoharan
  (?)
@ 2020-05-05  6:53       ` Markus Theil
  -1 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-05  6:53 UTC (permalink / raw)
  To: Rajkumar Manoharan
  Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k

Am 05.05.2020 um 01:37 schrieb Rajkumar Manoharan:
> On 2020-05-04 08:41, Markus Theil wrote:
>> ath11k currently reports survey results for the last interval between 
>> each
>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>> data and iw survey dump is invoked in parallel. Fix this by returning
>> cumulative results, that don't depend on the last invocation. Other
>> drivers, e.g. ath9k or mt76 also use this behavior.
>>
>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>> ---
>>  drivers/net/wireless/ath/ath11k/wmi.c | 20 ++++++++++----------
>>  1 file changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c
>> b/drivers/net/wireless/ath/ath11k/wmi.c
>> index c2a972377687..322ddfda5bfd 100644
>> --- a/drivers/net/wireless/ath/ath11k/wmi.c
>> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
>> @@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct
>> ath11k_base *ab, struct sk_buff *skb)
>>
>>      survey = &ar->survey[idx];
>>
>> -    survey->noise     = bss_ch_info_ev.noise_floor;
>> -    survey->time      = div_u64(total, cc_freq_hz);
>> -    survey->time_busy = div_u64(busy, cc_freq_hz);
>> -    survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
>> -    survey->time_tx   = div_u64(tx, cc_freq_hz);
>> -    survey->filled   |= (SURVEY_INFO_NOISE_DBM |
>> -                 SURVEY_INFO_TIME |
>> -                 SURVEY_INFO_TIME_BUSY |
>> -                 SURVEY_INFO_TIME_RX |
>> -                 SURVEY_INFO_TIME_TX);
>> +    survey->noise      = bss_ch_info_ev.noise_floor;
>> +    survey->time      += div_u64(total, cc_freq_hz);
>> +    survey->time_busy += div_u64(busy, cc_freq_hz);
>> +    survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
>> +    survey->time_tx   += div_u64(tx, cc_freq_hz);
>> +    survey->filled    |= (SURVEY_INFO_NOISE_DBM |
>> +                  SURVEY_INFO_TIME |
>> +                  SURVEY_INFO_TIME_BUSY |
>> +                  SURVEY_INFO_TIME_RX |
>> +                  SURVEY_INFO_TIME_TX);
>
> Markus,
>
> It depends on type of survey request is given to firmware. In ath11k, 
> firmware reports
> accumulated values. So the above addition is wrong and report double 
> value. Have you
> tested this change?
>
> -Rajkumar
Ok, so please drop both of my patches. My assumptions were incomplete 
and too humble. I just assumed, ath10k and ath11k both use incremental 
surveys.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-05  6:53       ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-05  6:53 UTC (permalink / raw)
  To: Rajkumar Manoharan
  Cc: linux-wireless-owner, linux-wireless, kvalo, ath10k, ath11k

Am 05.05.2020 um 01:37 schrieb Rajkumar Manoharan:
> On 2020-05-04 08:41, Markus Theil wrote:
>> ath11k currently reports survey results for the last interval between 
>> each
>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>> data and iw survey dump is invoked in parallel. Fix this by returning
>> cumulative results, that don't depend on the last invocation. Other
>> drivers, e.g. ath9k or mt76 also use this behavior.
>>
>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>> ---
>>  drivers/net/wireless/ath/ath11k/wmi.c | 20 ++++++++++----------
>>  1 file changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c
>> b/drivers/net/wireless/ath/ath11k/wmi.c
>> index c2a972377687..322ddfda5bfd 100644
>> --- a/drivers/net/wireless/ath/ath11k/wmi.c
>> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
>> @@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct
>> ath11k_base *ab, struct sk_buff *skb)
>>
>>      survey = &ar->survey[idx];
>>
>> -    survey->noise     = bss_ch_info_ev.noise_floor;
>> -    survey->time      = div_u64(total, cc_freq_hz);
>> -    survey->time_busy = div_u64(busy, cc_freq_hz);
>> -    survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
>> -    survey->time_tx   = div_u64(tx, cc_freq_hz);
>> -    survey->filled   |= (SURVEY_INFO_NOISE_DBM |
>> -                 SURVEY_INFO_TIME |
>> -                 SURVEY_INFO_TIME_BUSY |
>> -                 SURVEY_INFO_TIME_RX |
>> -                 SURVEY_INFO_TIME_TX);
>> +    survey->noise      = bss_ch_info_ev.noise_floor;
>> +    survey->time      += div_u64(total, cc_freq_hz);
>> +    survey->time_busy += div_u64(busy, cc_freq_hz);
>> +    survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
>> +    survey->time_tx   += div_u64(tx, cc_freq_hz);
>> +    survey->filled    |= (SURVEY_INFO_NOISE_DBM |
>> +                  SURVEY_INFO_TIME |
>> +                  SURVEY_INFO_TIME_BUSY |
>> +                  SURVEY_INFO_TIME_RX |
>> +                  SURVEY_INFO_TIME_TX);
>
> Markus,
>
> It depends on type of survey request is given to firmware. In ath11k, 
> firmware reports
> accumulated values. So the above addition is wrong and report double 
> value. Have you
> tested this change?
>
> -Rajkumar
Ok, so please drop both of my patches. My assumptions were incomplete 
and too humble. I just assumed, ath10k and ath11k both use incremental 
surveys.

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-05  6:53       ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-05  6:53 UTC (permalink / raw)
  To: Rajkumar Manoharan
  Cc: linux-wireless-owner, linux-wireless, kvalo, ath10k, ath11k

Am 05.05.2020 um 01:37 schrieb Rajkumar Manoharan:
> On 2020-05-04 08:41, Markus Theil wrote:
>> ath11k currently reports survey results for the last interval between 
>> each
>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, this
>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>> data and iw survey dump is invoked in parallel. Fix this by returning
>> cumulative results, that don't depend on the last invocation. Other
>> drivers, e.g. ath9k or mt76 also use this behavior.
>>
>> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
>> ---
>>  drivers/net/wireless/ath/ath11k/wmi.c | 20 ++++++++++----------
>>  1 file changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/wmi.c
>> b/drivers/net/wireless/ath/ath11k/wmi.c
>> index c2a972377687..322ddfda5bfd 100644
>> --- a/drivers/net/wireless/ath/ath11k/wmi.c
>> +++ b/drivers/net/wireless/ath/ath11k/wmi.c
>> @@ -5610,16 +5610,16 @@ ath11k_pdev_bss_chan_info_event(struct
>> ath11k_base *ab, struct sk_buff *skb)
>>
>>      survey = &ar->survey[idx];
>>
>> -    survey->noise     = bss_ch_info_ev.noise_floor;
>> -    survey->time      = div_u64(total, cc_freq_hz);
>> -    survey->time_busy = div_u64(busy, cc_freq_hz);
>> -    survey->time_rx   = div_u64(rx_bss, cc_freq_hz);
>> -    survey->time_tx   = div_u64(tx, cc_freq_hz);
>> -    survey->filled   |= (SURVEY_INFO_NOISE_DBM |
>> -                 SURVEY_INFO_TIME |
>> -                 SURVEY_INFO_TIME_BUSY |
>> -                 SURVEY_INFO_TIME_RX |
>> -                 SURVEY_INFO_TIME_TX);
>> +    survey->noise      = bss_ch_info_ev.noise_floor;
>> +    survey->time      += div_u64(total, cc_freq_hz);
>> +    survey->time_busy += div_u64(busy, cc_freq_hz);
>> +    survey->time_rx   += div_u64(rx_bss, cc_freq_hz);
>> +    survey->time_tx   += div_u64(tx, cc_freq_hz);
>> +    survey->filled    |= (SURVEY_INFO_NOISE_DBM |
>> +                  SURVEY_INFO_TIME |
>> +                  SURVEY_INFO_TIME_BUSY |
>> +                  SURVEY_INFO_TIME_RX |
>> +                  SURVEY_INFO_TIME_TX);
>
> Markus,
>
> It depends on type of survey request is given to firmware. In ath11k, 
> firmware reports
> accumulated values. So the above addition is wrong and report double 
> value. Have you
> tested this change?
>
> -Rajkumar
Ok, so please drop both of my patches. My assumptions were incomplete 
and too humble. I just assumed, ath10k and ath11k both use incremental 
surveys.

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-04 23:46   ` Rajkumar Manoharan
  (?)
@ 2020-05-05  7:01     ` Sven Eckelmann
  -1 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-05  7:01 UTC (permalink / raw)
  To: ath11k
  Cc: Rajkumar Manoharan, Markus Theil, linux-wireless-owner,
	linux-wireless, ath10k, kvalo

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
[...]
> IIRC this was fixed a while ago by below patch. Somehow it never landed 
> in ath.git.
> Simple one line change is enough.
> 
> https://patchwork.kernel.org/patch/10550707/

Because it doesn't work for everything. Remember that 10.2.4.x overflows all 
the time (14-30s) because it used only 31 bit for the counters.

But feel free to point me to the firmware version which fixed this.

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05  7:01     ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-05  7:01 UTC (permalink / raw)
  To: ath11k
  Cc: Rajkumar Manoharan, linux-wireless-owner, linux-wireless,
	Markus Theil, ath10k, kvalo


[-- Attachment #1.1: Type: text/plain, Size: 476 bytes --]

On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
[...]
> IIRC this was fixed a while ago by below patch. Somehow it never landed 
> in ath.git.
> Simple one line change is enough.
> 
> https://patchwork.kernel.org/patch/10550707/

Because it doesn't work for everything. Remember that 10.2.4.x overflows all 
the time (14-30s) because it used only 31 bit for the counters.

But feel free to point me to the firmware version which fixed this.

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05  7:01     ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-05  7:01 UTC (permalink / raw)
  To: ath11k
  Cc: Rajkumar Manoharan, linux-wireless-owner, linux-wireless,
	Markus Theil, ath10k, kvalo


[-- Attachment #1.1: Type: text/plain, Size: 476 bytes --]

On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
[...]
> IIRC this was fixed a while ago by below patch. Somehow it never landed 
> in ath.git.
> Simple one line change is enough.
> 
> https://patchwork.kernel.org/patch/10550707/

Because it doesn't work for everything. Remember that 10.2.4.x overflows all 
the time (14-30s) because it used only 31 bit for the counters.

But feel free to point me to the firmware version which fixed this.

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-05  7:01     ` Sven Eckelmann
  (?)
@ 2020-05-05  7:49       ` Sven Eckelmann
  -1 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-05  7:49 UTC (permalink / raw)
  To: ath11k
  Cc: Rajkumar Manoharan, linux-wireless-owner, linux-wireless,
	Markus Theil, ath10k, kvalo

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

On Tuesday, 5 May 2020 09:01:34 CEST Sven Eckelmann wrote:
> On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
> [...]
> > IIRC this was fixed a while ago by below patch. Somehow it never landed 
> > in ath.git.
> > Simple one line change is enough.
> > 
> > https://patchwork.kernel.org/patch/10550707/
> 
> Because it doesn't work for everything. Remember that 10.2.4.x overflows all 
> the time (14-30s) because it used only 31 bit for the counters.
> 
> But feel free to point me to the firmware version which fixed this.

See also https://patchwork.kernel.org/patch/9701459/

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05  7:49       ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-05  7:49 UTC (permalink / raw)
  To: ath11k
  Cc: Rajkumar Manoharan, linux-wireless-owner, linux-wireless,
	Markus Theil, ath10k, kvalo


[-- Attachment #1.1: Type: text/plain, Size: 613 bytes --]

On Tuesday, 5 May 2020 09:01:34 CEST Sven Eckelmann wrote:
> On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
> [...]
> > IIRC this was fixed a while ago by below patch. Somehow it never landed 
> > in ath.git.
> > Simple one line change is enough.
> > 
> > https://patchwork.kernel.org/patch/10550707/
> 
> Because it doesn't work for everything. Remember that 10.2.4.x overflows all 
> the time (14-30s) because it used only 31 bit for the counters.
> 
> But feel free to point me to the firmware version which fixed this.

See also https://patchwork.kernel.org/patch/9701459/

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05  7:49       ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-05  7:49 UTC (permalink / raw)
  To: ath11k
  Cc: Rajkumar Manoharan, linux-wireless-owner, linux-wireless,
	Markus Theil, ath10k, kvalo


[-- Attachment #1.1: Type: text/plain, Size: 613 bytes --]

On Tuesday, 5 May 2020 09:01:34 CEST Sven Eckelmann wrote:
> On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
> [...]
> > IIRC this was fixed a while ago by below patch. Somehow it never landed 
> > in ath.git.
> > Simple one line change is enough.
> > 
> > https://patchwork.kernel.org/patch/10550707/
> 
> Because it doesn't work for everything. Remember that 10.2.4.x overflows all 
> the time (14-30s) because it used only 31 bit for the counters.
> 
> But feel free to point me to the firmware version which fixed this.

See also https://patchwork.kernel.org/patch/9701459/

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-05  7:49       ` Sven Eckelmann
  (?)
@ 2020-05-05  7:55         ` Sven Eckelmann
  -1 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-05  7:55 UTC (permalink / raw)
  To: ath11k
  Cc: Rajkumar Manoharan, linux-wireless-owner, linux-wireless,
	Markus Theil, ath10k, kvalo

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

On Tuesday, 5 May 2020 09:49:46 CEST Sven Eckelmann wrote:
[...]
> See also https://patchwork.kernel.org/patch/9701459/

And I completely forgot about this one: https://patchwork.kernel.org/patch/10417673/

Kind regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05  7:55         ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-05  7:55 UTC (permalink / raw)
  To: ath11k
  Cc: Rajkumar Manoharan, linux-wireless-owner, linux-wireless,
	Markus Theil, ath10k, kvalo


[-- Attachment #1.1: Type: text/plain, Size: 226 bytes --]

On Tuesday, 5 May 2020 09:49:46 CEST Sven Eckelmann wrote:
[...]
> See also https://patchwork.kernel.org/patch/9701459/

And I completely forgot about this one: https://patchwork.kernel.org/patch/10417673/

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05  7:55         ` Sven Eckelmann
  0 siblings, 0 replies; 54+ messages in thread
From: Sven Eckelmann @ 2020-05-05  7:55 UTC (permalink / raw)
  To: ath11k
  Cc: Rajkumar Manoharan, linux-wireless-owner, linux-wireless,
	Markus Theil, ath10k, kvalo


[-- Attachment #1.1: Type: text/plain, Size: 226 bytes --]

On Tuesday, 5 May 2020 09:49:46 CEST Sven Eckelmann wrote:
[...]
> See also https://patchwork.kernel.org/patch/9701459/

And I completely forgot about this one: https://patchwork.kernel.org/patch/10417673/

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-05  7:49       ` Sven Eckelmann
  (?)
@ 2020-05-05 15:37         ` Markus Theil
  -1 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-05 15:37 UTC (permalink / raw)
  To: Sven Eckelmann, ath11k
  Cc: Rajkumar Manoharan, linux-wireless-owner, linux-wireless, ath10k, kvalo

On 5/5/20 9:49 AM, Sven Eckelmann wrote:
> On Tuesday, 5 May 2020 09:01:34 CEST Sven Eckelmann wrote:
>> On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
>> [...]
>>> IIRC this was fixed a while ago by below patch. Somehow it never landed 
>>> in ath.git.
>>> Simple one line change is enough.
>>>
>>> https://patchwork.kernel.org/patch/10550707/
>> Because it doesn't work for everything. Remember that 10.2.4.x overflows all 
>> the time (14-30s) because it used only 31 bit for the counters.
>>
>> But feel free to point me to the firmware version which fixed this.
> See also https://patchwork.kernel.org/patch/9701459/
>
> Kind regards,
> 	Sven

This patch already fixes the problem for me. I tested it on QCA988X hw
with firmware 10.2.4.

[   10.350919] ath10k_pci 0000:04:00.0: qca988x hw2.0 target 0x4100016c
chip_id 0x043222ff sub 0000:0000
[   10.350930] ath10k_pci 0000:04:00.0: kconfig debug 1 debugfs 1
tracing 1 dfs 0 testmode 0
[   10.351803] ath10k_pci 0000:04:00.0: firmware ver 10.2.4-1.0-00047
api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
[   10.385617] ath10k_pci 0000:04:00.0: board_file api 1 bmi_id N/A
crc32 bebc7c08
[   11.536818] ath10k_pci 0000:04:00.0: htt-ver 2.1 wmi-op 5 htt-op 2
cal otp max-sta 128 raw 0 hwcrypto 1

I also did not see the 31 bit overflow after a small amount of seconds.

Survey data from wlp4s0
    frequency:            2412 MHz [in use]
    noise:                -65 dBm
    channel active time:        5370225 ms
    channel busy time:        924199 ms
    channel receive time:        140 ms
    channel transmit time:        0 ms

Kind regards,
Markus


^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05 15:37         ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-05 15:37 UTC (permalink / raw)
  To: Sven Eckelmann, ath11k
  Cc: linux-wireless-owner, linux-wireless, ath10k, Rajkumar Manoharan, kvalo

On 5/5/20 9:49 AM, Sven Eckelmann wrote:
> On Tuesday, 5 May 2020 09:01:34 CEST Sven Eckelmann wrote:
>> On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
>> [...]
>>> IIRC this was fixed a while ago by below patch. Somehow it never landed 
>>> in ath.git.
>>> Simple one line change is enough.
>>>
>>> https://patchwork.kernel.org/patch/10550707/
>> Because it doesn't work for everything. Remember that 10.2.4.x overflows all 
>> the time (14-30s) because it used only 31 bit for the counters.
>>
>> But feel free to point me to the firmware version which fixed this.
> See also https://patchwork.kernel.org/patch/9701459/
>
> Kind regards,
> 	Sven

This patch already fixes the problem for me. I tested it on QCA988X hw
with firmware 10.2.4.

[   10.350919] ath10k_pci 0000:04:00.0: qca988x hw2.0 target 0x4100016c
chip_id 0x043222ff sub 0000:0000
[   10.350930] ath10k_pci 0000:04:00.0: kconfig debug 1 debugfs 1
tracing 1 dfs 0 testmode 0
[   10.351803] ath10k_pci 0000:04:00.0: firmware ver 10.2.4-1.0-00047
api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
[   10.385617] ath10k_pci 0000:04:00.0: board_file api 1 bmi_id N/A
crc32 bebc7c08
[   11.536818] ath10k_pci 0000:04:00.0: htt-ver 2.1 wmi-op 5 htt-op 2
cal otp max-sta 128 raw 0 hwcrypto 1

I also did not see the 31 bit overflow after a small amount of seconds.

Survey data from wlp4s0
    frequency:            2412 MHz [in use]
    noise:                -65 dBm
    channel active time:        5370225 ms
    channel busy time:        924199 ms
    channel receive time:        140 ms
    channel transmit time:        0 ms

Kind regards,
Markus


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05 15:37         ` Markus Theil
  0 siblings, 0 replies; 54+ messages in thread
From: Markus Theil @ 2020-05-05 15:37 UTC (permalink / raw)
  To: Sven Eckelmann, ath11k
  Cc: linux-wireless-owner, linux-wireless, ath10k, Rajkumar Manoharan, kvalo

On 5/5/20 9:49 AM, Sven Eckelmann wrote:
> On Tuesday, 5 May 2020 09:01:34 CEST Sven Eckelmann wrote:
>> On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
>> [...]
>>> IIRC this was fixed a while ago by below patch. Somehow it never landed 
>>> in ath.git.
>>> Simple one line change is enough.
>>>
>>> https://patchwork.kernel.org/patch/10550707/
>> Because it doesn't work for everything. Remember that 10.2.4.x overflows all 
>> the time (14-30s) because it used only 31 bit for the counters.
>>
>> But feel free to point me to the firmware version which fixed this.
> See also https://patchwork.kernel.org/patch/9701459/
>
> Kind regards,
> 	Sven

This patch already fixes the problem for me. I tested it on QCA988X hw
with firmware 10.2.4.

[   10.350919] ath10k_pci 0000:04:00.0: qca988x hw2.0 target 0x4100016c
chip_id 0x043222ff sub 0000:0000
[   10.350930] ath10k_pci 0000:04:00.0: kconfig debug 1 debugfs 1
tracing 1 dfs 0 testmode 0
[   10.351803] ath10k_pci 0000:04:00.0: firmware ver 10.2.4-1.0-00047
api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
[   10.385617] ath10k_pci 0000:04:00.0: board_file api 1 bmi_id N/A
crc32 bebc7c08
[   11.536818] ath10k_pci 0000:04:00.0: htt-ver 2.1 wmi-op 5 htt-op 2
cal otp max-sta 128 raw 0 hwcrypto 1

I also did not see the 31 bit overflow after a small amount of seconds.

Survey data from wlp4s0
    frequency:            2412 MHz [in use]
    noise:                -65 dBm
    channel active time:        5370225 ms
    channel busy time:        924199 ms
    channel receive time:        140 ms
    channel transmit time:        0 ms

Kind regards,
Markus


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
  2020-05-05  6:53       ` Markus Theil
  (?)
@ 2020-05-05 17:31         ` Rajkumar Manoharan
  -1 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-05 17:31 UTC (permalink / raw)
  To: Markus Theil; +Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k

On 2020-05-04 23:53, Markus Theil wrote:
> Am 05.05.2020 um 01:37 schrieb Rajkumar Manoharan:
>> On 2020-05-04 08:41, Markus Theil wrote:
>>> ath11k currently reports survey results for the last interval between 
>>> each
>>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, 
>>> this
>>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>>> data and iw survey dump is invoked in parallel. Fix this by returning
>>> cumulative results, that don't depend on the last invocation. Other
>>> drivers, e.g. ath9k or mt76 also use this behavior.
>>> 
[...]
>> Markus,
>> 
>> It depends on type of survey request is given to firmware. In ath11k, 
>> firmware reports
>> accumulated values. So the above addition is wrong and report double 
>> value. Have you
>> tested this change?
>> 
>> -Rajkumar
> Ok, so please drop both of my patches. My assumptions were incomplete
> and too humble. I just assumed, ath10k and ath11k both use incremental
> surveys.
> 
Markus,

The ath10k driver still counts survey stats incrementally. But it should 
be handled by sending
appropriate survey request_type to firmware.

-Rajkumar

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-05 17:31         ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-05 17:31 UTC (permalink / raw)
  To: Markus Theil; +Cc: linux-wireless-owner, linux-wireless, kvalo, ath10k, ath11k

On 2020-05-04 23:53, Markus Theil wrote:
> Am 05.05.2020 um 01:37 schrieb Rajkumar Manoharan:
>> On 2020-05-04 08:41, Markus Theil wrote:
>>> ath11k currently reports survey results for the last interval between 
>>> each
>>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, 
>>> this
>>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>>> data and iw survey dump is invoked in parallel. Fix this by returning
>>> cumulative results, that don't depend on the last invocation. Other
>>> drivers, e.g. ath9k or mt76 also use this behavior.
>>> 
[...]
>> Markus,
>> 
>> It depends on type of survey request is given to firmware. In ath11k, 
>> firmware reports
>> accumulated values. So the above addition is wrong and report double 
>> value. Have you
>> tested this change?
>> 
>> -Rajkumar
> Ok, so please drop both of my patches. My assumptions were incomplete
> and too humble. I just assumed, ath10k and ath11k both use incremental
> surveys.
> 
Markus,

The ath10k driver still counts survey stats incrementally. But it should 
be handled by sending
appropriate survey request_type to firmware.

-Rajkumar

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 2/2] ath11k: use cumulative survey statistics
@ 2020-05-05 17:31         ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-05 17:31 UTC (permalink / raw)
  To: Markus Theil; +Cc: linux-wireless-owner, linux-wireless, kvalo, ath10k, ath11k

On 2020-05-04 23:53, Markus Theil wrote:
> Am 05.05.2020 um 01:37 schrieb Rajkumar Manoharan:
>> On 2020-05-04 08:41, Markus Theil wrote:
>>> ath11k currently reports survey results for the last interval between 
>>> each
>>> invocation of NL80211_CMD_GET_SURVEY. For concurrent invocations, 
>>> this
>>> can lead to unexpectedly small results, e.g. when hostapd uses survey
>>> data and iw survey dump is invoked in parallel. Fix this by returning
>>> cumulative results, that don't depend on the last invocation. Other
>>> drivers, e.g. ath9k or mt76 also use this behavior.
>>> 
[...]
>> Markus,
>> 
>> It depends on type of survey request is given to firmware. In ath11k, 
>> firmware reports
>> accumulated values. So the above addition is wrong and report double 
>> value. Have you
>> tested this change?
>> 
>> -Rajkumar
> Ok, so please drop both of my patches. My assumptions were incomplete
> and too humble. I just assumed, ath10k and ath11k both use incremental
> surveys.
> 
Markus,

The ath10k driver still counts survey stats incrementally. But it should 
be handled by sending
appropriate survey request_type to firmware.

-Rajkumar

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-05 15:37         ` Markus Theil
  (?)
@ 2020-05-05 18:32           ` Rajkumar Manoharan
  -1 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-05 18:32 UTC (permalink / raw)
  To: Markus Theil
  Cc: Sven Eckelmann, ath11k, linux-wireless-owner, linux-wireless,
	ath10k, kvalo

On 2020-05-05 08:37, Markus Theil wrote:
> On 5/5/20 9:49 AM, Sven Eckelmann wrote:
>> On Tuesday, 5 May 2020 09:01:34 CEST Sven Eckelmann wrote:
>>> On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
>>> [...]
>>>> IIRC this was fixed a while ago by below patch. Somehow it never 
>>>> landed
>>>> in ath.git.
>>>> Simple one line change is enough.
>>>> 
>>>> https://patchwork.kernel.org/patch/10550707/
>>> Because it doesn't work for everything. Remember that 10.2.4.x 
>>> overflows all
>>> the time (14-30s) because it used only 31 bit for the counters.
>>> 
>>> But feel free to point me to the firmware version which fixed this.
>> See also https://patchwork.kernel.org/patch/9701459/
>> 
>> Kind regards,
>> 	Sven
> 
> This patch already fixes the problem for me. I tested it on QCA988X hw
> with firmware 10.2.4.
> 
> [   10.350919] ath10k_pci 0000:04:00.0: qca988x hw2.0 target 0x4100016c
> chip_id 0x043222ff sub 0000:0000
> [   10.350930] ath10k_pci 0000:04:00.0: kconfig debug 1 debugfs 1
> tracing 1 dfs 0 testmode 0
> [   10.351803] ath10k_pci 0000:04:00.0: firmware ver 10.2.4-1.0-00047
> api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
> [   10.385617] ath10k_pci 0000:04:00.0: board_file api 1 bmi_id N/A
> crc32 bebc7c08
> [   11.536818] ath10k_pci 0000:04:00.0: htt-ver 2.1 wmi-op 5 htt-op 2
> cal otp max-sta 128 raw 0 hwcrypto 1
> 
> I also did not see the 31 bit overflow after a small amount of seconds.
> 
> Survey data from wlp4s0
>     frequency:            2412 MHz [in use]
>     noise:                -65 dBm
>     channel active time:        5370225 ms
>     channel busy time:        924199 ms
>     channel receive time:        140 ms
>     channel transmit time:        0 ms
> 
Great. Thanks for validating the patch. Venkat will post the patch on 
ToT.

-Rajkumar

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05 18:32           ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-05 18:32 UTC (permalink / raw)
  To: Markus Theil
  Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k,
	Sven Eckelmann

On 2020-05-05 08:37, Markus Theil wrote:
> On 5/5/20 9:49 AM, Sven Eckelmann wrote:
>> On Tuesday, 5 May 2020 09:01:34 CEST Sven Eckelmann wrote:
>>> On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
>>> [...]
>>>> IIRC this was fixed a while ago by below patch. Somehow it never 
>>>> landed
>>>> in ath.git.
>>>> Simple one line change is enough.
>>>> 
>>>> https://patchwork.kernel.org/patch/10550707/
>>> Because it doesn't work for everything. Remember that 10.2.4.x 
>>> overflows all
>>> the time (14-30s) because it used only 31 bit for the counters.
>>> 
>>> But feel free to point me to the firmware version which fixed this.
>> See also https://patchwork.kernel.org/patch/9701459/
>> 
>> Kind regards,
>> 	Sven
> 
> This patch already fixes the problem for me. I tested it on QCA988X hw
> with firmware 10.2.4.
> 
> [   10.350919] ath10k_pci 0000:04:00.0: qca988x hw2.0 target 0x4100016c
> chip_id 0x043222ff sub 0000:0000
> [   10.350930] ath10k_pci 0000:04:00.0: kconfig debug 1 debugfs 1
> tracing 1 dfs 0 testmode 0
> [   10.351803] ath10k_pci 0000:04:00.0: firmware ver 10.2.4-1.0-00047
> api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
> [   10.385617] ath10k_pci 0000:04:00.0: board_file api 1 bmi_id N/A
> crc32 bebc7c08
> [   11.536818] ath10k_pci 0000:04:00.0: htt-ver 2.1 wmi-op 5 htt-op 2
> cal otp max-sta 128 raw 0 hwcrypto 1
> 
> I also did not see the 31 bit overflow after a small amount of seconds.
> 
> Survey data from wlp4s0
>     frequency:            2412 MHz [in use]
>     noise:                -65 dBm
>     channel active time:        5370225 ms
>     channel busy time:        924199 ms
>     channel receive time:        140 ms
>     channel transmit time:        0 ms
> 
Great. Thanks for validating the patch. Venkat will post the patch on 
ToT.

-Rajkumar

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05 18:32           ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-05 18:32 UTC (permalink / raw)
  To: Markus Theil
  Cc: linux-wireless-owner, linux-wireless, ath10k, kvalo, ath11k,
	Sven Eckelmann

On 2020-05-05 08:37, Markus Theil wrote:
> On 5/5/20 9:49 AM, Sven Eckelmann wrote:
>> On Tuesday, 5 May 2020 09:01:34 CEST Sven Eckelmann wrote:
>>> On Tuesday, 5 May 2020 01:46:12 CEST Rajkumar Manoharan wrote:
>>> [...]
>>>> IIRC this was fixed a while ago by below patch. Somehow it never 
>>>> landed
>>>> in ath.git.
>>>> Simple one line change is enough.
>>>> 
>>>> https://patchwork.kernel.org/patch/10550707/
>>> Because it doesn't work for everything. Remember that 10.2.4.x 
>>> overflows all
>>> the time (14-30s) because it used only 31 bit for the counters.
>>> 
>>> But feel free to point me to the firmware version which fixed this.
>> See also https://patchwork.kernel.org/patch/9701459/
>> 
>> Kind regards,
>> 	Sven
> 
> This patch already fixes the problem for me. I tested it on QCA988X hw
> with firmware 10.2.4.
> 
> [   10.350919] ath10k_pci 0000:04:00.0: qca988x hw2.0 target 0x4100016c
> chip_id 0x043222ff sub 0000:0000
> [   10.350930] ath10k_pci 0000:04:00.0: kconfig debug 1 debugfs 1
> tracing 1 dfs 0 testmode 0
> [   10.351803] ath10k_pci 0000:04:00.0: firmware ver 10.2.4-1.0-00047
> api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
> [   10.385617] ath10k_pci 0000:04:00.0: board_file api 1 bmi_id N/A
> crc32 bebc7c08
> [   11.536818] ath10k_pci 0000:04:00.0: htt-ver 2.1 wmi-op 5 htt-op 2
> cal otp max-sta 128 raw 0 hwcrypto 1
> 
> I also did not see the 31 bit overflow after a small amount of seconds.
> 
> Survey data from wlp4s0
>     frequency:            2412 MHz [in use]
>     noise:                -65 dBm
>     channel active time:        5370225 ms
>     channel busy time:        924199 ms
>     channel receive time:        140 ms
>     channel transmit time:        0 ms
> 
Great. Thanks for validating the patch. Venkat will post the patch on 
ToT.

-Rajkumar

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
  2020-05-05  7:55         ` Sven Eckelmann
  (?)
@ 2020-05-05 18:45           ` Rajkumar Manoharan
  -1 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-05 18:45 UTC (permalink / raw)
  To: Sven Eckelmann
  Cc: ath11k, linux-wireless-owner, linux-wireless, Markus Theil,
	ath10k, kvalo

On 2020-05-05 00:55, Sven Eckelmann wrote:
> On Tuesday, 5 May 2020 09:49:46 CEST Sven Eckelmann wrote:
> [...]
>> See also https://patchwork.kernel.org/patch/9701459/
> 
> And I completely forgot about this one:
> https://patchwork.kernel.org/patch/10417673/
> 
_Me_too_ :) Hope this change is not needed when all drivers report
accumulated values.

-Rajkumar

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05 18:45           ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-05 18:45 UTC (permalink / raw)
  To: Sven Eckelmann
  Cc: linux-wireless-owner, linux-wireless, Markus Theil, ath10k,
	ath11k, kvalo

On 2020-05-05 00:55, Sven Eckelmann wrote:
> On Tuesday, 5 May 2020 09:49:46 CEST Sven Eckelmann wrote:
> [...]
>> See also https://patchwork.kernel.org/patch/9701459/
> 
> And I completely forgot about this one:
> https://patchwork.kernel.org/patch/10417673/
> 
_Me_too_ :) Hope this change is not needed when all drivers report
accumulated values.

-Rajkumar

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [PATCH 1/2] ath10k: use cumulative survey statistics
@ 2020-05-05 18:45           ` Rajkumar Manoharan
  0 siblings, 0 replies; 54+ messages in thread
From: Rajkumar Manoharan @ 2020-05-05 18:45 UTC (permalink / raw)
  To: Sven Eckelmann
  Cc: linux-wireless-owner, linux-wireless, Markus Theil, ath10k,
	ath11k, kvalo

On 2020-05-05 00:55, Sven Eckelmann wrote:
> On Tuesday, 5 May 2020 09:49:46 CEST Sven Eckelmann wrote:
> [...]
>> See also https://patchwork.kernel.org/patch/9701459/
> 
> And I completely forgot about this one:
> https://patchwork.kernel.org/patch/10417673/
> 
_Me_too_ :) Hope this change is not needed when all drivers report
accumulated values.

-Rajkumar

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2020-05-05 18:45 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 15:41 [PATCH 1/2] ath10k: use cumulative survey statistics Markus Theil
2020-05-04 15:41 ` Markus Theil
2020-05-04 15:41 ` Markus Theil
2020-05-04 15:41 ` [PATCH 2/2] ath11k: " Markus Theil
2020-05-04 15:41   ` Markus Theil
2020-05-04 15:41   ` Markus Theil
2020-05-04 16:36   ` Sven Eckelmann
2020-05-04 16:36     ` Sven Eckelmann
2020-05-04 16:36     ` Sven Eckelmann
2020-05-04 23:37   ` Rajkumar Manoharan
2020-05-04 23:37     ` Rajkumar Manoharan
2020-05-04 23:37     ` Rajkumar Manoharan
2020-05-05  6:53     ` Markus Theil
2020-05-05  6:53       ` Markus Theil
2020-05-05  6:53       ` Markus Theil
2020-05-05 17:31       ` Rajkumar Manoharan
2020-05-05 17:31         ` Rajkumar Manoharan
2020-05-05 17:31         ` Rajkumar Manoharan
2020-05-04 16:29 ` [PATCH 1/2] ath10k: " Sven Eckelmann
2020-05-04 16:29   ` Sven Eckelmann
2020-05-04 16:29   ` Sven Eckelmann
2020-05-04 16:33   ` Markus Theil
2020-05-04 16:33     ` Markus Theil
2020-05-04 16:33     ` Markus Theil
2020-05-04 23:46 ` Rajkumar Manoharan
2020-05-04 23:46   ` Rajkumar Manoharan
2020-05-04 23:46   ` Rajkumar Manoharan
2020-05-04 23:49   ` Ben Greear
2020-05-04 23:49     ` Ben Greear
2020-05-04 23:49     ` Ben Greear
2020-05-04 23:52     ` Rajkumar Manoharan
2020-05-04 23:52       ` Rajkumar Manoharan
2020-05-04 23:52       ` Rajkumar Manoharan
2020-05-05  0:02       ` Ben Greear
2020-05-05  0:02         ` Ben Greear
2020-05-05  0:02         ` Ben Greear
2020-05-05  7:01   ` Sven Eckelmann
2020-05-05  7:01     ` Sven Eckelmann
2020-05-05  7:01     ` Sven Eckelmann
2020-05-05  7:49     ` Sven Eckelmann
2020-05-05  7:49       ` Sven Eckelmann
2020-05-05  7:49       ` Sven Eckelmann
2020-05-05  7:55       ` Sven Eckelmann
2020-05-05  7:55         ` Sven Eckelmann
2020-05-05  7:55         ` Sven Eckelmann
2020-05-05 18:45         ` Rajkumar Manoharan
2020-05-05 18:45           ` Rajkumar Manoharan
2020-05-05 18:45           ` Rajkumar Manoharan
2020-05-05 15:37       ` Markus Theil
2020-05-05 15:37         ` Markus Theil
2020-05-05 15:37         ` Markus Theil
2020-05-05 18:32         ` Rajkumar Manoharan
2020-05-05 18:32           ` Rajkumar Manoharan
2020-05-05 18:32           ` Rajkumar Manoharan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.