Re: [PATCH v2 2/7] can: m_can: Map WoL to device_set_wakeup_enable
From: Andrew Lunn
Date: Mon Jul 29 2024 - 15:38:28 EST
> > > +static void m_can_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
> > > +{
> > > + struct m_can_classdev *cdev = netdev_priv(dev);
> > > +
> > > + wol->supported = device_can_wakeup(cdev->dev) ? WAKE_PHY : 0;
> > > + wol->wolopts = device_may_wakeup(cdev->dev) ? WAKE_PHY : 0;
> > > +}
> >
> > It is nice to see Ethernet WoL mapped to CAN :-)
> >
> > So will any activity on the CAN BUS wake the device? Or does it need
> > to be addresses to this device?
>
> Unless you have a special filtering transceiver, which is the CAN
> equivalent of a PHY, CAN interfaces usually wake up on the first
> message on the bus. That message is usually lost.
Thanks for the info. WAKE_PHY does seem the most appropriate then.
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew