ethtool: ioctl: account for sopass diff in set_wol
authorJustin Chen <justin.chen@broadcom.com>
Mon, 12 Jun 2023 21:37:00 +0000 (14:37 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 14 Jun 2023 05:05:52 +0000 (22:05 -0700)
commit2bddad9ec65a925da4ab4f73a9377d80540ca67b
treed501f46e2c16a1e8e36b5399ffa1332a1f19bb0e
parente5d4a21b3a9477ead1c32504a56569a848c22736
ethtool: ioctl: account for sopass diff in set_wol

sopass won't be set if wolopt doesn't change. This means the following
will fail to set the correct sopass.
ethtool -s eth0 wol s sopass 11:22:33:44:55:66
ethtool -s eth0 wol s sopass 22:44:55:66:77:88

Make sure we call into the driver layer set_wol if sopass is different.

Fixes: 55b24334c0f2 ("ethtool: ioctl: improve error checking for set_wol")
Signed-off-by: Justin Chen <justin.chen@broadcom.com>
Link: https://lore.kernel.org/r/1686605822-34544-1-git-send-email-justin.chen@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/ioctl.c