[PATCH net-next v2 0/5] WAKE_FILTER for Broadcom PHY (v2)

From: Florian Fainelli
Date: Thu Oct 26 2023 - 18:55:41 EST


This is a re-submission of the series that was submitted before:

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

A number of things have changed:

- there is proper fallback between the PHY and the MAC now, whereas
before we would abort right away due to -EOPNOTSUPP

- added support for programming the Ethernet type for matching

- fixed reporting of masks via ethtool

- added proper validation of RX_CLS_LOC_ANY/RX_CLS_LOC_FIRST and
location

- addressed feedback given by Andrew by validating that we have at least
one RX_CLS_FLOW_WAKE filter programmed to allow enabling WAKE_FILTER
via ethtool, otherwise we will not wake-up from WAKE_FILTER

- use a PHY register as a scratchpad to accurately report whether a
custom filter was installed, before that we would falsely report
WAKE_UCAST/BCAST/MCAST but not WAKE_FILTER upon cold boot

- corrected commit message to be accurate (MAC address did not match the
IPv4 address in the example)

Changes in v2:

- corrected sparse annotationes for h_proto (Vincent)
- added 2 spaces for commands in commit messages (Vincent)
- added hunk in patch 5 back into patch 4 (self)

Florian Fainelli (5):
net: ethtool: Make RXNFC walking code accept a callback
net: ethtool: Add validation for WAKE_FILTER
net: phy: Add pluming for ethtool_{get,set}_rxnfc
net: phy: broadcom: Add support for WAKE_FILTER
net: bcmgenet: Interrogate PHY for WAKE_FILTER programming

.../net/ethernet/broadcom/genet/bcmgenet.c | 16 ++
drivers/net/phy/bcm-phy-lib.c | 205 +++++++++++++++++-
drivers/net/phy/bcm-phy-lib.h | 5 +
drivers/net/phy/broadcom.c | 2 +
drivers/net/phy/phy.c | 19 ++
include/linux/phy.h | 8 +
net/ethtool/common.c | 96 +++++++-
net/ethtool/common.h | 3 +
net/ethtool/ioctl.c | 3 +
net/ethtool/wol.c | 3 +
10 files changed, 350 insertions(+), 10 deletions(-)

--
2.34.1

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature