Skip to content

Commit 540a152

Browse files
Todd FujinakaJeff Kirsher
authored andcommitted
i40e/ixgbe/igb: fail on new WoL flag setting WAKE_MAGICSECURE
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 <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent a9e5105 commit 540a152

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

drivers/net/ethernet/intel/i40e/i40e_ethtool.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2377,7 +2377,8 @@ static int i40e_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
23772377
return -EOPNOTSUPP;
23782378

23792379
/* only magic packet is supported */
2380-
if (wol->wolopts && (wol->wolopts != WAKE_MAGIC))
2380+
if (wol->wolopts && (wol->wolopts != WAKE_MAGIC)
2381+
| (wol->wolopts != WAKE_FILTER))
23812382
return -EOPNOTSUPP;
23822383

23832384
/* is this a new value? */

drivers/net/ethernet/intel/igb/igb_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2113,7 +2113,7 @@ static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
21132113
{
21142114
struct igb_adapter *adapter = netdev_priv(netdev);
21152115

2116-
if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE))
2116+
if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE | WAKE_FILTER))
21172117
return -EOPNOTSUPP;
21182118

21192119
if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED))

drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2206,7 +2206,8 @@ static int ixgbe_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
22062206
{
22072207
struct ixgbe_adapter *adapter = netdev_priv(netdev);
22082208

2209-
if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
2209+
if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE |
2210+
WAKE_FILTER))
22102211
return -EOPNOTSUPP;
22112212

22122213
if (ixgbe_wol_exclusion(adapter, wol))

0 commit comments

Comments
 (0)