diff options
author | adrian <adrian@FreeBSD.org> | 2013-01-02 01:36:10 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2013-01-02 01:36:10 +0000 |
commit | 5072c6621d0e7fdc1aa0de12f354cd18ac11e831 (patch) | |
tree | b37ac77bd0d4ce797b9fff5e89e74262e8ef3a60 | |
parent | def5e4786f920ea10ead292a6ae81d90a4834d1d (diff) | |
download | FreeBSD-src-5072c6621d0e7fdc1aa0de12f354cd18ac11e831.zip FreeBSD-src-5072c6621d0e7fdc1aa0de12f354cd18ac11e831.tar.gz |
Add a method to explicitly disable radar reporting if required.
-rw-r--r-- | sys/dev/ath/ath_dfs/null/dfs_null.c | 20 | ||||
-rw-r--r-- | sys/dev/ath/if_athdfs.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_dfs/null/dfs_null.c b/sys/dev/ath/ath_dfs/null/dfs_null.c index 11b3d8a..36b2042 100644 --- a/sys/dev/ath/ath_dfs/null/dfs_null.c +++ b/sys/dev/ath/ath_dfs/null/dfs_null.c @@ -146,6 +146,26 @@ ath_dfs_radar_enable(struct ath_softc *sc, struct ieee80211_channel *chan) } /* + * Explicity disable radar reporting. + * + * Return 0 if it was disabled, < 0 on error. + */ +int +ath_dfs_radar_disable(struct ath_softc *sc) +{ +#if 0 + HAL_PHYERR_PARAM pe; + + (void) ath_hal_getdfsthresh(sc->sc_ah, &pe); + pe.pe_enabled = 0; + (void) ath_hal_enabledfs(sc->sc_ah, &pe); + return (0); +#else + return (0); +#endif +} + +/* * Process DFS related PHY errors * * The mbuf is not "ours" and if we want a copy, we have diff --git a/sys/dev/ath/if_athdfs.h b/sys/dev/ath/if_athdfs.h index 3529671..cc4db15 100644 --- a/sys/dev/ath/if_athdfs.h +++ b/sys/dev/ath/if_athdfs.h @@ -35,6 +35,7 @@ extern int ath_dfs_attach(struct ath_softc *sc); extern int ath_dfs_detach(struct ath_softc *sc); extern int ath_dfs_radar_enable(struct ath_softc *, struct ieee80211_channel *chan); +extern int ath_dfs_radar_disable(struct ath_softc *sc); extern void ath_dfs_process_phy_err(struct ath_softc *sc, struct mbuf *m, uint64_t tsf, struct ath_rx_status *rxstat); extern int ath_dfs_process_radar_event(struct ath_softc *sc, |