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.

Change-Id: I5f6ea8ef00889987bde03ceca88512ead27d936b
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>
Git-commit: 8fa9137180b2fd8482b671f7e0bd8cf7538cbf59
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Akshaya Damodaran <quic_adamodar@quicinc.com>
This commit is contained in:
Akshaya Damodaran 2020-03-25 15:52:32 +03:00 committed by Gerrit - the friendly Code Review server
parent dc4956515d
commit 21d6b60894

View File

@ -231,7 +231,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;