summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2020-03-25 15:52:32 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-27 06:17:36 +0300
commit8fa9137180b2fd8482b671f7e0bd8cf7538cbf59 (patch)
treee75dcba20f72e46ba0935a5cca1911340b292687 /include
parent30e9bb8472f4454d0544020574bb03d96ffa0e52 (diff)
downloadlinux-8fa9137180b2fd8482b671f7e0bd8cf7538cbf59.tar.xz
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 <antoine.tenart@bootlin.com> Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/macsec.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/macsec.h b/include/net/macsec.h
index 2e4780dbf5c6..71de2c863df7 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;