linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ath: add DFS FCC pattern detector
@ 2014-05-13 10:32 Janusz Dziedzic
  2014-05-13 10:32 ` [PATCH 2/2] ath: add JP DFS " Janusz Dziedzic
  2014-05-13 12:42 ` [PATCH 1/2] ath: add DFS FCC " Bartosz Markowski
  0 siblings, 2 replies; 3+ messages in thread
From: Janusz Dziedzic @ 2014-05-13 10:32 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, Janusz Dziedzic

Add initial values for DFS FCC pattern detector.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 drivers/net/wireless/ath/dfs_pattern_detector.c |   25 ++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c
index a1a69c5..6269f4e 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
@@ -73,9 +73,32 @@ static const struct radar_types etsi_radar_types_v15 = {
 	.radar_types		= etsi_radar_ref_types_v15,
 };
 
-/* for now, we support ETSI radar types, FCC and JP are TODO */
+#define FCC_PATTERN(ID, WMIN, WMAX, PMIN, PMAX, PRF, PPB)	\
+{								\
+	ID, WIDTH_LOWER(WMIN), WIDTH_UPPER(WMAX),		\
+	PMIN - PRI_TOLERANCE,					\
+	PMAX * PRF + PRI_TOLERANCE, PRF, PPB * PRF,		\
+	PPB_THRESH(PPB), PRI_TOLERANCE,				\
+}
+
+static const struct radar_detector_specs fcc_radar_ref_types[] = {
+	FCC_PATTERN(0, 0, 1, 1428, 1428, 1, 18),
+	FCC_PATTERN(1, 0, 5, 150, 230, 1, 23),
+	FCC_PATTERN(2, 6, 10, 200, 500, 1, 16),
+	FCC_PATTERN(3, 11, 20, 200, 500, 1, 12),
+	FCC_PATTERN(4, 50, 100, 1000, 2000, 20, 1),
+	FCC_PATTERN(5, 0, 1, 333, 333, 1, 9),
+};
+
+static const struct radar_types fcc_radar_types = {
+	.region			= NL80211_DFS_FCC,
+	.num_radar_types	= ARRAY_SIZE(fcc_radar_ref_types),
+	.radar_types		= fcc_radar_ref_types,
+};
+
 static const struct radar_types *dfs_domains[] = {
 	&etsi_radar_types_v15,
+	&fcc_radar_types,
 };
 
 /**
-- 
1.7.9.5


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

* [PATCH 2/2] ath: add JP DFS pattern detector
  2014-05-13 10:32 [PATCH 1/2] ath: add DFS FCC pattern detector Janusz Dziedzic
@ 2014-05-13 10:32 ` Janusz Dziedzic
  2014-05-13 12:42 ` [PATCH 1/2] ath: add DFS FCC " Bartosz Markowski
  1 sibling, 0 replies; 3+ messages in thread
From: Janusz Dziedzic @ 2014-05-13 10:32 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, Janusz Dziedzic

Add initial values for JP DFS pattern detector.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 drivers/net/wireless/ath/dfs_pattern_detector.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c
index 6269f4e..650be79 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
@@ -96,9 +96,29 @@ static const struct radar_types fcc_radar_types = {
 	.radar_types		= fcc_radar_ref_types,
 };
 
+#define JP_PATTERN FCC_PATTERN
+static const struct radar_detector_specs jp_radar_ref_types[] = {
+	JP_PATTERN(0, 0, 1, 1428, 1428, 1, 18),
+	JP_PATTERN(1, 2, 3, 3846, 3846, 1, 18),
+	JP_PATTERN(2, 0, 1, 1388, 1388, 1, 18),
+	JP_PATTERN(3, 1, 2, 4000, 4000, 1, 18),
+	JP_PATTERN(4, 0, 5, 150, 230, 1, 23),
+	JP_PATTERN(5, 6, 10, 200, 500, 1, 16),
+	JP_PATTERN(6, 11, 20, 200, 500, 1, 12),
+	JP_PATTERN(7, 50, 100, 1000, 2000, 20, 1),
+	JP_PATTERN(5, 0, 1, 333, 333, 1, 9),
+};
+
+static const struct radar_types jp_radar_types = {
+	.region			= NL80211_DFS_JP,
+	.num_radar_types	= ARRAY_SIZE(jp_radar_ref_types),
+	.radar_types		= jp_radar_ref_types,
+};
+
 static const struct radar_types *dfs_domains[] = {
 	&etsi_radar_types_v15,
 	&fcc_radar_types,
+	&jp_radar_types,
 };
 
 /**
-- 
1.7.9.5


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

* Re: [PATCH 1/2] ath: add DFS FCC pattern detector
  2014-05-13 10:32 [PATCH 1/2] ath: add DFS FCC pattern detector Janusz Dziedzic
  2014-05-13 10:32 ` [PATCH 2/2] ath: add JP DFS " Janusz Dziedzic
@ 2014-05-13 12:42 ` Bartosz Markowski
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Markowski @ 2014-05-13 12:42 UTC (permalink / raw)
  To: Janusz Dziedzic; +Cc: linux-wireless, linville

On 13 May 2014 12:32, Janusz Dziedzic <janusz.dziedzic@tieto.com> wrote:
> Add initial values for DFS FCC pattern detector.
>
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
> ---
>  drivers/net/wireless/ath/dfs_pattern_detector.c |   25 ++++++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)

Both (FCC and JP) tested fine with ath10k on DFS VeriWave setup, you may add:
Tested-by: Bartosz Markowski <bartosz.markowski@tieto.com>

-Bartosz

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

end of thread, other threads:[~2014-05-13 12:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13 10:32 [PATCH 1/2] ath: add DFS FCC pattern detector Janusz Dziedzic
2014-05-13 10:32 ` [PATCH 2/2] ath: add JP DFS " Janusz Dziedzic
2014-05-13 12:42 ` [PATCH 1/2] ath: add DFS FCC " Bartosz Markowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).