diff options
author | Bruno Prémont <bonbons@linux-vserver.org> | 2008-10-09 00:05:03 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-09 00:05:03 (GMT) |
commit | 20037fa407f26716866eff95221c4882babe1280 (patch) | |
tree | 43a594a185d55d3eb8305c53b05285c425e7ccdb /drivers/net | |
parent | d3eab82b554eeb51f038ac327b6c68c6afdee978 (diff) | |
download | linux-fsl-qoriq-20037fa407f26716866eff95221c4882babe1280.tar.xz |
r8169: WoL fixes, part 1.
When probing the chip and handling it's power management settings
also remember wether WoL feature is enabled.
Without this patch one has to call ethtool to change WoL settings
for this flag to be set and any WoL being enabled on suspend to
RAM.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/r8169.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 53a0ce4..3c6e591 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1925,6 +1925,10 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) RTL_W8(Cfg9346, Cfg9346_Unlock); RTL_W8(Config1, RTL_R8(Config1) | PMEnable); RTL_W8(Config5, RTL_R8(Config5) & PMEStatus); + if ((RTL_R8(Config3) & (LinkUp | MagicPacket)) != 0) + tp->features |= RTL_FEATURE_WOL; + if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0) + tp->features |= RTL_FEATURE_WOL; tp->features |= rtl_try_msi(pdev, ioaddr, cfg); RTL_W8(Cfg9346, Cfg9346_Lock); |