summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/if_wireg.h28
-rw-r--r--sys/dev/ic/if_wivar.h3
-rw-r--r--sys/dev/pci/if_wi_pci.c3
3 files changed, 21 insertions, 13 deletions
diff --git a/sys/dev/ic/if_wireg.h b/sys/dev/ic/if_wireg.h
index 6e88eeabb90..c4ad1e283b3 100644
--- a/sys/dev/ic/if_wireg.h
+++ b/sys/dev/ic/if_wireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wireg.h,v 1.7 2001/10/25 19:40:06 mickey Exp $ */
+/* $OpenBSD: if_wireg.h,v 1.8 2001/12/20 17:48:25 mickey Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -78,25 +78,31 @@
* register space access macros
*/
#define CSR_WRITE_4(sc, reg, val) \
- bus_space_write_4(sc->wi_btag, sc->wi_bhandle, reg, val)
+ bus_space_write_4(sc->wi_btag, sc->wi_bhandle, \
+ (sc->sc_pci? reg * 2: reg) , val)
#define CSR_WRITE_2(sc, reg, val) \
- bus_space_write_2(sc->wi_btag, sc->wi_bhandle, reg, val)
+ bus_space_write_2(sc->wi_btag, sc->wi_bhandle, \
+ (sc->sc_pci? reg * 2: reg) , val)
#define CSR_WRITE_1(sc, reg, val) \
- bus_space_write_1(sc->wi_btag, sc->wi_bhandle, reg, val)
+ bus_space_write_1(sc->wi_btag, sc->wi_bhandle, \
+ (sc->sc_pci? reg * 2: reg) , val)
#define CSR_READ_4(sc, reg) \
- bus_space_read_4(sc->wi_btag, sc->wi_bhandle, reg)
+ bus_space_read_4(sc->wi_btag, sc->wi_bhandle, \
+ (sc->sc_pci? reg * 2: reg))
#define CSR_READ_2(sc, reg) \
- bus_space_read_2(sc->wi_btag, sc->wi_bhandle, reg)
+ bus_space_read_2(sc->wi_btag, sc->wi_bhandle, \
+ (sc->sc_pci? reg * 2: reg))
#define CSR_READ_1(sc, reg) \
- bus_space_read_1(sc->wi_btag, sc->wi_bhandle, reg)
+ bus_space_read_1(sc->wi_btag, sc->wi_bhandle, \
+ (sc->sc_pci? reg * 2: reg))
#define CSR_READ_RAW_2(sc, ba, dst, sz) \
- bus_space_read_raw_multi_2((sc)->wi_btag, (sc)->wi_bhandle, (ba), \
- (dst), (sz))
+ bus_space_read_raw_multi_2((sc)->wi_btag, (sc)->wi_bhandle, \
+ (sc->sc_pci? ba * 2: ba), (dst), (sz))
#define CSR_WRITE_RAW_2(sc, ba, dst, sz) \
- bus_space_write_raw_multi_2((sc)->wi_btag, (sc)->wi_bhandle, (ba), \
- (dst), (sz))
+ bus_space_write_raw_multi_2((sc)->wi_btag, (sc)->wi_bhandle, \
+ (sc->sc_pci? ba * 2: ba), (dst), (sz))
/*
* The WaveLAN/IEEE cards contain an 802.11 MAC controller which Lucent
diff --git a/sys/dev/ic/if_wivar.h b/sys/dev/ic/if_wivar.h
index 47a2b80eb6d..75415452fed 100644
--- a/sys/dev/ic/if_wivar.h
+++ b/sys/dev/ic/if_wivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wivar.h,v 1.3 2001/06/09 20:17:21 millert Exp $ */
+/* $OpenBSD: if_wivar.h,v 1.4 2001/12/20 17:48:25 mickey Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -74,6 +74,7 @@ struct wi_softc {
struct timeout sc_timo;
int sc_prism2;
int sc_prism2_ver;
+ int sc_pci;
};
#define WI_PRT_FMT "%s"
diff --git a/sys/dev/pci/if_wi_pci.c b/sys/dev/pci/if_wi_pci.c
index 75b0df266e3..ac6280f0ec8 100644
--- a/sys/dev/pci/if_wi_pci.c
+++ b/sys/dev/pci/if_wi_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_pci.c,v 1.11 2001/12/20 17:41:48 mickey Exp $ */
+/* $OpenBSD: if_wi_pci.c,v 1.12 2001/12/20 17:48:25 mickey Exp $ */
/*
* Copyright (c) 2001 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -201,6 +201,7 @@ wi_pci_attach(parent, self, aux)
memt = iot;
memh = ioh;
+ sc->sc_pci = 1;
}
sc->wi_btag = iot;