Re: [PATCH net-next v2 2/4] net: macb: Add ARP support to WOL

From: Vineeth Karumanchi
Date: Thu Feb 22 2024 - 23:46:54 EST


Hi Andrew,

On 23/02/24 1:02 am, Andrew Lunn wrote:
u32 wol;
+ u32 wolopts;

+ wol->supported |= (bp->wol & MACB_WOL_HAS_MAGIC_PACKET) ? WAKE_MAGIC : 0;
+ wol->supported |= (bp->wol & MACB_WOL_HAS_ARP_PACKET) ? WAKE_ARP : 0;

+ if (bp->caps & MACB_CAPS_WOL)
+ bp->wol |= (MACB_WOL_HAS_ARP_PACKET | MACB_WOL_HAS_MAGIC_PACKET);

So bp->wol is the capabilities of the hardware?


Yes, it holds the supported capabilities.

And bp->wolopts is what has been enabled via ethtool?


Yes, it holds the selected options through ethtool.

I just wounder if it would be easier to understand is bp->wol was
renamed wol_caps, similar to bp->caps?

Andrew

Sure, I will make the change.

🙏 vineeth