diff options
author | hosokawa <hosokawa@FreeBSD.org> | 1998-02-27 14:29:51 +0000 |
---|---|---|
committer | hosokawa <hosokawa@FreeBSD.org> | 1998-02-27 14:29:51 +0000 |
commit | 50eecbe5177ec2111cc166e469e76efc366cab14 (patch) | |
tree | db4b2b9a5313d020b2345b87892aedab6d41b696 /sys/dev | |
parent | c5d67e845e67071911069cbf4edc6ce3d52412c9 (diff) | |
download | FreeBSD-src-50eecbe5177ec2111cc166e469e76efc366cab14.zip FreeBSD-src-50eecbe5177ec2111cc166e469e76efc366cab14.tar.gz |
Support for "MAC address in CIS" type cards.
For example, IBM Creditcard Ethernet's MAC address is ALWAYS
"0:2:4:6:8:a" :-) without this code.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ed/if_ed.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index b46ccd5..14d3e28 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ed.c,v 1.134 1998/02/27 05:38:28 msmith Exp $ + * $Id: if_ed.c,v 1.135 1998/02/27 06:39:30 msmith Exp $ */ /* @@ -232,6 +232,8 @@ DATA_SET(pccarddrv_set, ed_info); static int edinit(struct pccard_devinfo *devi) { + int i; + u_char e; struct ed_softc *sc = &ed_softc[devi->isahd.id_unit]; /* validate unit number. */ @@ -244,6 +246,12 @@ edinit(struct pccard_devinfo *devi) sc->gone = 0; if (ed_probe_pccard(&devi->isahd, devi->misc) == 0) return(ENXIO); + e = 0; + for (i = 0; i < ETHER_ADDR_LEN; ++i) + e |= devi->misc[i]; + if (e) + for (i = 0; i < ETHER_ADDR_LEN; ++i) + sc->arpcom.ac_enaddr[i] = devi->misc[i]; if (ed_attach_isa(&devi->isahd) == 0) return(ENXIO); |