Deleted Added
full compact
ah_osdep.c (178354) ah_osdep.c (184369)
1/*-
2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
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) 2002-2008 Sam Leffler, Errno Consulting
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/ah_osdep.c 178354 2008-04-20 20:35:46Z sam $
29 * $FreeBSD: head/sys/dev/ath/ah_osdep.c 184369 2008-10-27 18:30:33Z sam $
30 */
31#include "opt_ah.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/module.h>
37#include <sys/sysctl.h>

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

66extern const char* ath_hal_ether_sprintf(const u_int8_t *mac);
67extern void *ath_hal_malloc(size_t);
68extern void ath_hal_free(void *);
69#ifdef AH_ASSERT
70extern void ath_hal_assert_failed(const char* filename,
71 int lineno, const char* msg);
72#endif
73#ifdef AH_DEBUG
30 */
31#include "opt_ah.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/kernel.h>
36#include <sys/module.h>
37#include <sys/sysctl.h>

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

66extern const char* ath_hal_ether_sprintf(const u_int8_t *mac);
67extern void *ath_hal_malloc(size_t);
68extern void ath_hal_free(void *);
69#ifdef AH_ASSERT
70extern void ath_hal_assert_failed(const char* filename,
71 int lineno, const char* msg);
72#endif
73#ifdef AH_DEBUG
74#if HAL_ABI_VERSION >= 0x08090101
75extern void HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...);
76#else
74extern void HALDEBUG(struct ath_hal *ah, const char* fmt, ...);
75extern void HALDEBUGn(struct ath_hal *ah, u_int level, const char* fmt, ...);
77extern void HALDEBUG(struct ath_hal *ah, const char* fmt, ...);
78extern void HALDEBUGn(struct ath_hal *ah, u_int level, const char* fmt, ...);
79#endif
76#endif /* AH_DEBUG */
77
78/* NB: put this here instead of the driver to avoid circular references */
79SYSCTL_NODE(_hw, OID_AUTO, ath, CTLFLAG_RD, 0, "Atheros driver parameters");
80SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, "Atheros HAL parameters");
81
82#ifdef AH_DEBUG
83static int ath_hal_debug = 0;

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

134
135const char*
136ath_hal_ether_sprintf(const u_int8_t *mac)
137{
138 return ether_sprintf(mac);
139}
140
141#ifdef AH_DEBUG
80#endif /* AH_DEBUG */
81
82/* NB: put this here instead of the driver to avoid circular references */
83SYSCTL_NODE(_hw, OID_AUTO, ath, CTLFLAG_RD, 0, "Atheros driver parameters");
84SYSCTL_NODE(_hw_ath, OID_AUTO, hal, CTLFLAG_RD, 0, "Atheros HAL parameters");
85
86#ifdef AH_DEBUG
87static int ath_hal_debug = 0;

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

138
139const char*
140ath_hal_ether_sprintf(const u_int8_t *mac)
141{
142 return ether_sprintf(mac);
143}
144
145#ifdef AH_DEBUG
146#if HAL_ABI_VERSION >= 0x08090101
142void
147void
148HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...)
149{
150 if (ath_hal_debug & mask) {
151 __va_list ap;
152 va_start(ap, fmt);
153 ath_hal_vprintf(ah, fmt, ap);
154 va_end(ap);
155 }
156}
157#else
158void
143HALDEBUG(struct ath_hal *ah, const char* fmt, ...)
144{
145 if (ath_hal_debug) {
146 __va_list ap;
147 va_start(ap, fmt);
148 ath_hal_vprintf(ah, fmt, ap);
149 va_end(ap);
150 }

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

155{
156 if (ath_hal_debug >= level) {
157 __va_list ap;
158 va_start(ap, fmt);
159 ath_hal_vprintf(ah, fmt, ap);
160 va_end(ap);
161 }
162}
159HALDEBUG(struct ath_hal *ah, const char* fmt, ...)
160{
161 if (ath_hal_debug) {
162 __va_list ap;
163 va_start(ap, fmt);
164 ath_hal_vprintf(ah, fmt, ap);
165 va_end(ap);
166 }

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

171{
172 if (ath_hal_debug >= level) {
173 __va_list ap;
174 va_start(ap, fmt);
175 ath_hal_vprintf(ah, fmt, ap);
176 va_end(ap);
177 }
178}
179#endif
163#endif /* AH_DEBUG */
164
165#ifdef AH_DEBUG_ALQ
166/*
167 * ALQ register tracing support.
168 *
169 * Setting hw.ath.hal.alq=1 enables tracing of all register reads and
170 * writes to the file /tmp/ath_hal.log. The file format is a simple

--- 264 unchanged lines hidden ---
180#endif /* AH_DEBUG */
181
182#ifdef AH_DEBUG_ALQ
183/*
184 * ALQ register tracing support.
185 *
186 * Setting hw.ath.hal.alq=1 enables tracing of all register reads and
187 * writes to the file /tmp/ath_hal.log. The file format is a simple

--- 264 unchanged lines hidden ---