mbox series

[net-next,0/2] Add WAKE_MDA Wake-on-LAN option

Message ID 20231011221242.4180589-1-florian.fainelli@broadcom.com (mailing list archive)
Headers show
Series Add WAKE_MDA Wake-on-LAN option | expand

Message

Florian Fainelli Oct. 11, 2023, 10:12 p.m. UTC
This is a follow-up to the patch series previously submitted here:

https://lore.kernel.org/all/20230516231713.2882879-1-florian.fainelli@broadcom.com/

which is now implementing the approach suggested by Andrew. This patch
series adds a new Wake-on-LAN option (WAKE_MDA) with the single letter
'e' (all of the 'm', 'd' and 'a' were already taken) which allows us to
specify a custom destination MAC to be waking from.

For the ioctl-based interface we use an anonymous union to overlay a
6-byte MAC DA field with the existing sopass field.

This is particularly useful for systems that use Ethernet PHYs as
wake-up devices and when waking up on coarse filters like multicast,
broadcast destination MAC addresses is not enough to keep them in a low
power state.

We use this on Set-top-box environments in order to allow waking-up from
only specific IPv4/v6 multicast groups like mDNS for instance. Printers,
smart speaker and IoT devices could fall in that category as well.
Example:

ethtool -s eth0 wol e mac-da 01:00:5e:00:00:fb

ethtool patches are sent as a reply to this thread.

Florian Fainelli (2):
  ethtool: Introduce WAKE_MDA
  net: phy: broadcom: Add support for WAKE_MDA

 Documentation/networking/ethtool-netlink.rst |  7 ++++++-
 drivers/net/phy/bcm-phy-lib.c                |  7 ++++++-
 include/uapi/linux/ethtool.h                 | 10 ++++++++--
 include/uapi/linux/ethtool_netlink.h         |  1 +
 net/ethtool/common.c                         |  1 +
 net/ethtool/netlink.h                        |  2 +-
 net/ethtool/wol.c                            | 21 ++++++++++++++++++++
 7 files changed, 44 insertions(+), 5 deletions(-)