aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2020-03-25 15:52:31 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-26 20:17:36 -0700
commit30e9bb8472f4454d0544020574bb03d96ffa0e52 (patch)
treed479e28ed5ee163bc224ad9878bfb93a03dc731d /include/linux/netdevice.h
parentnet: introduce the MACSEC netdev feature (diff)
downloadwireguard-linux-30e9bb8472f4454d0544020574bb03d96ffa0e52.tar.xz
wireguard-linux-30e9bb8472f4454d0544020574bb03d96ffa0e52.zip
net: add a reference to MACsec ops in net_device
This patch adds a reference to MACsec ops to the net_device structure, allowing net device drivers to implement offloading operations for MACsec. 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/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 654808bfad83..b521500b244d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -53,6 +53,8 @@ struct netpoll_info;
struct device;
struct phy_device;
struct dsa_port;
+struct macsec_context;
+struct macsec_ops;
struct sfp_bus;
/* 802.11 specific */
@@ -1819,6 +1821,8 @@ enum netdev_priv_flags {
* that follow this device when it is moved
* to another network namespace.
*
+ * @macsec_ops: MACsec offloading ops
+ *
* FIXME: cleanup struct net_device such that network protocol info
* moves out.
*/
@@ -2113,6 +2117,11 @@ struct net_device {
unsigned wol_enabled:1;
struct list_head net_notifier_list;
+
+#if IS_ENABLED(CONFIG_MACSEC)
+ /* MACsec management functions */
+ const struct macsec_ops *macsec_ops;
+#endif
};
#define to_net_dev(d) container_of(d, struct net_device, dev)