Deleted Added
full compact
dfs_null.c (231099) dfs_null.c (237526)
1/*-
2 * Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 *
1/*-
2 * Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27 * THE POSSIBILITY OF SUCH DAMAGES.
28 *
29 * $FreeBSD: head/sys/dev/ath/ath_dfs/null/dfs_null.c 231099 2012-02-06 20:23:21Z adrian $
29 * $FreeBSD: head/sys/dev/ath/ath_dfs/null/dfs_null.c 237526 2012-06-24 08:09:06Z adrian $
30 */
31#include <sys/cdefs.h>
30 */
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/ath/ath_dfs/null/dfs_null.c 231099 2012-02-06 20:23:21Z adrian $");
32__FBSDID("$FreeBSD: head/sys/dev/ath/ath_dfs/null/dfs_null.c 237526 2012-06-24 08:09:06Z adrian $");
33
34/*
35 * This implements an empty DFS module.
36 */
37#include "opt_inet.h"
38#include "opt_wlan.h"
39
40#include <sys/param.h>

--- 56 unchanged lines hidden (view full) ---

97 */
98
99/*
100 * Attach DFS to the given interface
101 */
102int
103ath_dfs_attach(struct ath_softc *sc)
104{
33
34/*
35 * This implements an empty DFS module.
36 */
37#include "opt_inet.h"
38#include "opt_wlan.h"
39
40#include <sys/param.h>

--- 56 unchanged lines hidden (view full) ---

97 */
98
99/*
100 * Attach DFS to the given interface
101 */
102int
103ath_dfs_attach(struct ath_softc *sc)
104{
105 return 1;
105 return (1);
106}
107
108/*
109 * Detach DFS from the given interface
110 */
111int
112ath_dfs_detach(struct ath_softc *sc)
113{
106}
107
108/*
109 * Detach DFS from the given interface
110 */
111int
112ath_dfs_detach(struct ath_softc *sc)
113{
114 return 1;
114 return (1);
115}
116
117/*
115}
116
117/*
118 * Enable radar check
118 * Enable radar check. Return 1 if the driver should
119 * enable radar PHY errors, or 0 if not.
119 */
120int
121ath_dfs_radar_enable(struct ath_softc *sc, struct ieee80211_channel *chan)
122{
123#if 0
124 HAL_PHYERR_PARAM pe;
125
126 /* Check if the current channel is radar-enabled */

--- 31 unchanged lines hidden (view full) ---

158 return (1);
159#else
160 return (0);
161#endif
162}
163
164/*
165 * Process DFS related PHY errors
120 */
121int
122ath_dfs_radar_enable(struct ath_softc *sc, struct ieee80211_channel *chan)
123{
124#if 0
125 HAL_PHYERR_PARAM pe;
126
127 /* Check if the current channel is radar-enabled */

--- 31 unchanged lines hidden (view full) ---

159 return (1);
160#else
161 return (0);
162#endif
163}
164
165/*
166 * Process DFS related PHY errors
167 *
168 * The mbuf is not "ours" and if we want a copy, we have
169 * to take a copy. It'll be freed after this function returns.
166 */
167void
170 */
171void
168ath_dfs_process_phy_err(struct ath_softc *sc, const char *buf,
172ath_dfs_process_phy_err(struct ath_softc *sc, struct mbuf *m,
169 uint64_t tsf, struct ath_rx_status *rxstat)
170{
171
172}
173
174/*
175 * Process the radar events and determine whether a DFS event has occured.
176 *
177 * This is designed to run outside of the RX processing path.
178 * The RX path will call ath_dfs_tasklet_needed() to see whether
179 * the task/callback running this routine needs to be called.
180 */
181int
182ath_dfs_process_radar_event(struct ath_softc *sc,
183 struct ieee80211_channel *chan)
184{
173 uint64_t tsf, struct ath_rx_status *rxstat)
174{
175
176}
177
178/*
179 * Process the radar events and determine whether a DFS event has occured.
180 *
181 * This is designed to run outside of the RX processing path.
182 * The RX path will call ath_dfs_tasklet_needed() to see whether
183 * the task/callback running this routine needs to be called.
184 */
185int
186ath_dfs_process_radar_event(struct ath_softc *sc,
187 struct ieee80211_channel *chan)
188{
185 return 0;
189 return (0);
186}
187
188/*
189 * Determine whether the DFS check task needs to be queued.
190 *
191 * This is called in the RX task when the current batch of packets
192 * have been received. It will return whether there are any radar
193 * events for ath_dfs_process_radar_event() to handle.
194 */
195int
196ath_dfs_tasklet_needed(struct ath_softc *sc, struct ieee80211_channel *chan)
197{
190}
191
192/*
193 * Determine whether the DFS check task needs to be queued.
194 *
195 * This is called in the RX task when the current batch of packets
196 * have been received. It will return whether there are any radar
197 * events for ath_dfs_process_radar_event() to handle.
198 */
199int
200ath_dfs_tasklet_needed(struct ath_softc *sc, struct ieee80211_channel *chan)
201{
198 return 0;
202 return (0);
199}
200
201/*
202 * Handle ioctl requests from the diagnostic interface.
203 *
204 * The initial part of this code resembles ath_ioctl_diag();
205 * it's likely a good idea to reduce duplication between
206 * these two routines.

--- 60 unchanged lines hidden (view full) ---

267 ad->ad_out_size = outsize;
268 if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_size))
269 error = EFAULT;
270bad:
271 if ((ad->ad_id & ATH_DIAG_IN) && indata != NULL)
272 free(indata, M_TEMP);
273 if ((ad->ad_id & ATH_DIAG_DYN) && outdata != NULL)
274 free(outdata, M_TEMP);
203}
204
205/*
206 * Handle ioctl requests from the diagnostic interface.
207 *
208 * The initial part of this code resembles ath_ioctl_diag();
209 * it's likely a good idea to reduce duplication between
210 * these two routines.

--- 60 unchanged lines hidden (view full) ---

271 ad->ad_out_size = outsize;
272 if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_size))
273 error = EFAULT;
274bad:
275 if ((ad->ad_id & ATH_DIAG_IN) && indata != NULL)
276 free(indata, M_TEMP);
277 if ((ad->ad_id & ATH_DIAG_DYN) && outdata != NULL)
278 free(outdata, M_TEMP);
275 return error;
279 return (error);
276}
277
278/*
279 * Get the current DFS thresholds from the HAL
280 */
281int
282ath_dfs_get_thresholds(struct ath_softc *sc, HAL_PHYERR_PARAM *param)
283{
284 ath_hal_getdfsthresh(sc->sc_ah, param);
280}
281
282/*
283 * Get the current DFS thresholds from the HAL
284 */
285int
286ath_dfs_get_thresholds(struct ath_softc *sc, HAL_PHYERR_PARAM *param)
287{
288 ath_hal_getdfsthresh(sc->sc_ah, param);
285 return 1;
289 return (1);
286}
290}