i40e/ixgbe/igb: fail on new WoL flag setting WAKE_MAGICSECURE
authorTodd Fujinaka <todd.fujinaka@intel.com>
Wed, 10 Oct 2018 18:10:10 +0000 (11:10 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 7 Nov 2018 17:47:01 +0000 (09:47 -0800)
There's a new flag for setting WoL filters that is only
enabled on one manufacturer's NICs, and it's not ours. Fail
with EOPNOTSUPP.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

index 9f8464f8078341021bd8c012eac16e2213d39279..9c1211ad2c6bbe5537127b189332612960ac3ec6 100644 (file)
@@ -2377,7 +2377,8 @@ static int i40e_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
                return -EOPNOTSUPP;
 
        /* only magic packet is supported */
-       if (wol->wolopts && (wol->wolopts != WAKE_MAGIC))
+       if (wol->wolopts && (wol->wolopts != WAKE_MAGIC)
+                         | (wol->wolopts != WAKE_FILTER))
                return -EOPNOTSUPP;
 
        /* is this a new value? */
index 5acf3b743876a485f61002658dccba47a0ca3d59..c5767106824521a2e78374310cbe5f15ecc4d125 100644 (file)
@@ -2113,7 +2113,7 @@ static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 {
        struct igb_adapter *adapter = netdev_priv(netdev);
 
-       if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE))
+       if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE | WAKE_FILTER))
                return -EOPNOTSUPP;
 
        if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED))
index 732b1e6ecc43cf292029b2bf0d13177fccb3f83e..acba067cc15ac22e91207801933e598c184fde6b 100644 (file)
@@ -2206,7 +2206,8 @@ static int ixgbe_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 {
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
 
-       if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
+       if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE |
+                           WAKE_FILTER))
                return -EOPNOTSUPP;
 
        if (ixgbe_wol_exclusion(adapter, wol))