Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b6505aa authored by Antoine Tenart's avatar Antoine Tenart Committed by Gerrit - the friendly Code Review server
Browse files

net: phy: add MACsec ops in phy_device



This patch adds a reference to MACsec ops in the phy_device, to allow
PHYs to support offloading MACsec operations. The phydev lock will be
held while calling those helpers.

Change-Id: I7076430d419c1ff260380e42f48d6077d673ba3f
Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: 2e18135845b359f26c37df38ba56565496517c10
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[quic_krudrapa@quicinc.com: Fixed Merge conflicts ]
Signed-off-by: default avatarKarthik Rudrapatna <quic_krudrapa@quicinc.com>
parent 090a240d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -327,6 +327,7 @@ struct phy_c45_device_ids {
};

struct macsec_context;
struct macsec_ops;

/* phy_device: An instance of a PHY
 *
@@ -349,6 +350,7 @@ struct macsec_context;
 * attached_dev: The attached enet driver's device instance ptr
 * adjust_link: Callback for the enet controller to respond to
 * changes in the link state.
 * macsec_ops: MACsec offloading ops.
 *
 * speed, duplex, pause, supported, advertising, lp_advertising,
 * and autoneg are used like in mii_if_info
@@ -450,6 +452,10 @@ struct phy_device {
	ANDROID_KABI_RESERVE(2);
	ANDROID_KABI_RESERVE(3);
	ANDROID_KABI_RESERVE(4);
#if IS_ENABLED(CONFIG_MACSEC)
	/* MACsec management functions */
	const struct macsec_ops *macsec_ops;
#endif
};
#define to_phy_device(d) container_of(to_mdio_device(d), \
				      struct phy_device, mdio)