Thread (29 messages) 29 messages, 3 authors, 2020-01-13
STALE2338d
Revisions (3)
  1. v3 [diff vs current]
  2. v4 [diff vs current]
  3. v5 current

[PATCH net-next v5 14/15] net: macsec: allow to reference a netdev from a MACsec context

From: Antoine Tenart <hidden>
Date: 2020-01-10 16:20:50
Also in: lkml
Subsystem: networking [general], networking [macsec], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Sabrina Dubroca, Linus Torvalds

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 <redacted>
---
 include/net/macsec.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/net/macsec.h b/include/net/macsec.h
index a08f19099c7a..1b4de64d7fef 100644
--- a/include/net/macsec.h
+++ b/include/net/macsec.h
@@ -179,7 +179,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;
-- 
2.24.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help