ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: increase relay buffer size of spectral scan
@ 2015-05-04 18:21 Peter Oh
  2015-05-11 15:02 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Oh @ 2015-05-04 18:21 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless

Spectral scan supported by ath10k has capability to monitor and report
through whole bands and channels, but current buffer size is too small
to save reported spectral scan data.
This results in dropping 5G channel reports at all when dual band card
is used, so that users are not able to analyze spectral environments.
Hence increase the buffer size to fix the problem.

A spectral data size is vary based on the number of bins, so the unit
buffer size, 1140, is chose to minimize relay buffer fragmentation.

The total buffer size is also chose in tradeoff with spectral scan
support vs. kernel memory consumption.
Since theoretical maximum buffer size, 9.5MB, can be consumed with
512 bins in dual bands, we target to cover up to 128 bins for all
channels in dual bands and due to the buffer size limitation,
spectral scan with bin number bigger than 128 needs to be run on
single band each.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/spectral.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/spectral.c b/drivers/net/wireless/ath/ath10k/spectral.c
index d22addf..8dcd424 100644
--- a/drivers/net/wireless/ath/ath10k/spectral.c
+++ b/drivers/net/wireless/ath/ath10k/spectral.c
@@ -519,9 +519,12 @@ int ath10k_spectral_vif_stop(struct ath10k_vif *arvif)
 
 int ath10k_spectral_create(struct ath10k *ar)
 {
+	/* The buffer size covers whole channels in dual bands up to 128 bins.
+	 * Scan with bigger than 128 bins needs to be run on single band each.
+	 */
 	ar->spectral.rfs_chan_spec_scan = relay_open("spectral_scan",
 						     ar->debug.debugfs_phy,
-						     1024, 256,
+						     1140, 2500,
 						     &rfs_spec_scan_cb, NULL);
 	debugfs_create_file("spectral_scan_ctl",
 			    S_IRUSR | S_IWUSR,
-- 
1.9.1


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

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

* Re: [PATCH] ath10k: increase relay buffer size of spectral scan
  2015-05-04 18:21 [PATCH] ath10k: increase relay buffer size of spectral scan Peter Oh
@ 2015-05-11 15:02 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2015-05-11 15:02 UTC (permalink / raw)
  To: Peter Oh; +Cc: linux-wireless, ath10k

Peter Oh <poh@qca.qualcomm.com> writes:

> Spectral scan supported by ath10k has capability to monitor and report
> through whole bands and channels, but current buffer size is too small
> to save reported spectral scan data.
> This results in dropping 5G channel reports at all when dual band card
> is used, so that users are not able to analyze spectral environments.
> Hence increase the buffer size to fix the problem.
>
> A spectral data size is vary based on the number of bins, so the unit
> buffer size, 1140, is chose to minimize relay buffer fragmentation.
>
> The total buffer size is also chose in tradeoff with spectral scan
> support vs. kernel memory consumption.
> Since theoretical maximum buffer size, 9.5MB, can be consumed with
> 512 bins in dual bands, we target to cover up to 128 bins for all
> channels in dual bands and due to the buffer size limitation,
> spectral scan with bin number bigger than 128 needs to be run on
> single band each.
>
> Signed-off-by: Peter Oh <poh@qca.qualcomm.com>

Thanks, applied.

-- 
Kalle Valo

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

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

end of thread, other threads:[~2015-05-11 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-04 18:21 [PATCH] ath10k: increase relay buffer size of spectral scan Peter Oh
2015-05-11 15:02 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox