[PATCH net-next v2 4/4] net: phy: Introduce Airoha AN8801/R Gigabit Ethernet PHY driver

Andrew Lunn andrew at lunn.ch
Thu Mar 26 08:24:23 PDT 2026


On Thu, Mar 26, 2026 at 03:13:19PM +0000, Russell King (Oracle) wrote:
> On Thu, Mar 26, 2026 at 01:04:15PM +0100, Louis-Alexis Eyraud wrote:
> > +static int an8801r_set_wol(struct phy_device *phydev,
> > +			   struct ethtool_wolinfo *wol)
> > +{
> > +	struct net_device *attach_dev = phydev->attached_dev;
> > +	const unsigned char *macaddr = attach_dev->dev_addr;
> 
> This isn't a criticism for this patch, but a discussion point for
> phylib itself.
> 
> It occurs to me that there's a weakness in the phylib interface for WoL,
> specifically when WoL is enabled at the PHY, but someone then changes
> the interface's MAC address - there doesn't seem to be a way for the
> address programmed into the PHY to be updated. Should there be?
> 
> Do we instead expect users to disable WoL before changing the MAC for
> a network interface?

Program the MAC address during suspend? I assume userspace is no
longer active at this point, so the address should be stable.

       Andrew



More information about the Linux-mediatek mailing list