From 315e22e4df093c25c850ba8aa22cb5da3c812dbf Mon Sep 17 00:00:00 2001 From: Alexander Vasiljev Date: Fri, 24 Jun 2016 10:09:36 -0600 Subject: [PATCH] Correct auto-negotiation mode in the LPC43xx ethernet. --- arch/arm/src/lpc43xx/lpc43_ethernet.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/lpc43xx/lpc43_ethernet.c b/arch/arm/src/lpc43xx/lpc43_ethernet.c index db05295ec07..086dd0b8f3e 100644 --- a/arch/arm/src/lpc43xx/lpc43_ethernet.c +++ b/arch/arm/src/lpc43xx/lpc43_ethernet.c @@ -3392,6 +3392,9 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) priv->mbps100 = 1; } #endif +#endif + +#else /* Auto-negotion not selected */ #ifdef CONFIG_LPC43_ETHFD priv->mbps100 = 1; @@ -3400,11 +3403,9 @@ static int lpc43_phyinit(FAR struct lpc43_ethmac_s *priv) #ifdef CONFIG_LPC43_ETH100MBPS priv->fduplex = 1; #endif -#endif - - /* However we got here, commit to the hardware */ phyval = 0; + if (priv->mbps100) { phyval |= MII_MCR_FULLDPLX;