net: macsec: introduce MACsec ops
[linux-2.6-microblaze.git] / include / net / macsec.h
index 0b98803..16e7e50 100644 (file)
@@ -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_ */