Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ath/if_ath_debug.h
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
#define ATH_KTR(_sc, _km, _kf, ...) do { \ | #define ATH_KTR(_sc, _km, _kf, ...) do { \ | ||||
if (sc->sc_ktrdebug & (_km)) \ | if (sc->sc_ktrdebug & (_km)) \ | ||||
CTR##_kf(KTR_DEV, __VA_ARGS__); \ | CTR##_kf(KTR_DEV, __VA_ARGS__); \ | ||||
} while (0) | } while (0) | ||||
extern uint64_t ath_debug; | extern uint64_t ath_debug; | ||||
#define IFF_DUMPPKTS(sc, m) \ | #define IFF_DUMPPKTS(sc, m) ((sc->sc_debug & (m)) | ||||
((sc->sc_debug & (m)) || \ | |||||
(sc->sc_ifp->if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2)) | |||||
#define DPRINTF(sc, m, fmt, ...) do { \ | #define DPRINTF(sc, m, fmt, ...) do { \ | ||||
if (sc->sc_debug & (m)) \ | if (sc->sc_debug & (m)) \ | ||||
device_printf(sc->sc_dev, fmt, __VA_ARGS__); \ | device_printf(sc->sc_dev, fmt, __VA_ARGS__); \ | ||||
} while (0) | } while (0) | ||||
#define KEYPRINTF(sc, ix, hk, mac) do { \ | #define KEYPRINTF(sc, ix, hk, mac) do { \ | ||||
if (sc->sc_debug & ATH_DEBUG_KEYCACHE) \ | if (sc->sc_debug & ATH_DEBUG_KEYCACHE) \ | ||||
ath_keyprint(sc, __func__, ix, hk, mac); \ | ath_keyprint(sc, __func__, ix, hk, mac); \ | ||||
} while (0) | } while (0) | ||||
extern void ath_printrxbuf(struct ath_softc *, const struct ath_buf *bf, | extern void ath_printrxbuf(struct ath_softc *, const struct ath_buf *bf, | ||||
u_int ix, int); | u_int ix, int); | ||||
extern void ath_printtxbuf(struct ath_softc *, const struct ath_buf *bf, | extern void ath_printtxbuf(struct ath_softc *, const struct ath_buf *bf, | ||||
u_int qnum, u_int ix, int done); | u_int qnum, u_int ix, int done); | ||||
extern void ath_printtxstatbuf(struct ath_softc *sc, const struct ath_buf *bf, | extern void ath_printtxstatbuf(struct ath_softc *sc, const struct ath_buf *bf, | ||||
const uint32_t *ds, u_int qnum, u_int ix, int done); | const uint32_t *ds, u_int qnum, u_int ix, int done); | ||||
#else /* ATH_DEBUG */ | #else /* ATH_DEBUG */ | ||||
#define ATH_KTR(_sc, _km, _kf, ...) do { } while (0) | #define ATH_KTR(_sc, _km, _kf, ...) do { } while (0) | ||||
#define IFF_DUMPPKTS(sc, m) \ | #define IFF_DUMPPKTS(sc, m) (0) | ||||
((sc->sc_ifp->if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2)) | |||||
#define DPRINTF(sc, m, fmt, ...) do { \ | #define DPRINTF(sc, m, fmt, ...) do { \ | ||||
(void) sc; \ | (void) sc; \ | ||||
} while (0) | } while (0) | ||||
#define KEYPRINTF(sc, k, ix, mac) do { \ | #define KEYPRINTF(sc, k, ix, mac) do { \ | ||||
(void) sc; \ | (void) sc; \ | ||||
} while (0) | } while (0) | ||||
#endif /* ATH_DEBUG */ | #endif /* ATH_DEBUG */ | ||||
#endif | #endif |