1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun * Copyright (c) 2008-2011 Atheros Communications Inc.
3*4882a593Smuzhiyun * Copyright (c) 2011 Neratec Solutions AG
4*4882a593Smuzhiyun *
5*4882a593Smuzhiyun * Permission to use, copy, modify, and/or distribute this software for any
6*4882a593Smuzhiyun * purpose with or without fee is hereby granted, provided that the above
7*4882a593Smuzhiyun * copyright notice and this permission notice appear in all copies.
8*4882a593Smuzhiyun *
9*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*4882a593Smuzhiyun * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*4882a593Smuzhiyun * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*4882a593Smuzhiyun * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*4882a593Smuzhiyun * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*4882a593Smuzhiyun * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*4882a593Smuzhiyun * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*4882a593Smuzhiyun */
17*4882a593Smuzhiyun
18*4882a593Smuzhiyun #ifndef ATH9K_DFS_H
19*4882a593Smuzhiyun #define ATH9K_DFS_H
20*4882a593Smuzhiyun #include "../dfs_pattern_detector.h"
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun #if defined(CONFIG_ATH9K_DFS_CERTIFIED)
23*4882a593Smuzhiyun /**
24*4882a593Smuzhiyun * ath9k_dfs_process_phyerr - process radar PHY error
25*4882a593Smuzhiyun * @sc: ath_softc
26*4882a593Smuzhiyun * @data: RX payload data
27*4882a593Smuzhiyun * @rs: RX status after processing descriptor
28*4882a593Smuzhiyun * @mactime: receive time
29*4882a593Smuzhiyun *
30*4882a593Smuzhiyun * This function is called whenever the HW DFS module detects a radar
31*4882a593Smuzhiyun * pulse and reports it as a PHY error.
32*4882a593Smuzhiyun *
33*4882a593Smuzhiyun * The radar information provided as raw payload data is validated and
34*4882a593Smuzhiyun * filtered for false pulses. Events passing all tests are forwarded to
35*4882a593Smuzhiyun * the DFS detector for pattern detection.
36*4882a593Smuzhiyun */
37*4882a593Smuzhiyun void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
38*4882a593Smuzhiyun struct ath_rx_status *rs, u64 mactime);
39*4882a593Smuzhiyun #else
40*4882a593Smuzhiyun static inline void
ath9k_dfs_process_phyerr(struct ath_softc * sc,void * data,struct ath_rx_status * rs,u64 mactime)41*4882a593Smuzhiyun ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
42*4882a593Smuzhiyun struct ath_rx_status *rs, u64 mactime) { }
43*4882a593Smuzhiyun #endif
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun #endif /* ATH9K_DFS_H */
46