svn commit: r185421 - head/sys/dev/mii

Bjoern A. Zeeb bz at FreeBSD.org
Fri Nov 28 15:44:13 PST 2008


Author: bz
Date: Fri Nov 28 23:44:13 2008
New Revision: 185421
URL: http://svn.freebsd.org/changeset/base/185421

Log:
  Renamed the FRAMELEN macro to TRUEPHY_FRAMELEN as for powerpc
  it seems to be possible to collide with FRAMELEN from machine/frame.h.
  
  Found by:	zec

Modified:
  head/sys/dev/mii/truephy.c

Modified: head/sys/dev/mii/truephy.c
==============================================================================
--- head/sys/dev/mii/truephy.c	Fri Nov 28 23:39:25 2008	(r185420)
+++ head/sys/dev/mii/truephy.c	Fri Nov 28 23:44:13 2008	(r185421)
@@ -57,7 +57,8 @@
 
 #include "miibus_if.h"
 
-#define FRAMELEN(mtu)	(ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + (mtu) + ETHER_CRC_LEN)
+#define	TRUEPHY_FRAMELEN(mtu)	\
+    (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN + (mtu) + ETHER_CRC_LEN)
 
 static int	truephy_service(struct mii_softc *, struct mii_data *, int);
 static int	truephy_attach(device_t);
@@ -298,7 +299,7 @@ truephy_reset(struct mii_softc *sc)
 
 	mii_phy_reset(sc);
 
-	if (FRAMELEN(sc->mii_pdata->mii_ifp->if_mtu) > 2048) {
+	if (TRUEPHY_FRAMELEN(sc->mii_pdata->mii_ifp->if_mtu) > 2048) {
 		int conf;
 
 		conf = PHY_READ(sc, TRUEPHY_CONF);


More information about the svn-src-all mailing list