Re: [PATCH net-next 05/10] net: phy: introduce a phy_driver macsec helper

2019-01-24 Thread Antoine Tenart
Hi Andrew, On Wed, Jan 23, 2019 at 06:08:16PM +0100, Andrew Lunn wrote: > > +int phy_macsec(struct phy_device *phydev, struct netdev_macsec *macsec) > > +{ > > + int ret = -EOPNOTSUPP; > > + > > + if (!phydev->drv) > > + return -EIO; > > + > > + mutex_lock(&phydev->lock); > > + > >

Re: [PATCH net-next 05/10] net: phy: introduce a phy_driver macsec helper

2019-01-23 Thread Andrew Lunn
> +int phy_macsec(struct phy_device *phydev, struct netdev_macsec *macsec) > +{ > + int ret = -EOPNOTSUPP; > + > + if (!phydev->drv) > + return -EIO; > + > + mutex_lock(&phydev->lock); > + > + if (phydev->drv->macsec) > + ret = phydev->drv->macsec(phydev, mac

[PATCH net-next 05/10] net: phy: introduce a phy_driver macsec helper

2019-01-23 Thread Antoine Tenart
This patch introduces a phy_driver MACsec helper to allow PHYs to implement a MACsec offloading solution. The phy_driver MACsec helper is called through a wrapper, phy_macsec, to perform this call while holding the phydev lock. Signed-off-by: Antoine Tenart --- drivers/net/phy/phy.c | 17 +++