blob: b3ef8df488e7eb5668d834e9e996ca4627028b68 [file] [log] [blame]
developer7e32f7e2022-05-18 21:10:08 +08001From 8fa9137180b2fd8482b671f7e0bd8cf7538cbf59 Mon Sep 17 00:00:00 2001
2From: Antoine Tenart <antoine.tenart@bootlin.com>
3Date: Wed, 25 Mar 2020 15:52:32 +0300
4Subject: net: macsec: allow to reference a netdev from a MACsec context
5
6This patch allows to reference a net_device from a MACsec context. This
7is needed to allow implementing MACsec operations in net device drivers.
8
9Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
10Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com>
11Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
12Signed-off-by: David S. Miller <davem@davemloft.net>
13---
14 include/net/macsec.h | 5 ++++-
15 1 file changed, 4 insertions(+), 1 deletion(-)
16
17diff --git a/include/net/macsec.h b/include/net/macsec.h
18index 2e4780dbf5c6a..71de2c863df70 100644
19--- a/include/net/macsec.h
20+++ b/include/net/macsec.h
21@@ -220,7 +220,10 @@ struct macsec_secy {
22 * struct macsec_context - MACsec context for hardware offloading
23 */
24 struct macsec_context {
25- struct phy_device *phydev;
26+ union {
27+ struct net_device *netdev;
28+ struct phy_device *phydev;
29+ };
30 enum macsec_offload offload;
31
32 struct macsec_secy *secy;
33--
34cgit 1.2.3-1.el7
35