summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2008-06-13 07:31:58 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2008-06-13 07:31:58 +0000
commit06f24d6e6538bff2849cab957df1ac2c50b90259 (patch)
tree02d9266e8e0c509b6a26453c272ac6324cfb317f /sys/dev
parenta1301e597de40ee80009b60903c4e47571b42669 (diff)
If you have #if FOO > 0 parts of your softc be
sure to #include "foo.h" in all code that uses the softc, otherwise some object files will have a different idea of how big the softc struct is. This will result in things like part of the softc, say the interrupt handler being overridden by other data. Putting printfs in the main object file will look fine as it has the right idea as to what the size is. It is only after several hours debugging that you start to figure out what the hell is going on. jsing started trying to figure out the problem and got hints from kettenis that it likely wasn't an interrupt problem, after quite a bit of head scratching with joel I eventually spotted the problem. ok reyk@ jsing@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cardbus/if_ath_cardbus.c8
-rw-r--r--sys/dev/ic/athvar.h4
2 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/cardbus/if_ath_cardbus.c b/sys/dev/cardbus/if_ath_cardbus.c
index 9e0fbed7ec4..4fc35f96709 100644
--- a/sys/dev/cardbus/if_ath_cardbus.c
+++ b/sys/dev/cardbus/if_ath_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ath_cardbus.c,v 1.10 2006/10/12 16:35:52 grange Exp $ */
+/* $OpenBSD: if_ath_cardbus.c,v 1.11 2008/06/13 07:31:57 jsg Exp $ */
/* $NetBSD: if_ath_cardbus.c,v 1.4 2004/08/02 19:14:28 mycroft Exp $ */
/*
@@ -38,8 +38,6 @@
* CardBus bus front-end for the AR5001 Wireless LAN 802.11a/b/g CardBus.
*/
-#include "bpfilter.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
@@ -65,10 +63,6 @@
#include <net80211/ieee80211_var.h>
#include <net80211/ieee80211_rssadapt.h>
-#if NBPFILTER > 0
-#include <net/bpf.h>
-#endif
-
#include <machine/bus.h>
#include <machine/intr.h>
diff --git a/sys/dev/ic/athvar.h b/sys/dev/ic/athvar.h
index 4f604cb4947..3c69347c7fb 100644
--- a/sys/dev/ic/athvar.h
+++ b/sys/dev/ic/athvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: athvar.h,v 1.20 2007/06/06 21:41:32 reyk Exp $ */
+/* $OpenBSD: athvar.h,v 1.21 2008/06/13 07:31:57 jsg Exp $ */
/* $NetBSD: athvar.h,v 1.10 2004/08/10 01:03:53 dyoung Exp $ */
/*-
@@ -44,6 +44,8 @@
#include <net80211/ieee80211_radiotap.h>
#include <dev/ic/ar5xxx.h>
+#include "bpfilter.h"
+
#ifdef notyet
#include "gpio.h"
#endif