1 /* 2 * Copyright (c) 2020, The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 /** 18 * DOC: dfs_confirm_radar.h 19 * This file contains false radar detection specific dfs interfaces. 20 */ 21 22 #ifndef _DFS_CONFIRM_RADAR_H_ 23 #define _DFS_CONFIRM_RADAR_H_ 24 25 #include "dfs_internal.h" 26 27 #define DFS_INVALID_PRI_LIMIT 100 /* should we use 135? */ 28 /* The time interval between two sucessive pulses 29 * in case of w53 chirp type can be as low as 50us. 30 * Experimentally the PRI limit was found to be as 31 * low as 15us. 32 */ 33 #define DFS_INVALID_PRI_LIMIT_MKKN 15 34 #define FRAC_PRI_SCORE_ARRAY_SIZE 40 35 36 /** 37 * dfs_is_real_radar() - This function checks for fractional PRI and jitter in 38 * sidx index to determine if the radar is real or not. 39 * @dfs: Pointer to dfs structure. 40 * @rf: Pointer to dfs_filter structure. 41 * @ext_chan_flag: ext chan flags. 42 * 43 * Return : true if real RADAR else false. 44 */ 45 #ifdef CONFIG_EXT_RADAR_PROCESS 46 bool dfs_is_real_radar(struct wlan_dfs *dfs, 47 struct dfs_filter *rf, 48 int ext_chan_flag); 49 #endif /* CONFIG_EXT_RADAR_PROCESS */ 50 51 /** 52 * dfs_get_ext_filter() - This function gets the external radar filter table. 53 * @domain: The dfs domain for which the external radar table is needed. 54 * @num_radars: Output agrument. Stores the numbers of filters in the filter. 55 * table. 56 * 57 * Return: Pointer to the radar table. 58 */ 59 #ifdef CONFIG_EXT_RADAR_PROCESS 60 struct dfs_pulse *dfs_get_ext_filter(enum DFS_DOMAIN domain, 61 uint8_t *num_radars); 62 #else 63 static inline struct dfs_pulse *dfs_get_ext_filter(enum DFS_DOMAIN domain, 64 uint8_t *num_radars) 65 { 66 return NULL; 67 } 68 #endif /* CONFIG_EXT_RADAR_PROCESS */ 69 #endif 70