ath: add DFS FCC pattern detector
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Tue, 13 May 2014 10:32:05 +0000 (12:32 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 May 2014 18:26:53 +0000 (14:26 -0400)
Add initial values for DFS FCC pattern detector.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Tested-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/dfs_pattern_detector.c

index a1a69c5db409262e3f63a1f1246d6590e448cbfa..6269f4eedd3d5c98779a4a844bdde7b07f459968 100644 (file)
@@ -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,
 };
 
 /**