Messages in this thread | | | Date | Tue, 17 Oct 2023 08:25:35 +0200 | From | Oleksij Rempel <> | Subject | Re: [PATCH net-next v4 4/9] net: dsa: microchip: ksz9477: add Wake on LAN support |
| |
On Mon, Oct 16, 2023 at 04:59:24PM +0200, Andrew Lunn wrote: > > +int ksz9477_set_wol(struct ksz_device *dev, int port, > > + struct ethtool_wolinfo *wol) > > +{ > > + u8 pme_conf, pme_ctrl = 0; > > + int ret; > > + > > + if (wol->wolopts & ~WAKE_PHY) > > + return -EINVAL; > > EOPNOTSUPP might be better here. I'm assuming there is no other way > WoL can be supported, since this is a combined MAC/PHY device.
EOPNOTSUPP is typically returned when WoL isn’t supported at all. In this instance, WoL is supported but an invalid option has been given. Nonetheless, I don’t have a strong opinion on this matter currently, and am ready to go with whichever option is recommended.
Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
| |