summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_devar.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-11-21 21:50:07 +0000
committerjhb <jhb@FreeBSD.org>2005-11-21 21:50:07 +0000
commit26ea846ce92cc9968c0389039966c0d8b1c358cf (patch)
tree262c56e8c244fd80a4720ee376f61ca8945f6826 /sys/pci/if_devar.h
parente37baf09aa73fea7836d96b33a43d7a3ac04e9b4 (diff)
downloadFreeBSD-src-26ea846ce92cc9968c0389039966c0d8b1c358cf.zip
FreeBSD-src-26ea846ce92cc9968c0389039966c0d8b1c358cf.tar.gz
Various fixes to make de(4) not panic after ru@'s IF_LLADDR() changes:
- Don't call tulip_addr_filter() to reset the RX address filter in tulip_reset() since that gets called before ether_ifattach(). Just call it in tulip_init_locked(). - Use be16dec() and le16dec() to parse MAC addresses when programming the RX filter. - Let ether_ioctl() handle SIOCSIFMTU since we were doing the exact same thing with the added bonus that we leaked the driver lock if the MTU was > ETHERMTU in the homerolled version. This part will be MFC'd. Clue from: wpaul (1) Stolen from: marcel (2 via patch for dc(4)) MFC after: 1 week
Diffstat (limited to 'sys/pci/if_devar.h')
-rw-r--r--sys/pci/if_devar.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/pci/if_devar.h b/sys/pci/if_devar.h
index ae96b2e..75565b0 100644
--- a/sys/pci/if_devar.h
+++ b/sys/pci/if_devar.h
@@ -837,9 +837,9 @@ static const struct {
* endian case, just shift them left 16.
*/
#if BYTE_ORDER == BIG_ENDIAN
-#define TULIP_SP_MAC(x) ((x) << 16)
+#define TULIP_SP_MAC(ptr) (be16dec(ptr) << 16)
#else
-#define TULIP_SP_MAC(x) (x)
+#define TULIP_SP_MAC(ptr) (le16dec(ptr))
#endif
/*
OpenPOWER on IntegriCloud