r8169: fix WOL setting for 8105 and 8111evl
authorHayes Wang <hayeswang@realtek.com>
Tue, 6 Sep 2011 08:55:14 +0000 (16:55 +0800)
committerFrancois Romieu <romieu@fr.zoreil.com>
Sat, 17 Sep 2011 09:37:48 +0000 (11:37 +0200)
rtl8105, rtl8111E, and rtl8111evl need enable RxConfig bit 1 ~ 3
for supporting wake on lan.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
drivers/net/r8169.c

index b55fba7f3a0413395d33c2c8a01f0361972410c0..78c1d5832792e5cff614d264cb61e2b70dc771cd 100644 (file)
@@ -3320,9 +3320,16 @@ static void r810x_phy_power_up(struct rtl8169_private *tp)
 
 static void r810x_pll_power_down(struct rtl8169_private *tp)
 {
+       void __iomem *ioaddr = tp->mmio_addr;
+
        if (__rtl8169_get_wol(tp) & WAKE_ANY) {
                rtl_writephy(tp, 0x1f, 0x0000);
                rtl_writephy(tp, MII_BMCR, 0x0000);
+
+               if (tp->mac_version == RTL_GIGA_MAC_VER_29 ||
+                   tp->mac_version == RTL_GIGA_MAC_VER_30)
+                       RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast |
+                               AcceptMulticast | AcceptMyPhys);
                return;
        }
 
@@ -3418,7 +3425,8 @@ static void r8168_pll_power_down(struct rtl8169_private *tp)
                rtl_writephy(tp, MII_BMCR, 0x0000);
 
                if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
-                   tp->mac_version == RTL_GIGA_MAC_VER_33)
+                   tp->mac_version == RTL_GIGA_MAC_VER_33 ||
+                   tp->mac_version == RTL_GIGA_MAC_VER_34)
                        RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast |
                                AcceptMulticast | AcceptMyPhys);
                return;