Skip to content

Commit 022ddbc

Browse files
hkallweitdavem330
authored andcommitted
r8169: remove some WOL-related dead code
Commit bde135a "r8169: only enable PCI wakeups when WOL is active" removed the only user of flag RTL_FEATURE_WOL. So let's remove some now dead code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5eeba39 commit 022ddbc

1 file changed

Lines changed: 2 additions & 37 deletions

File tree

  • drivers/net/ethernet/realtek

‎drivers/net/ethernet/realtek/r8169.c‎

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,8 @@ struct ring_info {
736736
};
737737

738738
enum features {
739-
RTL_FEATURE_WOL = (1 << 0),
740-
RTL_FEATURE_MSI = (1 << 1),
741-
RTL_FEATURE_GMII = (1 << 2),
739+
RTL_FEATURE_MSI = (1 << 0),
740+
RTL_FEATURE_GMII = (1 << 1),
742741
};
743742

744743
struct rtl8169_counters {
@@ -1859,10 +1858,6 @@ static int rtl8169_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
18591858

18601859
rtl_lock_work(tp);
18611860

1862-
if (wol->wolopts)
1863-
tp->features |= RTL_FEATURE_WOL;
1864-
else
1865-
tp->features &= ~RTL_FEATURE_WOL;
18661861
if (pm_runtime_active(d))
18671862
__rtl8169_set_wol(tp, wol->wolopts);
18681863
else
@@ -8521,36 +8516,6 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
85218516
RTL_W8(Cfg9346, Cfg9346_Unlock);
85228517
RTL_W8(Config1, RTL_R8(Config1) | PMEnable);
85238518
RTL_W8(Config5, RTL_R8(Config5) & (BWF | MWF | UWF | LanWake | PMEStatus));
8524-
switch (tp->mac_version) {
8525-
case RTL_GIGA_MAC_VER_34:
8526-
case RTL_GIGA_MAC_VER_35:
8527-
case RTL_GIGA_MAC_VER_36:
8528-
case RTL_GIGA_MAC_VER_37:
8529-
case RTL_GIGA_MAC_VER_38:
8530-
case RTL_GIGA_MAC_VER_40:
8531-
case RTL_GIGA_MAC_VER_41:
8532-
case RTL_GIGA_MAC_VER_42:
8533-
case RTL_GIGA_MAC_VER_43:
8534-
case RTL_GIGA_MAC_VER_44:
8535-
case RTL_GIGA_MAC_VER_45:
8536-
case RTL_GIGA_MAC_VER_46:
8537-
case RTL_GIGA_MAC_VER_47:
8538-
case RTL_GIGA_MAC_VER_48:
8539-
case RTL_GIGA_MAC_VER_49:
8540-
case RTL_GIGA_MAC_VER_50:
8541-
case RTL_GIGA_MAC_VER_51:
8542-
if (rtl_eri_read(tp, 0xdc, ERIAR_EXGMAC) & MagicPacket_v2)
8543-
tp->features |= RTL_FEATURE_WOL;
8544-
if ((RTL_R8(Config3) & LinkUp) != 0)
8545-
tp->features |= RTL_FEATURE_WOL;
8546-
break;
8547-
default:
8548-
if ((RTL_R8(Config3) & (LinkUp | MagicPacket)) != 0)
8549-
tp->features |= RTL_FEATURE_WOL;
8550-
break;
8551-
}
8552-
if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0)
8553-
tp->features |= RTL_FEATURE_WOL;
85548519
tp->features |= rtl_try_msi(tp, cfg);
85558520
RTL_W8(Cfg9346, Cfg9346_Lock);
85568521

0 commit comments

Comments
 (0)