Thread (7 messages) 7 messages, 2 authors, 2021-09-28

Re: [PATCH 1/4] ath11k: Refactor spectral FFT bin size

From: Kalle Valo <hidden>
Date: 2021-09-24 14:35:28
Also in: ath11k

Jouni Malinen [off-list ref] writes:
quoted hunk ↗ jump to hunk
From: Karthikeyan Periyasamy <redacted>

In IPQ8074, actual FFT bin size is two bytes but hardware reports it
with extra pad size of two bytes for each FFT bin. So finally each FFT
bin advertise as four bytes size in the collected data. This FFT pad is
not advertised in IPQ6018 platform. To accommodate this different
behavior across the platforms, introduce the hw param fft_pad_sz and use
it in spectral process. Also group all the spectral params under the new
structure in hw param structure for scalable in future.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01492-QCAHKSWPL_SILICONZ-1
Tested-on: IPQ6018 hw1.0 AHB WLAN.HK.2.4.0.1-00330-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy <redacted>
Signed-off-by: Jouni Malinen <redacted>
---
 drivers/net/wireless/ath/ath11k/core.c     | 27 +++++++++++++++-------
 drivers/net/wireless/ath/ath11k/hw.h       |  6 ++++-
 drivers/net/wireless/ath/ath11k/spectral.c | 13 +++++------
 3 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 3179495cb3c9..2a81a544b6a9 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -59,8 +59,13 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.vdev_start_delay = false,
 		.htt_peer_map_v2 = true,
 		.tcl_0_only = false,
-		.spectral_fft_sz = 2,
-
+		.spectral = {
+			.fft_sz = 2,
+			/* HW bug, expected BIN size is 2 bytes but HW report as 4 bytes.
+			 * so added pad size as 2 bytes to compensate the BIN size
+			 */
+			.fft_pad_sz = 2,
+		},
 		.interface_modes = BIT(NL80211_IFTYPE_STATION) |
 					BIT(NL80211_IFTYPE_AP) |
 					BIT(NL80211_IFTYPE_MESH_POINT),
@@ -101,8 +106,10 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.vdev_start_delay = false,
 		.htt_peer_map_v2 = true,
 		.tcl_0_only = false,
-		.spectral_fft_sz = 4,
-
+		.spectral = {
+			.fft_sz = 4,
+			.fft_pad_sz = 0,
+		},
 		.interface_modes = BIT(NL80211_IFTYPE_STATION) |
 					BIT(NL80211_IFTYPE_AP) |
 					BIT(NL80211_IFTYPE_MESH_POINT),
@@ -143,8 +150,10 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.vdev_start_delay = true,
 		.htt_peer_map_v2 = false,
 		.tcl_0_only = true,
-		.spectral_fft_sz = 0,
-
+		.spectral = {
+			.fft_sz = 0,
+			.fft_pad_sz = 0,
+		},
 		.interface_modes = BIT(NL80211_IFTYPE_STATION) |
 					BIT(NL80211_IFTYPE_AP),
 		.supports_monitor = false,
@@ -223,8 +232,10 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
 		.vdev_start_delay = true,
 		.htt_peer_map_v2 = false,
 		.tcl_0_only = true,
-		.spectral_fft_sz = 0,
-
+		.spectral = {
+			.fft_sz = 0,
+			.fft_pad_sz = 0,
+		},
 		.interface_modes = BIT(NL80211_IFTYPE_STATION) |
 					BIT(NL80211_IFTYPE_AP),
 		.supports_monitor = false,
QCN9074 hw1.0 didn't have an entry. I suspect what happened was that
support for wcn6855 was added between writing the patch and me
committing wcn6855 patches, which confused git.

I changed it so that both qcn9074 and wcn6855 have this:

		.spectral = {
			.fft_sz = 0,
			.fft_pad_sz = 0,
		},

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help