162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * Copyright (c) 2008-2011 Atheros Communications Inc.
362306a36Sopenharmony_ci * Copyright (c) 2011 Neratec Solutions AG
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Permission to use, copy, modify, and/or distribute this software for any
662306a36Sopenharmony_ci * purpose with or without fee is hereby granted, provided that the above
762306a36Sopenharmony_ci * copyright notice and this permission notice appear in all copies.
862306a36Sopenharmony_ci *
962306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1062306a36Sopenharmony_ci * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1162306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1262306a36Sopenharmony_ci * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1362306a36Sopenharmony_ci * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1462306a36Sopenharmony_ci * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1562306a36Sopenharmony_ci * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1662306a36Sopenharmony_ci */
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci#ifndef ATH9K_DFS_H
1962306a36Sopenharmony_ci#define ATH9K_DFS_H
2062306a36Sopenharmony_ci#include "../dfs_pattern_detector.h"
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci#if defined(CONFIG_ATH9K_DFS_CERTIFIED)
2362306a36Sopenharmony_ci/**
2462306a36Sopenharmony_ci * ath9k_dfs_process_phyerr - process radar PHY error
2562306a36Sopenharmony_ci * @sc: ath_softc
2662306a36Sopenharmony_ci * @data: RX payload data
2762306a36Sopenharmony_ci * @rs: RX status after processing descriptor
2862306a36Sopenharmony_ci * @mactime: receive time
2962306a36Sopenharmony_ci *
3062306a36Sopenharmony_ci * This function is called whenever the HW DFS module detects a radar
3162306a36Sopenharmony_ci * pulse and reports it as a PHY error.
3262306a36Sopenharmony_ci *
3362306a36Sopenharmony_ci * The radar information provided as raw payload data is validated and
3462306a36Sopenharmony_ci * filtered for false pulses. Events passing all tests are forwarded to
3562306a36Sopenharmony_ci * the DFS detector for pattern detection.
3662306a36Sopenharmony_ci */
3762306a36Sopenharmony_civoid ath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
3862306a36Sopenharmony_ci			      struct ath_rx_status *rs, u64 mactime);
3962306a36Sopenharmony_ci#else
4062306a36Sopenharmony_cistatic inline void
4162306a36Sopenharmony_ciath9k_dfs_process_phyerr(struct ath_softc *sc, void *data,
4262306a36Sopenharmony_ci			 struct ath_rx_status *rs, u64 mactime) { }
4362306a36Sopenharmony_ci#endif
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci#endif /* ATH9K_DFS_H */
46