summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_priv.h
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2008-07-27 14:21:16 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2008-07-27 14:21:16 +0000
commitce06861314799b65bd06022e95d7e9b5114294e9 (patch)
tree4843e2d752f9117761a4622cc33dec9fdc701bdd /sys/net80211/ieee80211_priv.h
parent1287ac99c3d7a89c43b1e4c836754c41123ca5ad (diff)
s/IEEE80211_DPRINTF/DPRINTF/
automatically prepend __func__ to output. deobfuscates debug messages a bit. no binary change unless compiled with IEEE80211_DEBUG.
Diffstat (limited to 'sys/net80211/ieee80211_priv.h')
-rw-r--r--sys/net80211/ieee80211_priv.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/net80211/ieee80211_priv.h b/sys/net80211/ieee80211_priv.h
index cfc3ca779e0..7a8c6de5ba1 100644
--- a/sys/net80211/ieee80211_priv.h
+++ b/sys/net80211/ieee80211_priv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_priv.h,v 1.1 2008/07/21 19:27:26 damien Exp $ */
+/* $OpenBSD: ieee80211_priv.h,v 1.2 2008/07/27 14:21:15 damien Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -20,19 +20,22 @@
#define _NET80211_IEEE80211_PRIV_H_
#ifdef IEEE80211_DEBUG
-extern int ieee80211_debug;
-#define IEEE80211_DPRINTF(X) do { if (ieee80211_debug) printf X; } while(0)
-#define IEEE80211_DPRINTF2(X) do { if (ieee80211_debug>1) printf X; } while(0)
+extern int ieee80211_debug;
+#define DPRINTF(X) do { \
+ if (ieee80211_debug) { \
+ printf("%s: ", __func__); \
+ printf X; \
+ } \
+} while(0)
#else
-#define IEEE80211_DPRINTF(X)
-#define IEEE80211_DPRINTF2(X)
+#define DPRINTF(X)
#endif
-#define IEEE80211_AID_SET(b, w) \
+#define IEEE80211_AID_SET(b, w) \
((w)[IEEE80211_AID(b) / 32] |= (1 << (IEEE80211_AID(b) % 32)))
-#define IEEE80211_AID_CLR(b, w) \
+#define IEEE80211_AID_CLR(b, w) \
((w)[IEEE80211_AID(b) / 32] &= ~(1 << (IEEE80211_AID(b) % 32)))
-#define IEEE80211_AID_ISSET(b, w) \
+#define IEEE80211_AID_ISSET(b, w) \
((w)[IEEE80211_AID(b) / 32] & (1 << (IEEE80211_AID(b) % 32)))
/* unaligned big endian access */