summaryrefslogtreecommitdiff
path: root/sys/dev/pcmcia
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2000-04-24 21:10:10 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2000-04-24 21:10:10 +0000
commit8e008999c397451e4ba1acca10bd50b1b9901e36 (patch)
treee785c046237d685f71dbc6125ddd561bd9bdc3be /sys/dev/pcmcia
parent45c06ae89d2c960c9bfc657359c7d6b89b8ce9b4 (diff)
Fix promiscuous mode (from martin@crt.se). Style nits. Do not look at
instance numbers in mii matching
Diffstat (limited to 'sys/dev/pcmcia')
-rw-r--r--sys/dev/pcmcia/if_xe.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c
index 899472d030e..8fb195cb8e7 100644
--- a/sys/dev/pcmcia/if_xe.c
+++ b/sys/dev/pcmcia/if_xe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xe.c,v 1.12 2000/04/24 19:43:36 niklas Exp $ */
+/* $OpenBSD: if_xe.c,v 1.13 2000/04/24 21:10:09 niklas Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist, C Stone, Job de Haas
@@ -404,7 +404,7 @@ xe_pcmcia_attach(parent, self, aux)
sc->sc_mii.mii_readreg = xe_mdi_read;
sc->sc_mii.mii_writereg = xe_mdi_write;
sc->sc_mii.mii_statchg = xe_statchg;
- ifmedia_init(&sc->sc_mii.mii_media, 0, xe_mediachange,
+ ifmedia_init(&sc->sc_mii.mii_media, IFM_IMASK, xe_mediachange,
xe_mediastatus);
DPRINTF(XED_MII | XED_CONFIG,
("bmsr %x\n", xe_mdi_read(&sc->sc_dev, 0, 1)));
@@ -946,7 +946,7 @@ xe_mdi_pulse_bits(sc, data, len)
u_int32_t mask;
for (mask = 1 << (len - 1); mask; mask >>= 1)
- xe_mdi_pulse (sc, data & mask);
+ xe_mdi_pulse(sc, data & mask);
}
/* Read a PHY register. */
@@ -1278,7 +1278,6 @@ xe_ioctl(ifp, command, data)
* such as IFF_PROMISC are handled.
*/
if (ifp->if_flags & IFF_UP) {
- xe_full_reset(sc);
xe_init(sc);
} else {
if (ifp->if_flags & IFF_RUNNING)
@@ -1360,7 +1359,7 @@ xe_set_address(sc)
for (page = 0x50, num = arp->ac_multicnt; num > 0 && enm;
num--) {
if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
- sizeof (enm->enm_addrlo)) != 0) {
+ sizeof(enm->enm_addrlo)) != 0) {
/*
* The multicast address is really a range;
* it's easier just to accept all multicasts.
@@ -1387,7 +1386,7 @@ xe_set_address(sc)
}
void
-xe_cycle_power (sc)
+xe_cycle_power(sc)
struct xe_softc *sc;
{
bus_space_tag_t bst = sc->sc_bst;
@@ -1407,7 +1406,7 @@ xe_cycle_power (sc)
}
void
-xe_full_reset (sc)
+xe_full_reset(sc)
struct xe_softc *sc;
{
bus_space_tag_t bst = sc->sc_bst;
@@ -1415,7 +1414,7 @@ xe_full_reset (sc)
bus_addr_t offset = sc->sc_offset;
/* Do an as extensive reset as possible on all functions. */
- xe_cycle_power (sc);
+ xe_cycle_power(sc);
bus_space_write_1(bst, bsh, offset + CR, SOFT_RESET);
DELAY(20000);
bus_space_write_1(bst, bsh, offset + CR, 0);
@@ -1559,7 +1558,7 @@ xe_full_reset (sc)
#ifdef XEDEBUG
void
-xe_reg_dump (sc)
+xe_reg_dump(sc)
struct xe_softc *sc;
{
int page, i;