aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/dfs_pattern_detector.c
diff options
context:
space:
mode:
authorSriram R <srirrama@codeaurora.org>2018-05-15 05:09:48 -0400
committerKalle Valo <kvalo@codeaurora.org>2018-05-25 06:15:21 -0400
commitf40105e6747892e8edab94020567c158c9bec0df (patch)
treeff3c2eb3f2c869a8f102e8976ba85e861bc29be5 /drivers/net/wireless/ath/dfs_pattern_detector.c
parentffbc9197b4721634dc6c0fefa9b31e565fa89cee (diff)
ath: add support to get the detected radar specifications
This enables ath10k/ath9k drivers to collect the specifications of the radar type once it is detected by the dfs pattern detector unit. Usage of the collected info is specific to driver implementation. For example, collected radar info could be used by the host driver to send to co-processors for additional processing/validation. Note: 'radar_detector_specs' data containing the specifications of different radar types which was private within dfs_pattern_detector/ dfs_pri_detector is now shared with drivers as well for making use of this information. Signed-off-by: Sriram R <srirrama@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/dfs_pattern_detector.c')
-rw-r--r--drivers/net/wireless/ath/dfs_pattern_detector.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/dfs_pattern_detector.c b/drivers/net/wireless/ath/dfs_pattern_detector.c
index 448b83eea810..d52b31b45df7 100644
--- a/drivers/net/wireless/ath/dfs_pattern_detector.c
+++ b/drivers/net/wireless/ath/dfs_pattern_detector.c
@@ -268,7 +268,8 @@ static void dpd_exit(struct dfs_pattern_detector *dpd)
268} 268}
269 269
270static bool 270static bool
271dpd_add_pulse(struct dfs_pattern_detector *dpd, struct pulse_event *event) 271dpd_add_pulse(struct dfs_pattern_detector *dpd, struct pulse_event *event,
272 struct radar_detector_specs *rs)
272{ 273{
273 u32 i; 274 u32 i;
274 struct channel_detector *cd; 275 struct channel_detector *cd;
@@ -294,6 +295,8 @@ dpd_add_pulse(struct dfs_pattern_detector *dpd, struct pulse_event *event)
294 struct pri_detector *pd = cd->detectors[i]; 295 struct pri_detector *pd = cd->detectors[i];
295 struct pri_sequence *ps = pd->add_pulse(pd, event); 296 struct pri_sequence *ps = pd->add_pulse(pd, event);
296 if (ps != NULL) { 297 if (ps != NULL) {
298 if (rs != NULL)
299 memcpy(rs, pd->rs, sizeof(*rs));
297 ath_dbg(dpd->common, DFS, 300 ath_dbg(dpd->common, DFS,
298 "DFS: radar found on freq=%d: id=%d, pri=%d, " 301 "DFS: radar found on freq=%d: id=%d, pri=%d, "
299 "count=%d, count_false=%d\n", 302 "count=%d, count_false=%d\n",