mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
0de0955931
SVN-Revision: 35355
32 lines
827 B
Diff
32 lines
827 B
Diff
--- a/drivers/net/ethernet/lantiq_etop.c
|
|
+++ b/drivers/net/ethernet/lantiq_etop.c
|
|
@@ -343,16 +343,17 @@ static int
|
|
ltq_etop_hw_init(struct net_device *dev)
|
|
{
|
|
struct ltq_etop_priv *priv = netdev_priv(dev);
|
|
+ int mii_mode = priv->mii_mode;
|
|
|
|
clk_enable(priv->clk_ppe);
|
|
|
|
if (of_machine_is_compatible("lantiq,ar9")) {
|
|
ltq_etop_gbit_init(dev);
|
|
/* force the etops link to the gbit to MII */
|
|
- priv->mii_mode = PHY_INTERFACE_MODE_MII;
|
|
+ mii_mode = PHY_INTERFACE_MODE_MII;
|
|
}
|
|
|
|
- switch (priv->mii_mode) {
|
|
+ switch (mii_mode) {
|
|
case PHY_INTERFACE_MODE_RMII:
|
|
ltq_etop_w32_mask(ETOP_MII_MASK,
|
|
ETOP_MII_REVERSE, LTQ_ETOP_CFG);
|
|
@@ -377,7 +378,7 @@ ltq_etop_hw_init(struct net_device *dev)
|
|
break;
|
|
}
|
|
netdev_err(dev, "unknown mii mode %d\n",
|
|
- priv->mii_mode);
|
|
+ mii_mode);
|
|
return -ENOTSUPP;
|
|
}
|
|
|