From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jiawen Wu <jiawenwu@trustnetic.com>
Cc: netdev@vger.kernel.org, Mengyuan Lou <mengyuanlou@net-swift.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Simon Horman <horms@kernel.org>,
Jacob Keller <jacob.e.keller@intel.com>,
Kees Cook <kees@kernel.org>,
Michal Kubiak <michal.kubiak@intel.com>, Joe Damato <joe@dama.to>,
Larysa Zaremba <larysa.zaremba@intel.com>,
Abdun Nihaal <abdun.nihaal@gmail.com>,
Breno Leitao <leitao@debian.org>
Subject: Re: [PATCH net-next v3 1/9] net: ngbe: move the WOL functions to libwx
Date: Tue, 3 Mar 2026 08:40:48 +0000 [thread overview]
Message-ID: <aaaekLi5vE7Qid3O@shell.armlinux.org.uk> (raw)
In-Reply-To: <20260303030331.24076-2-jiawenwu@trustnetic.com>
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!
next prev parent reply other threads:[~2026-03-03 8:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 3:03 [PATCH net-next v3 0/9] Wangxun improvement and new support Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 1/9] net: ngbe: move the WOL functions to libwx Jiawen Wu
2026-03-03 8:40 ` Russell King (Oracle) [this message]
2026-03-03 3:03 ` [PATCH net-next v3 2/9] net: ngbe: remove redundant macros Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 3/9] net: ngbe: improve the reset flow Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 4/9] net: wangxun: move reusable PCI driver ops functions into libwx Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 5/9] net: txgbe: add power management support Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 6/9] net: wangxun: move ethtool_ops.set_channels into libwx Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 7/9] net: wangxun: delete service_timer before cancel service_work Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 8/9] net: wangxun: add Tx timeout process Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 9/9] net: wangxun: implement pci_error_handlers ops Jiawen Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aaaekLi5vE7Qid3O@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=abdun.nihaal@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jiawenwu@trustnetic.com \
--cc=joe@dama.to \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=leitao@debian.org \
--cc=mengyuanlou@net-swift.com \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox