Skip to contentSkip to conversation

i40e/ixgbe/igb: fail on new wol flag setting WAKE_MAGICSECURE

PATCH New Alice Michael 2 participants 2 messages Oct 10, 2018 – Oct 31, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i40e/ixgbe/igb: fail on new wol flag setting WAKE_MAGICSECURE

From: Todd Fujinaka <[email protected]>

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.

---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c   | 3 ++-
 drivers/net/ethernet/intel/igb/igb_ethtool.c     | 2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +2 -1
index f35a26c..ee6a6c1 100644
@@ -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? */
drivers/net/ethernet/intel/igb/igb_ethtool.c +1 -1
index e0a0e62..7426060 100644
@@ -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))
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +2 -1
index 732b1e6..acba067 100644
@@ -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))
Signature · 1 line
2.9.5
#1 lore raw

PATCH 1/1 i40e/ixgbe/igb: fail on new wol flag setting WAKE_MAGICSECURE

Quoted 14 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Alice Michael
Sent: Wednesday, October 10, 2018 11:10 AM
To: Michael, Alice <[email protected]>; intel-wired-
lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH] i40e/ixgbe/igb: fail on new wol flag setting WAKE_MAGICSECURE

From: Todd Fujinaka <[email protected]>

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.

Quoted 6 lines
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c   | 3 ++-
 drivers/net/ethernet/intel/igb/igb_ethtool.c     | 2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)