On Tue, Mar 03, 2026 at 11:03:23AM +0800, Jiawen Wu wrote:
+int wx_set_wol(struct net_device *netdev,
+ struct ethtool_wolinfo *wol)
+{
+ struct wx *wx = netdev_priv(netdev);
+ struct pci_dev *pdev = wx->pdev;
+
+ if (!wx->wol_hw_supported)
+ return -EOPNOTSUPP;
+
+ wx->wol = 0;
+ if (wol->wolopts & WAKE_MAGIC)
+ wx->wol = WX_PSR_WKUP_CTL_MAG;
+ netdev->ethtool->wol_enabled = !!(wx->wol);
Please see net/ethtool/ioctl.c::ethtool_set_wol() and
net/ethtool/wol.c::ethnl_set_wol(). Both of these call your set_wol()
method, and then if it was successful, sets
netdev->ethtool->wol_enabled as appropriate. So whatever you do here
will be overwritten by core code.
Maybe an initial patch to remove this prior to moving the code would
be a good idea?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!