From a14eb93ae7e3ebec88f048e39605d6e99eb8d03e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 6 Nov 2017 13:28:29 -0600 Subject: [PATCH] lpc43xx Ethernet: Fix some backward logic setting full-duplex and 100mbps when autoconfiguration is disabled. Noted by Anonymous in Issue #76 --- arch/arm/src/lpc43xx/lpc43_ethernet.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/lpc43xx/lpc43_ethernet.c b/arch/arm/src/lpc43xx/lpc43_ethernet.c index 955c30684e1..f5a9cb1e580 100644 --- a/arch/arm/src/lpc43xx/lpc43_ethernet.c +++ b/arch/arm/src/lpc43xx/lpc43_ethernet.c @@ -3210,11 +3210,11 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) #else /* Auto-negotion not selected */ #ifdef CONFIG_LPC43_ETHFD - priv->mbps100 = 1; + priv->fduplex = 1; #endif #ifdef CONFIG_LPC43_ETH100MBPS - priv->fduplex = 1; + priv->mbps100 = 1; #endif phyval = 0; @@ -3238,11 +3238,14 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) up_mdelay(PHY_CONFIG_DELAY); - /* Remember the selected speed and duplex modes */ + /* Remember the selected speed and duplex modes + * REVISIT: Isn't this redundant? + */ #ifdef CONFIG_LPC43_ETHFD priv->fduplex = 1; #endif + #ifdef CONFIG_LPC43_ETH100MBPS priv->mbps100 = 1; #endif