diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2023-10-23 12:33:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-25 10:47:33 +0300 |
commit | d264f24409b87f0ba63d81d6f28165b8fd4fdf24 (patch) | |
tree | cf8e7bc94a6ac6213390a328accf96c9f3db98d5 /drivers/net/dsa/microchip/ksz_common.h | |
parent | aed7425d65108bc6e7cb2f64a11aa35b9f5e4397 (diff) | |
download | linux-d264f24409b87f0ba63d81d6f28165b8fd4fdf24.tar.xz |
net: dsa: microchip: ksz9477: add Wake on LAN support
Add WoL support for KSZ9477 family of switches. This code was tested on
KSZ8563 chip.
KSZ9477 family of switches supports multiple PHY events:
- wake on Link Up
- wake on Energy Detect.
Since current UAPI can't differentiate between this PHY events, map all
of them to WAKE_PHY.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index f7c471bc040f..a7394175fcf6 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -374,6 +374,10 @@ struct ksz_dev_ops { int duplex, bool tx_pause, bool rx_pause); void (*setup_rgmii_delay)(struct ksz_device *dev, int port); int (*tc_cbs_set_cinc)(struct ksz_device *dev, int port, u32 val); + void (*get_wol)(struct ksz_device *dev, int port, + struct ethtool_wolinfo *wol); + int (*set_wol)(struct ksz_device *dev, int port, + struct ethtool_wolinfo *wol); void (*config_cpu_port)(struct dsa_switch *ds); int (*enable_stp_addr)(struct ksz_device *dev); int (*reset)(struct ksz_device *dev); |