Commit 1e8636b3 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Jakub Kicinski

r8169: align rtl_wol_suspend_quirk with vendor driver and rename it

At least from chip version 25 the vendor driver sets these rx flags
for all chip versions if WOL is enabled. Therefore I wouldn't consider
it a quirk, so let's rename the function.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f0791b92
...@@ -2210,23 +2210,11 @@ static int rtl_set_mac_address(struct net_device *dev, void *p) ...@@ -2210,23 +2210,11 @@ static int rtl_set_mac_address(struct net_device *dev, void *p)
return 0; return 0;
} }
static void rtl_wol_suspend_quirk(struct rtl8169_private *tp) static void rtl_wol_enable_rx(struct rtl8169_private *tp)
{ {
switch (tp->mac_version) { if (tp->mac_version >= RTL_GIGA_MAC_VER_25)
case RTL_GIGA_MAC_VER_25:
case RTL_GIGA_MAC_VER_26:
case RTL_GIGA_MAC_VER_29:
case RTL_GIGA_MAC_VER_30:
case RTL_GIGA_MAC_VER_32:
case RTL_GIGA_MAC_VER_33:
case RTL_GIGA_MAC_VER_34:
case RTL_GIGA_MAC_VER_37 ... RTL_GIGA_MAC_VER_63:
RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) | RTL_W32(tp, RxConfig, RTL_R32(tp, RxConfig) |
AcceptBroadcast | AcceptMulticast | AcceptMyPhys); AcceptBroadcast | AcceptMulticast | AcceptMyPhys);
break;
default:
break;
}
} }
static void rtl_prepare_power_down(struct rtl8169_private *tp) static void rtl_prepare_power_down(struct rtl8169_private *tp)
...@@ -2240,7 +2228,7 @@ static void rtl_prepare_power_down(struct rtl8169_private *tp) ...@@ -2240,7 +2228,7 @@ static void rtl_prepare_power_down(struct rtl8169_private *tp)
if (device_may_wakeup(tp_to_dev(tp))) { if (device_may_wakeup(tp_to_dev(tp))) {
phy_speed_down(tp->phydev, false); phy_speed_down(tp->phydev, false);
rtl_wol_suspend_quirk(tp); rtl_wol_enable_rx(tp);
} }
} }
...@@ -4872,7 +4860,7 @@ static void rtl_shutdown(struct pci_dev *pdev) ...@@ -4872,7 +4860,7 @@ static void rtl_shutdown(struct pci_dev *pdev)
if (system_state == SYSTEM_POWER_OFF) { if (system_state == SYSTEM_POWER_OFF) {
if (tp->saved_wolopts) { if (tp->saved_wolopts) {
rtl_wol_suspend_quirk(tp); rtl_wol_enable_rx(tp);
rtl_wol_shutdown_quirk(tp); rtl_wol_shutdown_quirk(tp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment