diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2010-02-08 12:28:43 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2010-02-08 12:28:43 +0000 |
commit | 8e41fd2f48a6ff2803e18f92816a4c2c376203bb (patch) | |
tree | 16a3e3ab4a1d84679f9ea9c53ca40ea518c13813 /sys | |
parent | 7474572c4d9651d435dd70722a428b6808eb9b88 (diff) |
When initialising the chip actually set the hardware MAC address, thus
allowing the MAC address to be changed/set via ifconfig.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_lii.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c index 4eedee45f5c..eeab433449d 100644 --- a/sys/dev/pci/if_lii.c +++ b/sys/dev/pci/if_lii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lii.c,v 1.25 2010/02/03 14:08:41 jsing Exp $ */ +/* $OpenBSD: if_lii.c,v 1.26 2010/02/08 12:28:42 jsing Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation. @@ -691,6 +691,13 @@ lii_init(struct ifnet *ifp) LII_WRITE_4(sc, LII_MACC, val); + /* Set the hardware MAC address. */ + LII_WRITE_4(sc, LII_MAC_ADDR_0, letoh32((sc->sc_ac.ac_enaddr[2] << 24) | + (sc->sc_ac.ac_enaddr[3] << 16) | (sc->sc_ac.ac_enaddr[4] << 8) | + sc->sc_ac.ac_enaddr[5])); + LII_WRITE_4(sc, LII_MAC_ADDR_1, + letoh32((sc->sc_ac.ac_enaddr[0] << 8) | sc->sc_ac.ac_enaddr[1])); + /* Program promiscuous mode and multicast filters. */ lii_iff(sc); |