> > +#ifdef CONFIG_PM > > +static void lan743x_ethtool_get_wol(struct net_device *netdev, > > + struct ethtool_wolinfo *wol) > > +{ > > + struct lan743x_adapter *adapter = netdev_priv(netdev); > > + > > + wol->supported = 0; > > + wol->wolopts = 0; > > + phy_ethtool_get_wol(netdev->phydev, wol); > > + > > + wol->supported &= WAKE_BCAST | WAKE_UCAST | WAKE_MCAST | > > + WAKE_MAGIC | WAKE_PHY | WAKE_ARP; > > Hi Bryan > > Say the PHY set WAKE_MAGICSECURE, because it supports that. This AND > then wipes it out, making the call to phy_ethtool_get_wol() pointless. > In fact, should this AND be an OR?
Hi Andrew, I assumed that "supported" means that it is supported by both the phy and mac driver, which is why I used the AND operator. Am I mistaken? Is WAKE_MAGICSECURE a special case not requiring mac driver support? > > > + > > +#ifdef CONFIG_PM > > +static int lan743x_ethtool_set_wol(struct net_device *netdev, > > + struct ethtool_wolinfo *wol) > > +{ > > + struct lan743x_adapter *adapter = netdev_priv(netdev); > > + > > + if (wol->wolopts & WAKE_MAGICSECURE) > > + return -EOPNOTSUPP; > > The PHY might support this. Since you call phy_ethtool_set_wol(), you > should give it the chance. > Again, does WAKE_MAGICSECURE require mac driver support? If so then it does not matter if the phy driver supports it. If I misunderstand, can you explain, or direct me to documents. Thanks, Bryan