svn commit: r256919 - head/sys/dev/ffec
Ian Lepore
ian at FreeBSD.org
Tue Oct 22 18:14:07 UTC 2013
Author: ian
Date: Tue Oct 22 18:14:06 2013
New Revision: 256919
URL: http://svnweb.freebsd.org/changeset/base/256919
Log:
Mask out non-address bits in the mac address register, for proper
detection of an all-zeroes address. Also remove a misplaced return.
Reviewed by: br@
Modified:
head/sys/dev/ffec/if_ffec.c
Modified: head/sys/dev/ffec/if_ffec.c
==============================================================================
--- head/sys/dev/ffec/if_ffec.c Tue Oct 22 18:07:49 2013 (r256918)
+++ head/sys/dev/ffec/if_ffec.c Tue Oct 22 18:14:06 2013 (r256919)
@@ -883,7 +883,7 @@ ffec_get_hwaddr(struct ffec_softc *sc, u
* assigned bit set, and the broadcast/multicast bit clear.
*/
palr = RD4(sc, FEC_PALR_REG);
- paur = RD4(sc, FEC_PAUR_REG);
+ paur = RD4(sc, FEC_PAUR_REG) & FEC_PAUR_PADDR2_MASK;
if ((palr | paur) != 0) {
hwaddr[0] = palr >> 24;
hwaddr[1] = palr >> 16;
@@ -891,7 +891,6 @@ ffec_get_hwaddr(struct ffec_softc *sc, u
hwaddr[3] = palr >> 0;
hwaddr[4] = paur >> 24;
hwaddr[5] = paur >> 16;
- return;
} else {
rnd = arc4random() & 0x00ffffff;
hwaddr[0] = 'b';
More information about the svn-src-all
mailing list