From: Antoine Tenart Date: Wed, 25 Mar 2020 12:52:32 +0000 (+0300) Subject: net: macsec: allow to reference a netdev from a MACsec context X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8fa9137180b2fd8482b671f7e0bd8cf7538cbf59;p=linux.git net: macsec: allow to reference a netdev from a MACsec context This patch allows to reference a net_device from a MACsec context. This is needed to allow implementing MACsec operations in net device drivers. Signed-off-by: Antoine Tenart Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller --- diff --git a/include/net/macsec.h b/include/net/macsec.h index 2e4780dbf5c6a..71de2c863df70 100644 --- a/include/net/macsec.h +++ b/include/net/macsec.h @@ -220,7 +220,10 @@ struct macsec_secy { * struct macsec_context - MACsec context for hardware offloading */ struct macsec_context { - struct phy_device *phydev; + union { + struct net_device *netdev; + struct phy_device *phydev; + }; enum macsec_offload offload; struct macsec_secy *secy;