]> git.hungrycats.org Git - linux/commitdiff
igb: Fixed Wake On LAN support
authorAkeem G Abodunrin <akeem.g.abodunrin@intel.com>
Fri, 8 Nov 2013 01:54:07 +0000 (01:54 +0000)
committerJiri Slaby <jslaby@suse.cz>
Tue, 26 Aug 2014 12:12:16 +0000 (14:12 +0200)
commit 42ce4126d8bc2e128e1f207cf79bb0623fac498f upstream.

This patch fixes Wake on LAN being reported as supported on some Ethernet
ports, in contrary to Hardware capability.

Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/ethernet/intel/igb/igb_ethtool.c

index 6a5b67ba45c8c3bdb1dfc4ad36100025a085b32e..3eb020c9a0812388f4a010340b34a7b60a70d2f7 100644 (file)
@@ -2059,14 +2059,15 @@ static void igb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 {
        struct igb_adapter *adapter = netdev_priv(netdev);
 
-       wol->supported = WAKE_UCAST | WAKE_MCAST |
-                        WAKE_BCAST | WAKE_MAGIC |
-                        WAKE_PHY;
        wol->wolopts = 0;
 
        if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED))
                return;
 
+       wol->supported = WAKE_UCAST | WAKE_MCAST |
+                        WAKE_BCAST | WAKE_MAGIC |
+                        WAKE_PHY;
+
        /* apply any specific unsupported masks here */
        switch (adapter->hw.device_id) {
        default: