summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_vr.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2001-03-07 18:52:22 +0000
committerwpaul <wpaul@FreeBSD.org>2001-03-07 18:52:22 +0000
commit98e6d79157cc274ee510c16c0326198ccbea4795 (patch)
tree0b27d4793524602a927802eae9e067075c9f6bb3 /sys/pci/if_vr.c
parent0caeb6f1295e3da8bc213200024581effb320ee9 (diff)
downloadFreeBSD-src-98e6d79157cc274ee510c16c0326198ccbea4795.zip
FreeBSD-src-98e6d79157cc274ee510c16c0326198ccbea4795.tar.gz
Remember to actually program the MAC address into the unicast filter
in vr_init(). The VIA Rhine chip happens to be able to automatically read its station address from the EEPROM automatically when reset, so you don't need to program the filter if you want to keep using the factory default address, but if you want to change it with "ifconfig vr0 ether xx:xx:xx:xx:xx:xx" then we need to manually set it in the init routine.
Diffstat (limited to 'sys/pci/if_vr.c')
-rw-r--r--sys/pci/if_vr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c
index 9c6591b..2d14680 100644
--- a/sys/pci/if_vr.c
+++ b/sys/pci/if_vr.c
@@ -1388,6 +1388,7 @@ static void vr_init(xsc)
struct vr_softc *sc = xsc;
struct ifnet *ifp = &sc->arpcom.ac_if;
struct mii_data *mii;
+ int i;
VR_LOCK(sc);
@@ -1399,6 +1400,12 @@ static void vr_init(xsc)
vr_stop(sc);
vr_reset(sc);
+ /*
+ * Set our station address.
+ */
+ for (i = 0; i < ETHER_ADDR_LEN; i++)
+ CSR_WRITE_1(sc, VR_PAR0 + i, sc->arpcom.ac_enaddr[i]);
+
VR_CLRBIT(sc, VR_RXCFG, VR_RXCFG_RX_THRESH);
VR_SETBIT(sc, VR_RXCFG, VR_RXTHRESH_STORENFWD);
OpenPOWER on IntegriCloud