]> git.itanic.dy.fi Git - linux-stable/commit
net: macb: fix macb_get/set_wol() when moving to phylink
authorNicolas Ferre <nicolas.ferre@microchip.com>
Fri, 10 Jul 2020 12:46:43 +0000 (14:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jul 2020 21:29:37 +0000 (14:29 -0700)
commit253fe09435045ab9346a8e364299d971185ae031
tree46bc70a986c3a2dc07b5375abbe2d2dd1cd803a4
parentced4799d06375929e013eea04ba6908207afabbe
net: macb: fix macb_get/set_wol() when moving to phylink

Keep previous function goals and integrate phylink actions to them.

phylink_ethtool_get_wol() is not enough to figure out if Ethernet driver
supports Wake-on-Lan.
Initialization of "supported" and "wolopts" members is done in phylink
function, no need to keep them in calling function.

phylink_ethtool_set_wol() return value is considered and determines
if the MAC has to handle WoL or not. The case where the PHY doesn't
implement WoL leads to the MAC configuring it to provide this feature.

Fixes: 7897b071ac3b ("net: macb: convert to phylink")
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: Harini Katakam <harini.katakam@xilinx.com>
Cc: Antoine Tenart <antoine.tenart@bootlin.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c