129942bc1SZefir Kurtisi /*
229942bc1SZefir Kurtisi * Copyright (c) 2008-2011 Atheros Communications Inc.
329942bc1SZefir Kurtisi * Copyright (c) 2011 Neratec Solutions AG
429942bc1SZefir Kurtisi *
529942bc1SZefir Kurtisi * Permission to use, copy, modify, and/or distribute this software for any
629942bc1SZefir Kurtisi * purpose with or without fee is hereby granted, provided that the above
729942bc1SZefir Kurtisi * copyright notice and this permission notice appear in all copies.
829942bc1SZefir Kurtisi *
929942bc1SZefir Kurtisi * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1029942bc1SZefir Kurtisi * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1129942bc1SZefir Kurtisi * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1229942bc1SZefir Kurtisi * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1329942bc1SZefir Kurtisi * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1429942bc1SZefir Kurtisi * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1529942bc1SZefir Kurtisi * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1629942bc1SZefir Kurtisi */
1729942bc1SZefir Kurtisi
1829942bc1SZefir Kurtisi #ifndef ATH9K_DFS_H
1929942bc1SZefir Kurtisi #define ATH9K_DFS_H
20*ad40d3daSJanusz Dziedzic #include "../dfs_pattern_detector.h"
2129942bc1SZefir Kurtisi
2229942bc1SZefir Kurtisi #if defined(CONFIG_ATH9K_DFS_CERTIFIED)
2329942bc1SZefir Kurtisi /**
2429942bc1SZefir Kurtisi * ath9k_dfs_process_phyerr - process radar PHY error
2529942bc1SZefir Kurtisi * @sc: ath_softc
2629942bc1SZefir Kurtisi * @data: RX payload data
2729942bc1SZefir Kurtisi * @rs: RX status after processing descriptor
2829942bc1SZefir Kurtisi * @mactime: receive time
2929942bc1SZefir Kurtisi *
3029942bc1SZefir Kurtisi * This function is called whenever the HW DFS module detects a radar
3129942bc1SZefir Kurtisi * pulse and reports it as a PHY error.
3229942bc1SZefir Kurtisi *
3329942bc1SZefir Kurtisi * The radar information provided as raw payload data is validated and
3429942bc1SZefir Kurtisi * filtered for false pulses. Events passing all tests are forwarded to
3556dc389fSZefir Kurtisi * the DFS detector for pattern detection.
3629942bc1SZefir Kurtisi */
3729942bc1SZefir Kurtisi void ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
3829942bc1SZefir Kurtisi struct ath_rx_status *rs, u64 mactime);
3929942bc1SZefir Kurtisi #else
4056dc389fSZefir Kurtisi static inline void
ath9k_dfs_process_phyerr(struct ath_softc * sc,void * data,struct ath_rx_status * rs,u64 mactime)4156dc389fSZefir Kurtisi ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
4229942bc1SZefir Kurtisi struct ath_rx_status *rs, u64 mactime) { }
4329942bc1SZefir Kurtisi #endif
4429942bc1SZefir Kurtisi
4529942bc1SZefir Kurtisi #endif /* ATH9K_DFS_H */
46