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

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

net: macsec: introduce MACsec ops



This patch introduces MACsec ops for drivers to support offloading
MACsec operations.

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


Signed-off-by: default avatarKarthik Rudrapatna <quic_krudrapa@quicinc.com>
parent e5938654
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -195,4 +195,28 @@ struct macsec_context {
	u8 prepare:1;
};

/**
 * struct macsec_ops - MACsec offloading operations
 */
struct macsec_ops {
	/* Device wide */
	int (*mdo_dev_open)(struct macsec_context *ctx);
	int (*mdo_dev_stop)(struct macsec_context *ctx);
	/* SecY */
	int (*mdo_add_secy)(struct macsec_context *ctx);
	int (*mdo_upd_secy)(struct macsec_context *ctx);
	int (*mdo_del_secy)(struct macsec_context *ctx);
	/* Security channels */
	int (*mdo_add_rxsc)(struct macsec_context *ctx);
	int (*mdo_upd_rxsc)(struct macsec_context *ctx);
	int (*mdo_del_rxsc)(struct macsec_context *ctx);
	/* Security associations */
	int (*mdo_add_rxsa)(struct macsec_context *ctx);
	int (*mdo_upd_rxsa)(struct macsec_context *ctx);
	int (*mdo_del_rxsa)(struct macsec_context *ctx);
	int (*mdo_add_txsa)(struct macsec_context *ctx);
	int (*mdo_upd_txsa)(struct macsec_context *ctx);
	int (*mdo_del_txsa)(struct macsec_context *ctx);
};

#endif /* _NET_MACSEC_H_ */