From b774fe9d8a3047293867267ca60355cf14f8268d Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Wed, 22 Feb 2012 00:24:35 +0000 Subject: NET: fec_mxc.c: Add a way to disable auto negotiation Signed-off-by: Stefano Babic CC: Fabio Estevam --- drivers/net/fec_mxc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index d8db9f0..5c3b90f 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -187,9 +187,10 @@ int fec_phy_write(struct mii_dev *bus, int phyAddr, int dev_addr, int regAddr, #ifndef CONFIG_PHYLIB static int miiphy_restart_aneg(struct eth_device *dev) { + int ret = 0; +#if !defined(CONFIG_FEC_MXC_NO_ANEG) struct fec_priv *fec = (struct fec_priv *)dev->priv; struct ethernet_regs *eth = fec->bus->priv; - int ret = 0; /* * Wake up from sleep if necessary @@ -213,6 +214,7 @@ static int miiphy_restart_aneg(struct eth_device *dev) if (fec->mii_postcall) ret = fec->mii_postcall(fec->phy_id); +#endif return ret; } -- cgit v1.1