Subject: [PATCH net-next 0/7] net: Support Wake-on-LAN using filters

From: Florian Fainelli <[email-masked]>
Date: Tue, 17 Jul 2018 08:36:37 -0700

Hi all,

This patch series adds support for allowing Wake-on-LAN to wake-up the
system using configurable filters. This is particular useful in the context
of Android where wake on MDNS is a requirement.

We support this by using the bcm_sf2 Compact Field Processor (CFP) which
supports matching packets and tagging them with an unique identifier
(Classification ID) that is added in each packet being matched through the use
of Broadcom tags. The SYSTEMPORT MAC attached to that switch is then used to
match that unique identifier and trigger a system wake-up event.

Last patch is the ethtool modifications to support that feature.

Example:

ethtool --config-nfc gphy flow-type udp4 src-ip 192.168.1.1 dst-ip 192.168.1.32 \
	src-port 1234 dst-port 5678 action 64
Added rule with ID 1

ethtool -s gphy wol f filters 0x2

To wake up the device:

nc -vz -u -p 1234 -s 192.168.1.1 192.168.1.32 5678

Florian Fainelli (7):
  net: dsa: bcm_sf2: Allow targeting CPU ports for CFP rules
  net: dsa: bcm_sf2: Disable learning while in WoL
  net: systemport: Do not re-configure upon WoL interrupt
  net: systemport: Create helper to set MPD
  ethtool: Add WAKE_FILTER bitmask
  net: systemport: Add support for WAKE_FILTER
  net: dsa: bcm_sf2: Support WAKE_FILTER

 drivers/net/dsa/bcm_sf2.c                  |  14 +++-
 drivers/net/dsa/bcm_sf2_cfp.c              |   3 +-
 drivers/net/dsa/bcm_sf2_regs.h             |   2 +
 drivers/net/ethernet/broadcom/bcmsysport.c | 129 ++++++++++++++++++++++++-----
 drivers/net/ethernet/broadcom/bcmsysport.h |  14 +++-
 include/uapi/linux/ethtool.h               |   3 +-
 6 files changed, 138 insertions(+), 27 deletions(-)

-- 
2.14.1