firewall: update to git head
[openwrt.git] / target / linux / lantiq / patches-3.7 / 0304-etop.patch
1 --- a/drivers/net/ethernet/lantiq_etop.c
2 +++ b/drivers/net/ethernet/lantiq_etop.c
3 @@ -343,16 +343,17 @@ static int
4  ltq_etop_hw_init(struct net_device *dev)
5  {
6         struct ltq_etop_priv *priv = netdev_priv(dev);
7 +       int mii_mode = priv->mii_mode;
8  
9         clk_enable(priv->clk_ppe);
10  
11         if (of_machine_is_compatible("lantiq,ar9")) {
12                 ltq_etop_gbit_init(dev);
13                 /* force the etops link to the gbit to MII */
14 -               priv->mii_mode = PHY_INTERFACE_MODE_MII;
15 +               mii_mode = PHY_INTERFACE_MODE_MII;
16         }
17  
18 -       switch (priv->mii_mode) {
19 +       switch (mii_mode) {
20         case PHY_INTERFACE_MODE_RMII:
21                 ltq_etop_w32_mask(ETOP_MII_MASK,
22                         ETOP_MII_REVERSE, LTQ_ETOP_CFG);
23 @@ -377,7 +378,7 @@ ltq_etop_hw_init(struct net_device *dev)
24                         break;
25                 }
26                 netdev_err(dev, "unknown mii mode %d\n",
27 -                       priv->mii_mode);
28 +                       mii_mode);
29                 return -ENOTSUPP;
30         }
31