net: macb: Add ARP support to WOL
authorVineeth Karumanchi <vineeth.karumanchi@amd.com>
Fri, 21 Jun 2024 04:57:34 +0000 (10:27 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 25 Jun 2024 09:53:07 +0000 (11:53 +0200)
commit0cb8de39a776e093c759e21d2c95df049f6ea9e9
tree33bda3e119b3e30c478c0fdd2d69e79807dbc6bb
parent3650a8cc5b34b1032428724c1b74349a753237a4
net: macb: Add ARP support to WOL

Extend wake-on LAN support with an ARP packet.

Currently, if PHY supports WOL, ethtool ignores the modes supported
by MACB. This change extends the WOL modes with MACB supported modes.

Advertise wake-on LAN supported modes by default without relying on
dt node. By default, wake-on LAN will be in disabled state.
Using ethtool, users can enable/disable or choose packet types.

For wake-on LAN via ARP, ensure the IP address is assigned and
report an error otherwise.

Co-developed-by: Harini Katakam <harini.katakam@amd.com>
Signed-off-by: Harini Katakam <harini.katakam@amd.com>
Signed-off-by: Vineeth Karumanchi <vineeth.karumanchi@amd.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Tested-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> # on SAMA7G5
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/cadence/macb.h
drivers/net/ethernet/cadence/macb_main.c