mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
samv7/sam_emac.c: fix compile error with unknown structure member
chip/sam_emac.c:3754:11: error: 'struct sam_emac_s' has no member
named 'phytype'
3754 | if (priv->phytype == SAMV7_PHY_KSZ8061)
| ^~
make[3]: *** [Makefile:167: sam_emac.o] Error 1
Member phytype is available only if CONFIG_NETDEV_PHY_IOCTL and
CONFIG_ARCH_PHY_INTERRUPT is set.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
@@ -3751,6 +3751,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv)
|
||||
goto errout;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
||||
if (priv->phytype == SAMV7_PHY_KSZ8061)
|
||||
{
|
||||
ret = sam_phywrite(priv, priv->phyaddr, MII_MMDCONTROL, 0x0001);
|
||||
@@ -3781,6 +3782,7 @@ static int sam_autonegotiate(struct sam_emac_s *priv)
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Restart Auto_negotiation */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user