summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Assmann <sassmann@kpanic.de>2019-03-21 15:45:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-08 08:22:49 +0300
commit56e41e46e860b672bd35022b28e2e6fb5977888b (patch)
tree45a788f66073ae0edece1a1a50d09b4c6ea4f480
parentee5088ba4b2366cd78cd8155be0452f1f71be465 (diff)
downloadlinux-56e41e46e860b672bd35022b28e2e6fb5977888b.tar.xz
i40e: fix WoL support check
[ Upstream commit f669d24f3dd00beab452c0fc9257f6a942ffca9b ] The current check for WoL on i40e is broken. Code comment says only magic packet is supported, so only check for that. Fixes: 540a152da762 (i40e/ixgbe/igb: fail on new WoL flag setting WAKE_MAGICSECURE) Signed-off-by: Stefan Assmann <sassmann@kpanic.de> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Sasha Levin (Microsoft) <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index a6bc7847346b..5d544e661445 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2378,8 +2378,7 @@ 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)
- | (wol->wolopts != WAKE_FILTER))
+ if (wol->wolopts & ~WAKE_MAGIC)
return -EOPNOTSUPP;
/* is this a new value? */