[RFC,v2,4/7] net/atlantic: add MACSEC internal HW data declaration and functions
diff mbox series

Message ID 8a96def4d6a17155821efd4ea8bf3c69bb08143a.1571928488.git.Pavel.Belous@aquantia.com
State RFC
Delegated to: akhil goyal
Headers show
Series
  • RFC: Support MACSEC offload in the RTE_SECURITY infrastructure.
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch warning coding style issues

Commit Message

Pavel Belous Oct. 25, 2019, 5:54 p.m. UTC
From: Pavel Belous <Pavel.Belous@aquantia.com>

MACSEC configuration is done by configuring multiple tables of MACSEC block:

- Ingress Pre-Security Classification table
- Ingress SC/SA/SAK lookup tables
- Ingress Post-Security Classification table
- Egress Packet Classifier table
- Egress Control Filter table
- Egress SC/SA/SAK lookup tables
- Ingress/Egress SC/SA/Common counters tables
- Some additional tables and spare registers

Each entry of the tables is distributed across a set of PHY registers.

This patch adds declarations for internal MACSEC HW structures
and helper functions (HAL) for accessing these tables inside MACSEC block.

This HAL was automatically generated based on the RTL design of the MACSEC
block.

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 drivers/net/atlantic/Makefile                      |    1 +
 drivers/net/atlantic/macsec/MSS_Egress_registers.h | 1498 ++++++++++++++++++
 .../net/atlantic/macsec/MSS_Ingress_registers.h    | 1135 ++++++++++++++
 drivers/net/atlantic/macsec/macsec_api.c           | 1612 ++++++++++++++++++++
 drivers/net/atlantic/macsec/macsec_api.h           |  111 ++
 drivers/net/atlantic/macsec/macsec_struct.h        |  269 ++++
 drivers/net/atlantic/meson.build                   |    1 +
 7 files changed, 4627 insertions(+)
 create mode 100644 drivers/net/atlantic/macsec/MSS_Egress_registers.h
 create mode 100644 drivers/net/atlantic/macsec/MSS_Ingress_registers.h
 create mode 100644 drivers/net/atlantic/macsec/macsec_api.c
 create mode 100644 drivers/net/atlantic/macsec/macsec_api.h
 create mode 100644 drivers/net/atlantic/macsec/macsec_struct.h

Patch
diff mbox series

diff --git a/drivers/net/atlantic/Makefile b/drivers/net/atlantic/Makefile
index 6340588..966676b 100644
--- a/drivers/net/atlantic/Makefile
+++ b/drivers/net/atlantic/Makefile
@@ -35,5 +35,6 @@  SRCS-$(CONFIG_RTE_LIBRTE_ATLANTIC_PMD) += hw_atl_utils_fw2x.c
 SRCS-$(CONFIG_RTE_LIBRTE_ATLANTIC_PMD) += hw_atl_b0.c
 SRCS-$(CONFIG_RTE_LIBRTE_ATLANTIC_PMD) += rte_pmd_atlantic.c
 SRCS-$(CONFIG_RTE_LIBRTE_ATLANTIC_PMD) += mdio.c
+SRCS-$(CONFIG_RTE_LIBRTE_ATLANTIC_PMD) += macsec_api.c
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/atlantic/macsec/MSS_Egress_registers.h b/drivers/net/atlantic/macsec/MSS_Egress_registers.h
new file mode 100644
index 0000000..ccbb20f
--- /dev/null
+++ b/drivers/net/atlantic/macsec/MSS_Egress_registers.h
@@ -0,0 +1,1498 @@ 
+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) */
+/* Copyright (C) 2014-2019 aQuantia Corporation. */
+
+#ifndef MSS_EGRESS_REGS_HEADER
+#define MSS_EGRESS_REGS_HEADER
+
+
+#define mssEgressVersionStatusRegister_ADDR 0x00005000
+#define mssEgressControlRegister_ADDR 0x00005002
+#define mssEgressPrescaleControlRegister_ADDR 0x00005004
+#define mssEgressVlanTpid_0Register_ADDR 0x00005008
+#define mssEgressVlanTpid_1Register_ADDR 0x0000500A
+#define mssEgressVlanControlRegister_ADDR 0x0000500C
+#define mssEgressPnControlRegister_ADDR 0x0000500E
+#define mssEgressMtuSizeControlRegister_ADDR 0x00005010
+#define mssEgressGcmDataInput_0ControlRegister_ADDR 0x00005012
+#define mssEgressGcmDataInput_1ControlRegister_ADDR 0x00005014
+#define mssEgressGcmDataInput_2ControlRegister_ADDR 0x00005016
+#define mssEgressGcmDataInput_3ControlRegister_ADDR 0x00005018
+#define mssEgressGcmKey_0ControlRegister_ADDR 0x0000501A
+#define mssEgressGcmKey_0ControlRegister_word_REF(word) (0x0000501A
+#define mssEgressGcmKey_1ControlRegister_ADDR 0x0000501C
+#define mssEgressGcmKey_2ControlRegister_ADDR 0x0000501E
+#define mssEgressGcmKey_3ControlRegister_ADDR 0x00005020
+#define mssEgressGcmInitialVector_0ControlRegister_ADDR 0x00005022
+#define mssEgressGcmInitialVector_1ControlRegister_ADDR 0x00005024
+#define mssEgressGcmInitialVector_2ControlRegister_ADDR 0x00005026
+#define mssEgressGcmInitialVector_3ControlRegister_ADDR 0x00005028
+#define mssEgressGcmHashInput_0ControlRegister_ADDR 0x0000502A
+#define mssEgressGcmHashInput_1ControlRegister_ADDR 0x0000502C
+#define mssEgressGcmHashInput_2ControlRegister_ADDR 0x0000502E
+#define mssEgressGcmHashInput_3ControlRegister_ADDR 0x00005030
+#define mssEgressGcmDataOut_0StatusRegister_ADDR 0x00005032
+#define mssEgressGcmDataOut_1StatusRegister_ADDR 0x00005034
+#define mssEgressGcmDataOut_2StatusRegister_ADDR 0x00005036
+#define mssEgressGcmDataOut_3StatusRegister_ADDR 0x00005038
+#define mssEgressGcmHashOut_0StatusRegister_ADDR 0x0000503A
+#define mssEgressGcmHashOut_1StatusRegister_ADDR 0x0000503C
+#define mssEgressGcmHashOut_2StatusRegister_ADDR 0x0000503E
+#define mssEgressGcmHashOut_3StatusRegister_ADDR 0x00005040
+#define mssEgressBufferDebugStatusRegister_ADDR 0x00005042
+#define mssEgressPacketFormatDebugStatusRegister_ADDR 0x00005044
+#define mssEgressGcmMultLengthADebugStatusRegister_ADDR 0x00005046
+#define mssEgressGcmMultLengthCDebugStatusRegister_ADDR 0x0000504A
+#define mssEgressGcmMultDataCountDebugStatusRegister_ADDR 0x0000504E
+#define mssEgressGcmCounterIncrmentDebugStatusRegister_ADDR 0x00005050
+#define mssEgressGcmBusyDebugStatusRegister_ADDR 0x00005052
+#define mssEgressSpareControlRegister_ADDR 0x00005054
+#define mssEgressInterruptStatusRegister_ADDR 0x0000505C
+#define mssEgressInterruptMaskRegister_ADDR 0x0000505E
+#define mssEgressSaExpiredStatusRegister_ADDR 0x00005060
+#define mssEgressSaThresholdExpiredStatusRegister_ADDR 0x00005062
+#define mssEgressEccInterruptStatusRegister_ADDR 0x00005064
+#define mssEgressEgprcLutEccError_1AddressStatusRegister_ADDR 0x00005066
+#define mssEgressEgprcLutEccError_2AddressStatusRegister_ADDR 0x00005068
+#define mssEgressEgprctlfLutEccErrorAddressStatusRegister_ADDR 0x0000506A
+#define mssEgressEgpfmtLutEccErrorAddressStatusRegister_ADDR 0x0000506C
+#define mssEgressEgmibEccErrorAddressStatusRegister_ADDR 0x0000506E
+#define mssEgressEccControlRegister_ADDR 0x00005070
+#define mssEgressDebugControlRegister_ADDR 0x00005072
+#define mssEgressDebugStatusRegister_ADDR 0x00005074
+#define mssEgressLutAddressControlRegister_ADDR 0x00005080
+#define mssEgressLutControlRegister_ADDR 0x00005081
+#define mssEgressLutDataControlRegister_ADDR 0x000050A0
+
+struct mssEgressVersionStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressID:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressVersion:8;
+			unsigned int mssEgressRevision:8;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSoftReset:1;
+			unsigned int mssEgressDropKayPacket:1;
+			unsigned int mssEgressDropEgprcLutMiss:1;
+			unsigned int mssEgressGcmStart:1;
+			unsigned int mssEgresssGcmTestMode:1;
+			unsigned int mssEgressUnmatchedUseSc_0:1;
+			unsigned int mssEgressDropInvalidSa_scPackets:1;
+			unsigned int mssEgressExplicitSectagReportShortLength:1;
+			unsigned int mssEgressExternalClassificationEnable:1;
+			unsigned int mssEgressIcvLsb_8BytesEnable:1;
+			unsigned int mssEgressHighPriority:1;
+			unsigned int mssEgressClearCounter:1;
+			unsigned int mssEgressClearGlobalTime:1;
+			unsigned int mssEgressEthertypeExplicitSectagLsb:3;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEthertypeExplicitSectagMsb:13;
+			unsigned int reserved0:3;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressPrescaleControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressPrescaleConfigurationLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressPrescaleConfigurationMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressVlanTpid_0Register_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressVlanStagTpid:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressVlanTpid_1Register_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressVlanQtagTpid:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressVlanControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressVlanUpMapTable:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressVlanUpMapTableMSW:8;
+			unsigned int mssEgressVlanUpDefault:3;
+			unsigned int mssEgressVlanStagUpParseEnable:1;
+			unsigned int mssEgressVlanQtagUpParseEnable:1;
+			unsigned int mssEgressVlanQinqParseEnable:1;
+			unsigned int mssEgressVlanStagParseEnable:1;
+			unsigned int mssEgressVlanQtagParseEnable:1;
+		} bits_1;
+	unsigned short word_1;
+	};
+};
+
+struct mssEgressPnControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSaPnThresholdLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSaPnThresholdMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressMtuSizeControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressControlledPacketMtuSize:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressUncontrolledPacketMtuSize:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmDataInput_0ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataInput_0LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataInput_0MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmDataInput_1ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataInput_1LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataInput_1MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmDataInput_2ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataInput_2LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataInput_2MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmDataInput_3ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataInput_3LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataInput_3MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmKey_0ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmKey_0LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmKey_0MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmKey_1ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmKey_1LSW:16;
+		} bits_0;
+	unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmKey_1MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmKey_2ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmKey_2LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmKey_2MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmKey_3ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmKey_3LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmKey_3MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmInitialVector_0ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmInitialVector_0LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmInitialVector_0MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmInitialVector_1ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmInitialVector_1LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmInitialVector_1MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmInitialVector_2ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmInitialVector_2LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmInitialVector_2MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmInitialVector_3ControlRegister_t
+{
+	 union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmInitialVector_3LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmInitialVector_3MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmHashInput_0ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashInput_0LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashInput_0MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmHashInput_1ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashInput_1LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashInput_1MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmHashInput_2ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashInput_2LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashInput_2MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmHashInput_3ControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashInput_3LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashInput_3MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmDataOut_0StatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataOut_0LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataOut_0MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmDataOut_1StatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataOut_1LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataOut_1MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmDataOut_2StatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataOut_2LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataOut_2MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmDataOut_3StatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataOut_3LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmDataOut_3MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmHashOut_0StatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashOut_0LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashOut_0MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmHashOut_1StatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashOut_1LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashOut_1MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmHashOut_2StatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashOut_2LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashOut_2MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmHashOut_3StatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashOut_3LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmHashOut_3MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressBufferDebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEofInsertionDebug:4;
+			unsigned int mssEgressRemovalDebug:4;
+			unsigned int mssEgressRemovalS_wDebug:6;
+			unsigned int reserved0:2;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssEgressPacketFormatDebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressPacketFormatDebug:8;
+			unsigned int mssEgressSectagInsertionDebug:6;
+			unsigned int mssEgressPadInsertionDebugLsb:2;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressPadInsertionDebugMsb:4;
+			unsigned int mssEgressSectagRemovalDebug:6;
+			unsigned int reserved0:6;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmMultLengthADebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmMultLengthADebug_0:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmMultLengthADebug_1:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmMultLengthADebug_2:16;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmMultLengthADebug_3:16;
+		} bits_3;
+		unsigned int word_3;
+	};
+};
+
+struct mssEgressGcmMultLengthCDebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmMultLengthCDebug_0:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmMultLengthCDebug_1:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmMultLengthCDebug_2:16;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmMultLengthCDebug_3:16;
+		} bits_3;
+		unsigned int word_3;
+	};
+};
+
+struct mssEgressGcmMultDataCountDebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmMultDataCountDebug:2;
+			unsigned int reserved0:14;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssEgressGcmCounterIncrmentDebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmCounterIncrementDebugLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressGcmCounterIncrementDebugMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressGcmBusyDebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressDatapathBusy:1;
+			unsigned int mssEgressPacketFormatBusy:1;
+			unsigned int mssEgressAesCounterBusy:1;
+			unsigned int mssEgressPostGcmBufferBusy:1;
+			unsigned int mssEgressGcmBufferBusy:1;
+			unsigned int mssEgressLookupBusy:1;
+			unsigned int reserved0:10;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssEgressSpareControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSpareConfiguration_1LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSpareConfiguration_1MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSpareConfiguration_2LSW:16;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSpareConfiguration_2MSW:16;
+		} bits_3;
+		unsigned int word_3;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSpareConfiguration_3LSW:16;
+		} bits_4;
+		unsigned int word_4;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSpareConfiguration_3MSW:16;
+		} bits_5;
+		unsigned int word_5;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSpareConfiguration_4LSW:16;
+		} bits_6;
+		unsigned int word_6;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSpareConfiguration_4MSW:16;
+		} bits_7;
+		unsigned int word_7;
+	};
+};
+
+struct mssEgressInterruptStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressMasterInterrupt:1;
+			unsigned int mssEgressSaExpiredInterrupt:1;
+			unsigned int mssEgressSaThresholdExpiredInterrupt:1;
+			unsigned int mssEgressMibSaturationInterrupt:1;
+			unsigned int mssEgressEccErrorInterrupt:1;
+			unsigned int reserved0:11;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressInterruptMaskRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressMasterInterruptEnable:1;
+			unsigned int mssEgressSaExpiredInterruptEnable:1;
+			unsigned int mssEgressSaExpiredThresholdInterruptEnable:1;
+			unsigned int mssEgressMibSaturationInterruptEnable:1;
+			unsigned int mssEgressEccErrorInterruptEnable:1;
+			unsigned int reserved0:11;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressSaExpiredStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSaExpiredLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSaExpiredMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressSaThresholdExpiredStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSaThresholdExpiredLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSaThresholdExpiredMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressEccInterruptStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSaEccErrorInterruptLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressSaEccErrorInterruptMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressEgprcLutEccError_1AddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgprcLutEccError_1AddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgprcLutEccError_1AddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressEgprcLutEccError_2AddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgprcLutEccError_2AddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgprcLutEccError_2AddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressEgprctlfLutEccErrorAddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgprctlfLutEccErrorAddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgprctlfLutEccErrorAddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressEgpfmtLutEccErrorAddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgpfmtLutEccErrorAddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgpfmtLutEccErrorAddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressEgmibEccErrorAddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgmibEccErrorAddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEgmibEccErrorAddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssEgressEccControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressEccEnable:1;
+			unsigned int mssEgressFastPnNumberEnable:1;
+			unsigned int reserved0:14;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssEgressDebugControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressDebugBusSelect:2;
+			unsigned int reserved0:14;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssEgressDebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressClassificationLutDebug:12;
+			unsigned int mssEgressMacControlFilterDebugLsb:4;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressMacControlFilterDebugMsb:7;
+			unsigned int mssEgressSectagProcessingLutDebug:8;
+			unsigned int reserved0:1;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLookupDebugLSW:16;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLookupDebugMSW:16;
+		} bits_3;
+		unsigned int word_3;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressDatapathDebug:6;
+			unsigned int reserved0:10;
+		} bits_4;
+		unsigned int word_4;
+	};
+};
+
+struct mssEgressLutAddressControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutAddress:9;
+			unsigned int reserved0:3;
+			unsigned int mssEgressLutSelect:4;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssEgressLutControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:14;
+			unsigned int mssEgressLutRead:1;
+			unsigned int mssEgressLutWrite:1;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssEgressLutDataControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_0:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_1:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_2:16;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_3:16;
+		} bits_3;
+		unsigned int word_3;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_4:16;
+		} bits_4;
+		unsigned int word_4;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_5:16;
+		} bits_5;
+		unsigned int word_5;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_6:16;
+		} bits_6;
+		unsigned int word_6;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_7:16;
+		} bits_7;
+		unsigned int word_7;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_8:16;
+		} bits_8;
+		unsigned int word_8;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_9:16;
+		} bits_9;
+		unsigned int word_9;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_10:16;
+		} bits_10;
+		unsigned short word_10;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_11:16;
+		} bits_11;
+		unsigned short word_11;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_12:16;
+		} bits_12;
+		unsigned short word_12;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_13:16;
+		} bits_13;
+		unsigned short word_13;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_14:16;
+		} bits_14;
+		unsigned short word_14;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_15:16;
+		} bits_15;
+		unsigned short word_15;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_16:16;
+		} bits_16;
+		unsigned short word_16;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_17:16;
+		} bits_17;
+		unsigned short word_17;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_18:16;
+		} bits_18;
+		unsigned short word_18;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_19:16;
+		} bits_19;
+		unsigned short word_19;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_20:16;
+		} bits_20;
+		unsigned int word_20;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_21:16;
+		} bits_21;
+		unsigned int word_21;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_22:16;
+		} bits_22;
+		unsigned int word_22;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_23:16;
+		} bits_23;
+		unsigned int word_23;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_24:16;
+		} bits_24;
+		unsigned int word_24;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_25:16;
+		} bits_25;
+		unsigned int word_25;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_26:16;
+		} bits_26;
+		unsigned int word_26;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssEgressLutData_27:16;
+		} bits_27;
+		unsigned int word_27;
+	};
+};
+
+#endif /* MSS_EGRESS_REGS_HEADER */
diff --git a/drivers/net/atlantic/macsec/MSS_Ingress_registers.h b/drivers/net/atlantic/macsec/MSS_Ingress_registers.h
new file mode 100644
index 0000000..ec5adb3
--- /dev/null
+++ b/drivers/net/atlantic/macsec/MSS_Ingress_registers.h
@@ -0,0 +1,1135 @@ 
+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) */
+/* Copyright (C) 2014-2019 aQuantia Corporation. */
+
+#ifndef MSS_INGRESS_REGS_HEADER
+#define MSS_INGRESS_REGS_HEADER
+
+#define mssIngressVersionStatusRegister_ADDR 0x00008000
+#define mssIngressPrescaleControlRegister_ADDR 0x00008004
+#define mssIngressVlanTpid_0Register_ADDR 0x00008006
+#define mssIngressVlanTpid_1Register_ADDR 0x00008008
+#define mssIngressVlanControlRegister_ADDR 0x0000800A
+#define mssIngressMtuSizeControlRegister_ADDR 0x0000800C
+#define mssIngressControlRegister_ADDR 0x0000800E
+#define mssIngressSaControlRegister_ADDR 0x00008010
+#define mssIngressDebugStatusRegister_ADDR 0x00008012
+#define mssIngressBusyStatusRegister_ADDR 0x00008022
+#define mssIngressSpareControlRegister_ADDR 0x00008024
+#define mssIngressSciDefaultControlRegister_ADDR 0x0000802A
+#define mssIngressInterruptStatusRegister_ADDR 0x0000802E
+#define mssIngressInterruptMaskRegister_ADDR 0x00008030
+#define mssIngressSaIcvErrorStatusRegister_ADDR 0x00008032
+#define mssIngressSaReplayErrorStatusRegister_ADDR 0x00008034
+#define mssIngressSaExpiredStatusRegister_ADDR 0x00008036
+#define mssIngressSaThresholdExpiredStatusRegister_ADDR 0x00008038
+#define mssIngressEccInterruptStatusRegister_ADDR 0x0000803A
+#define mssIngressIgprcLutEccError_1AddressStatusRegister_ADDR 0x0000803C
+#define mssIngressIgprcLutEccError_2AddressStatusRegister_ADDR 0x0000803E
+#define mssIngressIgctlfLutEccErrorAddressStatusRegister_ADDR 0x00008040
+#define mssIngressIgpfmtLutEccErrorAddressStatusRegister_ADDR 0x00008042
+#define mssIngressIgpopLutEccErrorAddressStatusRegister_ADDR 0x00008044
+#define mssIngressIgpoctlfLutEccErrorAddressStatusRegister_ADDR 0x00008046
+#define mssIngressIgpocLutEccError_1AddressStatusRegister_ADDR 0x00008048
+#define mssIngressIgpocLutEccError_2AddressStatusRegister_ADDR 0x0000804A
+#define mssIngressIgmibEccErrorAddressStatusRegister_ADDR 0x0000804C
+#define mssIngressEccControlRegister_ADDR 0x0000804E
+#define mssIngressDebugControlRegister_ADDR 0x00008050
+#define mssIngressAdditionalDebugStatusRegister_ADDR 0x00008052
+#define mssIngressLutAddressControlRegister_ADDR 0x00008080
+#define mssIngressLutControlRegister_ADDR 0x00008081
+#define mssIngressLutDataControlRegister_ADDR 0x000080A0
+
+struct mssIngressVersionStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressID:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressVersion:8;
+			unsigned int mssIngressRevision:8;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressPrescaleControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressPrescaleConfigurationLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressPrescaleConfigurationMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressVlanTpid_0Register_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressVlanStag:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressVlanTpid_1Register_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressVlanQtag:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressVlanControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressVlanUpMapTableLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressVlanUpMapTableMSW:8;
+			unsigned int mssIngressVlanUpDefault:3;
+			unsigned int mssIngressVlanStagUpParseEnable:1;
+			unsigned int mssIngressVlanQtagUpParseEnable:1;
+			unsigned int mssIngressVlanQinqParseEnable:1;
+			unsigned int mssIngressVlanStagParseEnable:1;
+			unsigned int mssIngressVlanQtagParseEnable:1;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressMtuSizeControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressControlledPacketMtuSize:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressUncontrolledPacketMtuSize:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSoftReset:1;
+			unsigned int mssIngressOperationPointToPoint:1;
+			unsigned int mssIngressCreateSci:1;
+			unsigned int mssIngressMaskShortLengthError:1;
+			unsigned int mssIngressDropKayPacket:1;
+			unsigned int mssIngressDropIgprcMiss:1;
+			unsigned int mssIngressCheckIcv:1;
+			unsigned int mssIngressClearGlobalTime:1;
+			unsigned int mssIngressClearCount:1;
+			unsigned int mssIngressHighPriority:1;
+			unsigned int mssIngressRemoveSectag:1;
+			unsigned int mssIngressGlobalValidateFrames:2;
+			unsigned int mssIngressIcvLsb_8BytesEnable:1;
+			unsigned int reserved0:2;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressSaControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaThresholdLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaThresholdMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressDebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpfmtStateMachine:4;
+			unsigned int mssIngressIgpfmtBufferDepth:4;
+			unsigned int mssIngressIgpfmtPadInsertionStateMachine:4;
+			unsigned int mssIngressIgpfmtPadInsertionBufferDepth:2;
+			unsigned int reserved0:2;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpopStateMachine:4;
+			unsigned int mssIngressIgpopBufferDepth:5;
+			unsigned int mssIngressIgpfmtSectagRemovalStateMachine:2;
+			unsigned int mssIngressIgpfmtSectagRemovalBufferDepth:3;
+			unsigned int mssIngressIgpfmtLastBytesRemovalStateMachine:2;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpfmtLastBytesRemovalBufferDepth:2;
+			unsigned int reserved0:14;
+		} bits_3;
+		unsigned int word_3;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmCounterLSW:16;
+		} bits_4;
+		unsigned int word_4;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmCounterMSW:16;
+		} bits_5;
+		unsigned int word_5;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGmcMultBufferDepth:2;
+			unsigned int reserved0:14;
+		} bits_6;
+		unsigned int word_6;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_7;
+		unsigned int word_7;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmMultLengthA_0:16;
+		} bits_8;
+		unsigned int word_8;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmMultLengthA_1:16;
+		} bits_9;
+		unsigned int word_9;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmMultLengthA_2:16;
+		} bits_10;
+		unsigned short word_10;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmMultLengthA_3:16;
+		} bits_11;
+		unsigned short word_11;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmMultLengthC_0:16;
+		} bits_12;
+		unsigned short word_12;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmMultLengthC_1:16;
+		} bits_13;
+		unsigned short word_13;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmMultLengthC_2:16;
+		} bits_14;
+		unsigned short word_14;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressGcmMultLengthC_3:16;
+		} bits_15;
+		unsigned short word_15;
+	};
+};
+
+struct mssIngressBusyStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressDataPathBusy:1;
+			unsigned int mssIngressIgpfmtBusy:1;
+			unsigned int mssIngressAesCounterBusy:1;
+			unsigned int mssIngressIgpopBusy:1;
+			unsigned int mssIngressGcmBufferBusy:1;
+			unsigned int mssIngressIgprcBusy:1;
+			unsigned int mssIngressIgpocBusy:1;
+			unsigned int reserved0:9;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssIngressSpareControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSpareControl_1LSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSpareControl_1MSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSpareControl_2LSW:16;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSpareControl_2MSW:16;
+		} bits_3;
+		unsigned int word_3;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSpareControl_3LSW:16;
+		} bits_4;
+		unsigned int word_4;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSpareControl_3MSW:16;
+		} bits_5;
+		unsigned int word_5;
+	};
+};
+
+struct mssIngressSciDefaultControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSciDefault_0:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSciDefault_1:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSciDefault_2:16;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSciDefault_3:16;
+		} bits_3;
+		unsigned int word_3;
+	};
+};
+
+struct mssIngressInterruptStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssMasterIngressInterrupt:1;
+			unsigned int mssIngressSaExpiredInterrupt:1;
+			unsigned int mssIngressSaThresholdExpiredInterrupt:1;
+			unsigned int mssIngressIcvErrorInterrupt:1;
+			unsigned int mssIngressReplayErrorInterrupt:1;
+			unsigned int mssIngressMibSaturationInterrupt:1;
+			unsigned int mssIngressEccErrorInterrupt:1;
+			unsigned int mssIngressTciE_cErrorInterrupt:1;
+			unsigned int mssIngressIgpocMissInterrupt:1;
+			unsigned int reserved0:7;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressInterruptMaskRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressMasterInterruptEnable:1;
+			unsigned int mssIngressSaExpiredInterruptEnable:1;
+			unsigned int mssIngressSaThresholdExpiredInterruptEnable:1;
+			unsigned int mssIngressIcvErrorInterruptEnable:1;
+			unsigned int mssIngressReplayErrorInterruptEnable:1;
+			unsigned int mssIngressMibSaturationInterruptEnable:1;
+			unsigned int mssIngressEccErrorInterruptEnable:1;
+			unsigned int mssIngressTciE_cErrorInterruptEnable:1;
+			unsigned int mssIngressIgpocMissInterruptEnable:1;
+			unsigned int reserved0:7;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressSaIcvErrorStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaIcvErrorLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaIcvErrorMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressSaReplayErrorStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaReplayErrorLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaReplayErrorMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressSaExpiredStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaExpiredLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaExpiredMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressSaThresholdExpiredStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaThresholdExpiredLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaThresholdExpiredMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressEccInterruptStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaEccErrorInterruptLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressSaEccErrorInterruptMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressIgprcLutEccError_1AddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgprcLutEccError_1AddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgprcLutEccError_1AddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressIgprcLutEccError_2AddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgprcLutEccError_2AddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgprcLutEccError_2AddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressIgctlfLutEccErrorAddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgctlfLutEccErrorAddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgctlfLutEccErrorAddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressIgpfmtLutEccErrorAddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpfmtLutEccErrorAddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpfmtLutEccErrorAddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressIgpopLutEccErrorAddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpopLutEccErrorAddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpopLutEccErrorAddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressIgpoctlfLutEccErrorAddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpoctlfLutEccErrorAddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpoctlfLutEccErrorAddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressIgpocLutEccError_1AddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpocLutEccError_1AddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpocLutEccError_1AddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressIgpocLutEccError_2AddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpocLutEccError_2AddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpocLutEccError_2AddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressIgmibEccErrorAddressStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgmibEccErrorAddressLSW:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgmibEccErrorAddressMSW:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+};
+
+struct mssIngressEccControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressEccEnable:1;
+			unsigned int reserved0:15;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssIngressDebugControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressDebugBusSelect:2;
+			unsigned int reserved0:14;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssIngressAdditionalDebugStatusRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpoctlfLutDebug:11;
+			unsigned int mssIngressIgpocDebugLsb:5;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpocDebugMsb:15;
+			unsigned int reserved0:1;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpocLutDebug:14;
+			unsigned int mssIngressIgpopDebugLsb:2;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgpopDebugMsb:6;
+			unsigned int mssIngressDataPathDebug:10;
+		} bits_3;
+		unsigned int word_3;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgprctlfLutDebug:11;
+			unsigned int mssIngressIgprcLutDebugLsb:5;
+		} bits_4;
+		unsigned int word_4;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressIgprcLutDebugMsb:8;
+			unsigned int reserved0:8;
+		} bits_5;
+		unsigned int word_5;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLookupDebug:12;
+			unsigned int mssIngressProcessingDebugLsb:4;
+		} bits_6;
+		unsigned int word_6;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressProcessingDebugMsb:7;
+			unsigned int reserved0:9;
+		} bits_7;
+		unsigned int word_7;
+	};
+};
+
+struct mssIngressLutAddressControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutAddress:9;
+			unsigned int reserved0:3;
+			unsigned int mssIngressLutSelect:4;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssIngressLutControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int reserved0:14;
+			unsigned int mssIngressLutRead:1;
+			unsigned int mssIngressLutWrite:1;
+		} bits_0;
+		unsigned short word_0;
+	};
+};
+
+struct mssIngressLutDataControlRegister_t
+{
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_0:16;
+		} bits_0;
+		unsigned short word_0;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_1:16;
+		} bits_1;
+		unsigned short word_1;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_2:16;
+		} bits_2;
+		unsigned int word_2;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_3:16;
+		} bits_3;
+		unsigned int word_3;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_4:16;
+		} bits_4;
+		unsigned int word_4;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_5:16;
+		} bits_5;
+		unsigned int word_5;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_6:16;
+		} bits_6;
+		unsigned int word_6;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_7:16;
+		} bits_7;
+		unsigned int word_7;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_8:16;
+		} bits_8;
+		unsigned int word_8;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_9:16;
+		} bits_9;
+		unsigned int word_9;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_10:16;
+		} bits_10;
+		unsigned short word_10;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_11:16;
+		} bits_11;
+		unsigned short word_11;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_12:16;
+		} bits_12;
+		unsigned short word_12;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_13:16;
+		} bits_13;
+		unsigned short word_13;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_14:16;
+		} bits_14;
+		unsigned short word_14;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_15:16;
+		} bits_15;
+		unsigned short word_15;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_16:16;
+		} bits_16;
+		unsigned short word_16;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_17:16;
+		} bits_17;
+		unsigned short word_17;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_18:16;
+		} bits_18;
+		unsigned short word_18;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_19:16;
+		} bits_19;
+		unsigned short word_19;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_20:16;
+		} bits_20;
+		unsigned int word_20;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_21:16;
+		} bits_21;
+		unsigned int word_21;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_22:16;
+		} bits_22;
+		unsigned int word_22;
+	};
+	union
+	{
+		struct
+		{
+			unsigned int mssIngressLutData_23:16;
+		} bits_23;
+		unsigned int word_23;
+	};
+};
+
+#endif /* MSS_INGRESS_REGS_HEADER */
diff --git a/drivers/net/atlantic/macsec/macsec_api.c b/drivers/net/atlantic/macsec/macsec_api.c
new file mode 100644
index 0000000..2003821
--- /dev/null
+++ b/drivers/net/atlantic/macsec/macsec_api.c
@@ -0,0 +1,1612 @@ 
+// SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
+/* Copyright (C) 2014-2019 aQuantia Corporation. */
+
+#include "macsec_api.h"
+#include "MSS_Ingress_registers.h"
+#include "MSS_Egress_registers.h"
+#include "mdio.h"
+
+#include "errno.h"
+
+static
+int SetRawSECIngressRecordVal(struct aq_hw_s *hw, uint16_t* packedRecVal, uint8_t numWords, uint8_t tableID, uint16_t tableIndex)
+{
+    struct mssIngressLutAddressControlRegister_t tableSelReg;
+    struct mssIngressLutControlRegister_t readWriteReg;
+
+    unsigned int i;
+
+    for (i = 0; i < numWords; i += 2)
+    {
+        mdioWrite(hw, MMD_GLOBAL, mssIngressLutDataControlRegister_ADDR + i, packedRecVal[i]);
+        mdioWrite(hw, MMD_GLOBAL, mssIngressLutDataControlRegister_ADDR + i + 1, packedRecVal[i + 1]);
+    }
+
+    for (i = numWords; i < 24; i += 2)
+    {
+        mdioWrite(hw, MMD_GLOBAL, mssIngressLutDataControlRegister_ADDR + i, 0);
+        mdioWrite(hw, MMD_GLOBAL, mssIngressLutDataControlRegister_ADDR + i + 1, 0);
+    }
+
+    tableSelReg.bits_0.mssIngressLutSelect = tableID;
+    tableSelReg.bits_0.mssIngressLutAddress = tableIndex;
+
+    readWriteReg.bits_0.mssIngressLutRead = 0;
+    readWriteReg.bits_0.mssIngressLutWrite = 1;
+
+    mdioWrite(hw, MMD_GLOBAL, mssIngressLutAddressControlRegister_ADDR, tableSelReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssIngressLutControlRegister_ADDR, readWriteReg.word_0);
+
+    return 0;
+}
+
+static
+int GetRawSECIngressRecordVal(struct aq_hw_s *hw, uint16_t* packedRecVal, uint8_t numWords, uint8_t tableID, uint16_t tableIndex)
+{
+    struct mssIngressLutAddressControlRegister_t tableSelReg;
+    struct mssIngressLutControlRegister_t readWriteReg;
+
+    unsigned int i;
+
+    tableSelReg.bits_0.mssIngressLutSelect = tableID;
+    tableSelReg.bits_0.mssIngressLutAddress = tableIndex;
+
+    readWriteReg.bits_0.mssIngressLutRead = 1;
+    readWriteReg.bits_0.mssIngressLutWrite = 0;
+
+    mdioWrite(hw, MMD_GLOBAL, mssIngressLutAddressControlRegister_ADDR, tableSelReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssIngressLutControlRegister_ADDR, readWriteReg.word_0);
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * numWords);
+
+    for (i = 0; i < numWords; i += 2)
+    {
+        mdioRead(hw, MMD_GLOBAL, mssIngressLutDataControlRegister_ADDR + i, &packedRecVal[i]);
+        mdioRead(hw, MMD_GLOBAL, mssIngressLutDataControlRegister_ADDR + i + 1, &packedRecVal[i + 1]);
+    }
+
+    return 0;
+}
+
+static
+int SetRawSECEgressRecordVal(struct aq_hw_s *hw, uint16_t* packedRecVal, uint8_t numWords, uint8_t tableID, uint16_t tableIndex)
+{
+    struct mssEgressLutAddressControlRegister_t tableSelReg;
+    struct mssEgressLutControlRegister_t readWriteReg;
+
+    unsigned int i;
+
+    for (i = 0; i < numWords; i += 2)
+    {
+        mdioWrite(hw, MMD_GLOBAL, mssEgressLutDataControlRegister_ADDR + i, packedRecVal[i]);
+        mdioWrite(hw, MMD_GLOBAL, mssEgressLutDataControlRegister_ADDR + i + 1, packedRecVal[i + 1]);
+    }
+
+    for (i = numWords; i < 28; i += 2)
+    {
+        mdioWrite(hw, MMD_GLOBAL, mssEgressLutDataControlRegister_ADDR + i, 0);
+        mdioWrite(hw, MMD_GLOBAL, mssEgressLutDataControlRegister_ADDR + i + 1, 0);
+    }
+
+    tableSelReg.bits_0.mssEgressLutSelect = tableID;
+    tableSelReg.bits_0.mssEgressLutAddress = tableIndex;
+
+    readWriteReg.bits_0.mssEgressLutRead = 0;
+    readWriteReg.bits_0.mssEgressLutWrite = 1;
+
+    mdioWrite(hw, MMD_GLOBAL, mssEgressLutAddressControlRegister_ADDR, tableSelReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssEgressLutControlRegister_ADDR, readWriteReg.word_0);
+
+    return 0;
+}
+
+static
+int GetRawSECEgressRecordVal(struct aq_hw_s *hw, uint16_t* packedRecVal, uint8_t numWords, uint8_t tableID, uint16_t tableIndex)
+{
+    struct mssEgressLutAddressControlRegister_t tableSelReg;
+    struct mssEgressLutControlRegister_t readWriteReg;
+
+    unsigned int i;
+
+    tableSelReg.bits_0.mssEgressLutSelect = tableID;
+    tableSelReg.bits_0.mssEgressLutAddress = tableIndex;
+
+    readWriteReg.bits_0.mssEgressLutRead = 1;
+    readWriteReg.bits_0.mssEgressLutWrite = 0;
+
+    mdioWrite(hw, MMD_GLOBAL, mssEgressLutAddressControlRegister_ADDR, tableSelReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssEgressLutControlRegister_ADDR, readWriteReg.word_0);
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * numWords);
+
+    for (i = 0; i < numWords; i += 2)
+    {
+        mdioRead(hw, MMD_GLOBAL, mssEgressLutDataControlRegister_ADDR + i, &packedRecVal[i]);
+        mdioRead(hw, MMD_GLOBAL, mssEgressLutDataControlRegister_ADDR + i + 1, &packedRecVal[i + 1]);
+    }
+
+    return 0;
+}
+
+int AQ_API_SetIngressPreCTLFRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressPreCTLFRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[6];
+
+    if (tableIndex >= NUMROWS_INGRESSPRECTLFRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 6);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->sa_da[0] >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->sa_da[0] >> 16) & 0xFFFF) << 0);
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->sa_da[1] >> 0) & 0xFFFF) << 0);
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->eth_type >> 0) & 0xFFFF) << 0);
+    packedRecVal[4] = (packedRecVal[4] & 0x0000) | (((rec->match_mask >> 0) & 0xFFFF) << 0);
+    packedRecVal[5] = (packedRecVal[5] & 0xFFF0) | (((rec->match_type >> 0) & 0xF) << 0);
+    packedRecVal[5] = (packedRecVal[5] & 0xFFEF) | (((rec->action >> 0) & 0x1) << 4);
+
+    SetRawSECIngressRecordVal(hw, packedRecVal, 6, 0, ROWOFFSET_INGRESSPRECTLFRECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetIngressPreCTLFRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressPreCTLFRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[6];
+
+    if (tableIndex >= NUMROWS_INGRESSPRECTLFRECORD)
+        return -EINVAL;
+
+    if ((tableIndex % 2) > 0)
+    {
+        GetRawSECIngressRecordVal(hw, packedRecVal, 6, 0, ROWOFFSET_INGRESSPRECTLFRECORD + tableIndex - 1);
+    }
+
+    memset(rec, 0, sizeof(AQ_API_SEC_IngressPreCTLFRecord));
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 6, 0, ROWOFFSET_INGRESSPRECTLFRECORD + tableIndex);
+
+    rec->sa_da[0] = (rec->sa_da[0] & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->sa_da[0] = (rec->sa_da[0] & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->sa_da[1] = (rec->sa_da[1] & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+
+    rec->eth_type = (rec->eth_type & 0xFFFF0000) | (((packedRecVal[3] >> 0) & 0xFFFF) << 0);
+
+    rec->match_mask = (rec->match_mask & 0xFFFF0000) | (((packedRecVal[4] >> 0) & 0xFFFF) << 0);
+
+    rec->match_type = (rec->match_type & 0xFFFFFFF0) | (((packedRecVal[5] >> 0) & 0xF) << 0);
+
+    rec->action = (rec->action & 0xFFFFFFFE) | (((packedRecVal[5] >> 4) & 0x1) << 0);
+
+    return 0;
+}
+
+int AQ_API_SetIngressPreClassRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressPreClassRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[20];
+
+    if (tableIndex >= NUMROWS_INGRESSPRECLASSRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 20);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->sci[0] >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->sci[0] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->sci[1] >> 0) & 0xFFFF) << 0);
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->sci[1] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xFF00) | (((rec->tci >> 0) & 0xFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x00FF) | (((rec->encr_offset >> 0) & 0xFF) << 8);
+
+    packedRecVal[5] = (packedRecVal[5] & 0x0000) | (((rec->eth_type >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[6] = (packedRecVal[6] & 0x0000) | (((rec->snap[0] >> 0) & 0xFFFF) << 0);
+    packedRecVal[7] = (packedRecVal[7] & 0x0000) | (((rec->snap[0] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[8] = (packedRecVal[8] & 0xFF00) | (((rec->snap[1] >> 0) & 0xFF) << 0);
+
+    packedRecVal[8] = (packedRecVal[8] & 0x00FF) | (((rec->llc >> 0) & 0xFF) << 8);
+    packedRecVal[9] = (packedRecVal[9] & 0x0000) | (((rec->llc >> 8) & 0xFFFF) << 0);
+
+    packedRecVal[10] = (packedRecVal[10] & 0x0000) | (((rec->mac_sa[0] >> 0) & 0xFFFF) << 0);
+    packedRecVal[11] = (packedRecVal[11] & 0x0000) | (((rec->mac_sa[0] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[12] = (packedRecVal[12] & 0x0000) | (((rec->mac_sa[1] >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[13] = (packedRecVal[13] & 0x0000) | (((rec->mac_da[0] >> 0) & 0xFFFF) << 0);
+    packedRecVal[14] = (packedRecVal[14] & 0x0000) | (((rec->mac_da[0] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[15] = (packedRecVal[15] & 0x0000) | (((rec->mac_da[1] >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[16] = (packedRecVal[16] & 0xFFFE) | (((rec->lpbk_packet >> 0) & 0x1) << 0);
+
+    packedRecVal[16] = (packedRecVal[16] & 0xFFF9) | (((rec->an_mask >> 0) & 0x3) << 1);
+
+    packedRecVal[16] = (packedRecVal[16] & 0xFE07) | (((rec->tci_mask >> 0) & 0x3F) << 3);
+
+    packedRecVal[16] = (packedRecVal[16] & 0x01FF) | (((rec->sci_mask >> 0) & 0x7F) << 9);
+    packedRecVal[17] = (packedRecVal[17] & 0xFFFE) | (((rec->sci_mask >> 7) & 0x1) << 0);
+
+    packedRecVal[17] = (packedRecVal[17] & 0xFFF9) | (((rec->eth_type_mask >> 0) & 0x3) << 1);
+
+    packedRecVal[17] = (packedRecVal[17] & 0xFF07) | (((rec->snap_mask >> 0) & 0x1F) << 3);
+
+    packedRecVal[17] = (packedRecVal[17] & 0xF8FF) | (((rec->llc_mask >> 0) & 0x7) << 8);
+
+    packedRecVal[17] = (packedRecVal[17] & 0xF7FF) | (((rec->_802_2_encapsulate >> 0) & 0x1) << 11);
+
+    packedRecVal[17] = (packedRecVal[17] & 0x0FFF) | (((rec->sa_mask >> 0) & 0xF) << 12);
+    packedRecVal[18] = (packedRecVal[18] & 0xFFFC) | (((rec->sa_mask >> 4) & 0x3) << 0);
+
+    packedRecVal[18] = (packedRecVal[18] & 0xFF03) | (((rec->da_mask >> 0) & 0x3F) << 2);
+
+    packedRecVal[18] = (packedRecVal[18] & 0xFEFF) | (((rec->lpbk_mask >> 0) & 0x1) << 8);
+
+    packedRecVal[18] = (packedRecVal[18] & 0xC1FF) | (((rec->sc_idx >> 0) & 0x1F) << 9);
+
+    packedRecVal[18] = (packedRecVal[18] & 0xBFFF) | (((rec->proc_dest >> 0) & 0x1) << 14);
+
+    packedRecVal[18] = (packedRecVal[18] & 0x7FFF) | (((rec->action >> 0) & 0x1) << 15);
+    packedRecVal[19] = (packedRecVal[19] & 0xFFFE) | (((rec->action >> 1) & 0x1) << 0);
+
+    packedRecVal[19] = (packedRecVal[19] & 0xFFFD) | (((rec->ctrl_unctrl >> 0) & 0x1) << 1);
+
+    packedRecVal[19] = (packedRecVal[19] & 0xFFFB) | (((rec->sci_from_table >> 0) & 0x1) << 2);
+
+    packedRecVal[19] = (packedRecVal[19] & 0xFF87) | (((rec->reserved >> 0) & 0xF) << 3);
+
+    packedRecVal[19] = (packedRecVal[19] & 0xFF7F) | (((rec->valid >> 0) & 0x1) << 7);
+
+    SetRawSECIngressRecordVal(hw, packedRecVal, 20, 1, ROWOFFSET_INGRESSPRECLASSRECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetIngressPreClassRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressPreClassRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[20];
+
+    if (tableIndex >= NUMROWS_INGRESSPRECLASSRECORD)
+        return -EINVAL;
+
+    if ((tableIndex % 2) > 0)
+    {
+        GetRawSECIngressRecordVal(hw, packedRecVal, 20, 1, 
+            ROWOFFSET_INGRESSPRECLASSRECORD + tableIndex - 1);
+    }
+
+    memset(rec, 0, sizeof(AQ_API_SEC_IngressPreClassRecord));
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 20, 1, ROWOFFSET_INGRESSPRECLASSRECORD + tableIndex);
+
+    rec->sci[0] = (rec->sci[0] & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->sci[0] = (rec->sci[0] & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->sci[1] = (rec->sci[1] & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+    rec->sci[1] = (rec->sci[1] & 0x0000FFFF) | (((packedRecVal[3] >> 0) & 0xFFFF) << 16);
+
+    rec->tci = (rec->tci & 0xFFFFFF00) | (((packedRecVal[4] >> 0) & 0xFF) << 0);
+
+    rec->encr_offset = (rec->encr_offset & 0xFFFFFF00) | (((packedRecVal[4] >> 8) & 0xFF) << 0);
+
+    rec->eth_type = (rec->eth_type & 0xFFFF0000) | (((packedRecVal[5] >> 0) & 0xFFFF) << 0);
+
+    rec->snap[0] = (rec->snap[0] & 0xFFFF0000) | (((packedRecVal[6] >> 0) & 0xFFFF) << 0);
+    rec->snap[0] = (rec->snap[0] & 0x0000FFFF) | (((packedRecVal[7] >> 0) & 0xFFFF) << 16);
+
+    rec->snap[1] = (rec->snap[1] & 0xFFFFFF00) | (((packedRecVal[8] >> 0) & 0xFF) << 0);
+
+    rec->llc = (rec->llc & 0xFFFFFF00) | (((packedRecVal[8] >> 8) & 0xFF) << 0);
+    rec->llc = (rec->llc & 0xFF0000FF) | (((packedRecVal[9] >> 0) & 0xFFFF) << 8);
+
+    rec->mac_sa[0] = (rec->mac_sa[0] & 0xFFFF0000) | (((packedRecVal[10] >> 0) & 0xFFFF) << 0);
+    rec->mac_sa[0] = (rec->mac_sa[0] & 0x0000FFFF) | (((packedRecVal[11] >> 0) & 0xFFFF) << 16);
+
+    rec->mac_sa[1] = (rec->mac_sa[1] & 0xFFFF0000) | (((packedRecVal[12] >> 0) & 0xFFFF) << 0);
+
+    rec->mac_da[0] = (rec->mac_da[0] & 0xFFFF0000) | (((packedRecVal[13] >> 0) & 0xFFFF) << 0);
+    rec->mac_da[0] = (rec->mac_da[0] & 0x0000FFFF) | (((packedRecVal[14] >> 0) & 0xFFFF) << 16);
+
+    rec->mac_da[1] = (rec->mac_da[1] & 0xFFFF0000) | (((packedRecVal[15] >> 0) & 0xFFFF) << 0);
+
+    rec->lpbk_packet = (rec->lpbk_packet & 0xFFFFFFFE) | (((packedRecVal[16] >> 0) & 0x1) << 0);
+
+    rec->an_mask = (rec->an_mask & 0xFFFFFFFC) | (((packedRecVal[16] >> 1) & 0x3) << 0);
+
+    rec->tci_mask = (rec->tci_mask & 0xFFFFFFC0) | (((packedRecVal[16] >> 3) & 0x3F) << 0);
+
+    rec->sci_mask = (rec->sci_mask & 0xFFFFFF80) | (((packedRecVal[16] >> 9) & 0x7F) << 0);
+    rec->sci_mask = (rec->sci_mask & 0xFFFFFF7F) | (((packedRecVal[17] >> 0) & 0x1) << 7);
+
+    rec->eth_type_mask = (rec->eth_type_mask & 0xFFFFFFFC) | (((packedRecVal[17] >> 1) & 0x3) << 0);
+
+    rec->snap_mask = (rec->snap_mask & 0xFFFFFFE0) | (((packedRecVal[17] >> 3) & 0x1F) << 0);
+
+    rec->llc_mask = (rec->llc_mask & 0xFFFFFFF8) | (((packedRecVal[17] >> 8) & 0x7) << 0);
+
+    rec->_802_2_encapsulate = (rec->_802_2_encapsulate & 0xFFFFFFFE) | (((packedRecVal[17] >> 11) & 0x1) << 0);
+
+    rec->sa_mask = (rec->sa_mask & 0xFFFFFFF0) | (((packedRecVal[17] >> 12) & 0xF) << 0);
+    rec->sa_mask = (rec->sa_mask & 0xFFFFFFCF) | (((packedRecVal[18] >> 0) & 0x3) << 4);
+
+    rec->da_mask = (rec->da_mask & 0xFFFFFFC0) | (((packedRecVal[18] >> 2) & 0x3F) << 0);
+
+    rec->lpbk_mask = (rec->lpbk_mask & 0xFFFFFFFE) | (((packedRecVal[18] >> 8) & 0x1) << 0);
+
+    rec->sc_idx = (rec->sc_idx & 0xFFFFFFE0) | (((packedRecVal[18] >> 9) & 0x1F) << 0);
+
+    rec->proc_dest = (rec->proc_dest & 0xFFFFFFFE) | (((packedRecVal[18] >> 14) & 0x1) << 0);
+
+    rec->action = (rec->action & 0xFFFFFFFE) | (((packedRecVal[18] >> 15) & 0x1) << 0);
+    rec->action = (rec->action & 0xFFFFFFFD) | (((packedRecVal[19] >> 0) & 0x1) << 1);
+
+    rec->ctrl_unctrl = (rec->ctrl_unctrl & 0xFFFFFFFE) | (((packedRecVal[19] >> 1) & 0x1) << 0);
+
+    rec->sci_from_table = (rec->sci_from_table & 0xFFFFFFFE) | (((packedRecVal[19] >> 2) & 0x1) << 0);
+
+    rec->reserved = (rec->reserved & 0xFFFFFFF0) | (((packedRecVal[19] >> 3) & 0xF) << 0);
+
+    rec->valid = (rec->valid & 0xFFFFFFFE) | (((packedRecVal[19] >> 7) & 0x1) << 0);
+
+    return 0;
+}
+
+
+int AQ_API_SetIngressSCRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressSCRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_INGRESSSCRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 8);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->stop_time >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->stop_time >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->start_time >> 0) & 0xFFFF) << 0);
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->start_time >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xFFFC) | (((rec->validate_frames >> 0) & 0x3) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xFFFB) | (((rec->replay_protect >> 0) & 0x1) << 2);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x0007) | (((rec->anti_replay_window >> 0) & 0x1FFF) << 3);
+    packedRecVal[5] = (packedRecVal[5] & 0x0000) | (((rec->anti_replay_window >> 13) & 0xFFFF) << 0);
+    packedRecVal[6] = (packedRecVal[6] & 0xFFF8) | (((rec->anti_replay_window >> 29) & 0x7) << 0);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFFF7) | (((rec->receiving >> 0) & 0x1) << 3);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFFEF) | (((rec->fresh >> 0) & 0x1) << 4);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFFDF) | (((rec->an_rol >> 0) & 0x1) << 5);
+
+    packedRecVal[6] = (packedRecVal[6] & 0x003F) | (((rec->reserved >> 0) & 0x3FF) << 6);
+    packedRecVal[7] = (packedRecVal[7] & 0x8000) | (((rec->reserved >> 10) & 0x7FFF) << 0);
+
+    packedRecVal[7] = (packedRecVal[7] & 0x7FFF) | (((rec->valid >> 0) & 0x1) << 15);
+
+    SetRawSECIngressRecordVal(hw, packedRecVal, 8, 3, ROWOFFSET_INGRESSSCRECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetIngressSCRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressSCRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_INGRESSSCRECORD)
+        return -EINVAL;
+
+    memset(rec, 0, sizeof(AQ_API_SEC_IngressSCRecord));
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 8, 3, ROWOFFSET_INGRESSSCRECORD + tableIndex);
+
+    rec->stop_time = (rec->stop_time & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->stop_time = (rec->stop_time & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->start_time = (rec->start_time & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+    rec->start_time = (rec->start_time & 0x0000FFFF) | (((packedRecVal[3] >> 0) & 0xFFFF) << 16);
+
+    rec->validate_frames = (rec->validate_frames & 0xFFFFFFFC) | (((packedRecVal[4] >> 0) & 0x3) << 0);
+
+    rec->replay_protect = (rec->replay_protect & 0xFFFFFFFE) | (((packedRecVal[4] >> 2) & 0x1) << 0);
+
+    rec->anti_replay_window = (rec->anti_replay_window & 0xFFFFE000) | (((packedRecVal[4] >> 3) & 0x1FFF) << 0);
+    rec->anti_replay_window = (rec->anti_replay_window & 0xE0001FFF) | (((packedRecVal[5] >> 0) & 0xFFFF) << 13);
+    rec->anti_replay_window = (rec->anti_replay_window & 0x1FFFFFFF) | (((packedRecVal[6] >> 0) & 0x7) << 29);
+
+    rec->receiving = (rec->receiving & 0xFFFFFFFE) | (((packedRecVal[6] >> 3) & 0x1) << 0);
+
+    rec->fresh = (rec->fresh & 0xFFFFFFFE) | (((packedRecVal[6] >> 4) & 0x1) << 0);
+
+    rec->an_rol = (rec->an_rol & 0xFFFFFFFE) | (((packedRecVal[6] >> 5) & 0x1) << 0);
+
+    rec->reserved = (rec->reserved & 0xFFFFFC00) | (((packedRecVal[6] >> 6) & 0x3FF) << 0);
+    rec->reserved = (rec->reserved & 0xFE0003FF) | (((packedRecVal[7] >> 0) & 0x7FFF) << 10);
+
+    rec->valid = (rec->valid & 0xFFFFFFFE) | (((packedRecVal[7] >> 15) & 0x1) << 0);
+
+    return 0;
+}
+
+int AQ_API_SetIngressSARecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressSARecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_INGRESSSARECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 8);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->stop_time >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->stop_time >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->start_time >> 0) & 0xFFFF) << 0);
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->start_time >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x0000) | (((rec->next_pn >> 0) & 0xFFFF) << 0);
+    packedRecVal[5] = (packedRecVal[5] & 0x0000) | (((rec->next_pn >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFFFE) | (((rec->sat_nextpn >> 0) & 0x1) << 0);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFFFD) | (((rec->in_use >> 0) & 0x1) << 1);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFFFB) | (((rec->fresh >> 0) & 0x1) << 2);
+
+    packedRecVal[6] = (packedRecVal[6] & 0x0007) | (((rec->reserved >> 0) & 0x1FFF) << 3);
+    packedRecVal[7] = (packedRecVal[7] & 0x8000) | (((rec->reserved >> 13) & 0x7FFF) << 0);
+
+    packedRecVal[7] = (packedRecVal[7] & 0x7FFF) | (((rec->valid >> 0) & 0x1) << 15);
+
+    SetRawSECIngressRecordVal(hw, packedRecVal, 8, 3, ROWOFFSET_INGRESSSARECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetIngressSARecord(struct aq_hw_s *hw, AQ_API_SEC_IngressSARecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_INGRESSSARECORD)
+        return -EINVAL;
+
+    memset(rec, 0, sizeof(AQ_API_SEC_IngressSARecord));
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 8, 3, ROWOFFSET_INGRESSSARECORD + tableIndex);
+
+    rec->stop_time = (rec->stop_time & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->stop_time = (rec->stop_time & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->start_time = (rec->start_time & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+    rec->start_time = (rec->start_time & 0x0000FFFF) | (((packedRecVal[3] >> 0) & 0xFFFF) << 16);
+
+    rec->next_pn = (rec->next_pn & 0xFFFF0000) | (((packedRecVal[4] >> 0) & 0xFFFF) << 0);
+    rec->next_pn = (rec->next_pn & 0x0000FFFF) | (((packedRecVal[5] >> 0) & 0xFFFF) << 16);
+
+    rec->sat_nextpn = (rec->sat_nextpn & 0xFFFFFFFE) | (((packedRecVal[6] >> 0) & 0x1) << 0);
+
+    rec->in_use = (rec->in_use & 0xFFFFFFFE) | (((packedRecVal[6] >> 1) & 0x1) << 0);
+
+    rec->fresh = (rec->fresh & 0xFFFFFFFE) | (((packedRecVal[6] >> 2) & 0x1) << 0);
+
+    rec->reserved = (rec->reserved & 0xFFFFE000) | (((packedRecVal[6] >> 3) & 0x1FFF) << 0);
+    rec->reserved = (rec->reserved & 0xF0001FFF) | (((packedRecVal[7] >> 0) & 0x7FFF) << 13);
+
+    rec->valid = (rec->valid & 0xFFFFFFFE) | (((packedRecVal[7] >> 15) & 0x1) << 0);
+
+    return 0;
+}
+
+int AQ_API_SetIngressSAKeyRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressSAKeyRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[18];
+
+    if (tableIndex >= NUMROWS_INGRESSSAKEYRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 18);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->key[0] >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->key[0] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->key[1] >> 0) & 0xFFFF) << 0);
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->key[1] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x0000) | (((rec->key[2] >> 0) & 0xFFFF) << 0);
+    packedRecVal[5] = (packedRecVal[5] & 0x0000) | (((rec->key[2] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[6] = (packedRecVal[6] & 0x0000) | (((rec->key[3] >> 0) & 0xFFFF) << 0);
+    packedRecVal[7] = (packedRecVal[7] & 0x0000) | (((rec->key[3] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[8] = (packedRecVal[8] & 0x0000) | (((rec->key[4] >> 0) & 0xFFFF) << 0);
+    packedRecVal[9] = (packedRecVal[9] & 0x0000) | (((rec->key[4] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[10] = (packedRecVal[10] & 0x0000) | (((rec->key[5] >> 0) & 0xFFFF) << 0);
+    packedRecVal[11] = (packedRecVal[11] & 0x0000) | (((rec->key[5] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[12] = (packedRecVal[12] & 0x0000) | (((rec->key[6] >> 0) & 0xFFFF) << 0);
+    packedRecVal[13] = (packedRecVal[13] & 0x0000) | (((rec->key[6] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[14] = (packedRecVal[14] & 0x0000) | (((rec->key[7] >> 0) & 0xFFFF) << 0);
+    packedRecVal[15] = (packedRecVal[15] & 0x0000) | (((rec->key[7] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[16] = (packedRecVal[16] & 0xFFFC) | (((rec->key_len >> 0) & 0x3) << 0);
+
+    SetRawSECIngressRecordVal(hw, packedRecVal, 18, 2, ROWOFFSET_INGRESSSAKEYRECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetIngressSAKeyRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressSAKeyRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[18];
+
+    if (tableIndex >= NUMROWS_INGRESSSAKEYRECORD)
+        return -EINVAL;
+
+    memset(rec, 0, sizeof(AQ_API_SEC_IngressSAKeyRecord));
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 18, 2, ROWOFFSET_INGRESSSAKEYRECORD + tableIndex);
+
+    rec->key[0] = (rec->key[0] & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->key[0] = (rec->key[0] & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->key[1] = (rec->key[1] & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+    rec->key[1] = (rec->key[1] & 0x0000FFFF) | (((packedRecVal[3] >> 0) & 0xFFFF) << 16);
+
+    rec->key[2] = (rec->key[2] & 0xFFFF0000) | (((packedRecVal[4] >> 0) & 0xFFFF) << 0);
+    rec->key[2] = (rec->key[2] & 0x0000FFFF) | (((packedRecVal[5] >> 0) & 0xFFFF) << 16);
+
+    rec->key[3] = (rec->key[3] & 0xFFFF0000) | (((packedRecVal[6] >> 0) & 0xFFFF) << 0);
+    rec->key[3] = (rec->key[3] & 0x0000FFFF) | (((packedRecVal[7] >> 0) & 0xFFFF) << 16);
+
+    rec->key[4] = (rec->key[4] & 0xFFFF0000) | (((packedRecVal[8] >> 0) & 0xFFFF) << 0);
+    rec->key[4] = (rec->key[4] & 0x0000FFFF) | (((packedRecVal[9] >> 0) & 0xFFFF) << 16);
+
+    rec->key[5] = (rec->key[5] & 0xFFFF0000) | (((packedRecVal[10] >> 0) & 0xFFFF) << 0);
+    rec->key[5] = (rec->key[5] & 0x0000FFFF) | (((packedRecVal[11] >> 0) & 0xFFFF) << 16);
+
+    rec->key[6] = (rec->key[6] & 0xFFFF0000) | (((packedRecVal[12] >> 0) & 0xFFFF) << 0);
+    rec->key[6] = (rec->key[6] & 0x0000FFFF) | (((packedRecVal[13] >> 0) & 0xFFFF) << 16);
+
+    rec->key[7] = (rec->key[7] & 0xFFFF0000) | (((packedRecVal[14] >> 0) & 0xFFFF) << 0);
+    rec->key[7] = (rec->key[7] & 0x0000FFFF) | (((packedRecVal[15] >> 0) & 0xFFFF) << 16);
+
+    rec->key_len = (rec->key_len & 0xFFFFFFFC) | (((packedRecVal[16] >> 0) & 0x3) << 0);
+
+    return 0;
+}
+
+int AQ_API_SetIngressPostClassRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressPostClassRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_INGRESSPOSTCLASSRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 8);
+
+    packedRecVal[0] = (packedRecVal[0] & 0xFF00) | (((rec->byte0 >> 0) & 0xFF) << 0);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x00FF) | (((rec->byte1 >> 0) & 0xFF) << 8);
+
+    packedRecVal[1] = (packedRecVal[1] & 0xFF00) | (((rec->byte2 >> 0) & 0xFF) << 0);
+
+    packedRecVal[1] = (packedRecVal[1] & 0x00FF) | (((rec->byte3 >> 0) & 0xFF) << 8);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->eth_type >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[3] = (packedRecVal[3] & 0xFFFE) | (((rec->eth_type_valid >> 0) & 0x1) << 0);
+
+    packedRecVal[3] = (packedRecVal[3] & 0xE001) | (((rec->vlan_id >> 0) & 0xFFF) << 1);
+
+    packedRecVal[3] = (packedRecVal[3] & 0x1FFF) | (((rec->vlan_up >> 0) & 0x7) << 13);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xFFFE) | (((rec->vlan_valid >> 0) & 0x1) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xFFC1) | (((rec->sai >> 0) & 0x1F) << 1);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xFFBF) | (((rec->sai_hit >> 0) & 0x1) << 6);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xF87F) | (((rec->eth_type_mask >> 0) & 0xF) << 7);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x07FF) | (((rec->byte3_location >> 0) & 0x1F) << 11);
+    packedRecVal[5] = (packedRecVal[5] & 0xFFFE) | (((rec->byte3_location >> 5) & 0x1) << 0);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFFF9) | (((rec->byte3_mask >> 0) & 0x3) << 1);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFE07) | (((rec->byte2_location >> 0) & 0x3F) << 3);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xF9FF) | (((rec->byte2_mask >> 0) & 0x3) << 9);
+
+    packedRecVal[5] = (packedRecVal[5] & 0x07FF) | (((rec->byte1_location >> 0) & 0x1F) << 11);
+    packedRecVal[6] = (packedRecVal[6] & 0xFFFE) | (((rec->byte1_location >> 5) & 0x1) << 0);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFFF9) | (((rec->byte1_mask >> 0) & 0x3) << 1);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFE07) | (((rec->byte0_location >> 0) & 0x3F) << 3);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xF9FF) | (((rec->byte0_mask >> 0) & 0x3) << 9);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xE7FF) | (((rec->eth_type_valid_mask >> 0) & 0x3) << 11);
+
+    packedRecVal[6] = (packedRecVal[6] & 0x1FFF) | (((rec->vlan_id_mask >> 0) & 0x7) << 13);
+    packedRecVal[7] = (packedRecVal[7] & 0xFFFE) | (((rec->vlan_id_mask >> 3) & 0x1) << 0);
+
+    packedRecVal[7] = (packedRecVal[7] & 0xFFF9) | (((rec->vlan_up_mask >> 0) & 0x3) << 1);
+
+    packedRecVal[7] = (packedRecVal[7] & 0xFFE7) | (((rec->vlan_valid_mask >> 0) & 0x3) << 3);
+
+    packedRecVal[7] = (packedRecVal[7] & 0xFF9F) | (((rec->sai_mask >> 0) & 0x3) << 5);
+
+    packedRecVal[7] = (packedRecVal[7] & 0xFE7F) | (((rec->sai_hit_mask >> 0) & 0x3) << 7);
+
+    packedRecVal[7] = (packedRecVal[7] & 0xFDFF) | (((rec->firstlevel_actions >> 0) & 0x1) << 9);
+
+    packedRecVal[7] = (packedRecVal[7] & 0xFBFF) | (((rec->secondlevel_actions >> 0) & 0x1) << 10);
+
+    packedRecVal[7] = (packedRecVal[7] & 0x87FF) | (((rec->reserved >> 0) & 0xF) << 11);
+
+    packedRecVal[7] = (packedRecVal[7] & 0x7FFF) | (((rec->valid >> 0) & 0x1) << 15);
+
+    SetRawSECIngressRecordVal(hw, packedRecVal, 8, 4, ROWOFFSET_INGRESSPOSTCLASSRECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetIngressPostClassRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressPostClassRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_INGRESSPOSTCLASSRECORD)
+        return -EINVAL;
+
+    if ((tableIndex % 2) > 0)
+    {
+        GetRawSECIngressRecordVal(hw, packedRecVal, 8, 4, ROWOFFSET_INGRESSPOSTCLASSRECORD + tableIndex - 1);
+    }
+
+    memset(rec, 0, sizeof(AQ_API_SEC_IngressPostClassRecord));
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 8, 4, ROWOFFSET_INGRESSPOSTCLASSRECORD + tableIndex);
+
+    rec->byte0 = (rec->byte0 & 0xFFFFFF00) | (((packedRecVal[0] >> 0) & 0xFF) << 0);
+
+    rec->byte1 = (rec->byte1 & 0xFFFFFF00) | (((packedRecVal[0] >> 8) & 0xFF) << 0);
+
+    rec->byte2 = (rec->byte2 & 0xFFFFFF00) | (((packedRecVal[1] >> 0) & 0xFF) << 0);
+
+    rec->byte3 = (rec->byte3 & 0xFFFFFF00) | (((packedRecVal[1] >> 8) & 0xFF) << 0);
+
+    rec->eth_type = (rec->eth_type & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+
+    rec->eth_type_valid = (rec->eth_type_valid & 0xFFFFFFFE) | (((packedRecVal[3] >> 0) & 0x1) << 0);
+
+    rec->vlan_id = (rec->vlan_id & 0xFFFFF000) | (((packedRecVal[3] >> 1) & 0xFFF) << 0);
+
+    rec->vlan_up = (rec->vlan_up & 0xFFFFFFF8) | (((packedRecVal[3] >> 13) & 0x7) << 0);
+
+    rec->vlan_valid = (rec->vlan_valid & 0xFFFFFFFE) | (((packedRecVal[4] >> 0) & 0x1) << 0);
+
+    rec->sai = (rec->sai & 0xFFFFFFE0) | (((packedRecVal[4] >> 1) & 0x1F) << 0);
+
+    rec->sai_hit = (rec->sai_hit & 0xFFFFFFFE) | (((packedRecVal[4] >> 6) & 0x1) << 0);
+
+    rec->eth_type_mask = (rec->eth_type_mask & 0xFFFFFFF0) | (((packedRecVal[4] >> 7) & 0xF) << 0);
+
+    rec->byte3_location = (rec->byte3_location & 0xFFFFFFE0) | (((packedRecVal[4] >> 11) & 0x1F) << 0);
+    rec->byte3_location = (rec->byte3_location & 0xFFFFFFDF) | (((packedRecVal[5] >> 0) & 0x1) << 5);
+
+    rec->byte3_mask = (rec->byte3_mask & 0xFFFFFFFC) | (((packedRecVal[5] >> 1) & 0x3) << 0);
+
+    rec->byte2_location = (rec->byte2_location & 0xFFFFFFC0) | (((packedRecVal[5] >> 3) & 0x3F) << 0);
+
+    rec->byte2_mask = (rec->byte2_mask & 0xFFFFFFFC) | (((packedRecVal[5] >> 9) & 0x3) << 0);
+
+    rec->byte1_location = (rec->byte1_location & 0xFFFFFFE0) | (((packedRecVal[5] >> 11) & 0x1F) << 0);
+    rec->byte1_location = (rec->byte1_location & 0xFFFFFFDF) | (((packedRecVal[6] >> 0) & 0x1) << 5);
+
+    rec->byte1_mask = (rec->byte1_mask & 0xFFFFFFFC) | (((packedRecVal[6] >> 1) & 0x3) << 0);
+
+    rec->byte0_location = (rec->byte0_location & 0xFFFFFFC0) | (((packedRecVal[6] >> 3) & 0x3F) << 0);
+
+    rec->byte0_mask = (rec->byte0_mask & 0xFFFFFFFC) | (((packedRecVal[6] >> 9) & 0x3) << 0);
+
+    rec->eth_type_valid_mask = (rec->eth_type_valid_mask & 0xFFFFFFFC) | (((packedRecVal[6] >> 11) & 0x3) << 0);
+
+    rec->vlan_id_mask = (rec->vlan_id_mask & 0xFFFFFFF8) | (((packedRecVal[6] >> 13) & 0x7) << 0);
+    rec->vlan_id_mask = (rec->vlan_id_mask & 0xFFFFFFF7) | (((packedRecVal[7] >> 0) & 0x1) << 3);
+
+    rec->vlan_up_mask = (rec->vlan_up_mask & 0xFFFFFFFC) | (((packedRecVal[7] >> 1) & 0x3) << 0);
+
+    rec->vlan_valid_mask = (rec->vlan_valid_mask & 0xFFFFFFFC) | (((packedRecVal[7] >> 3) & 0x3) << 0);
+
+    rec->sai_mask = (rec->sai_mask & 0xFFFFFFFC) | (((packedRecVal[7] >> 5) & 0x3) << 0);
+
+    rec->sai_hit_mask = (rec->sai_hit_mask & 0xFFFFFFFC) | (((packedRecVal[7] >> 7) & 0x3) << 0);
+
+    rec->firstlevel_actions = (rec->firstlevel_actions & 0xFFFFFFFE) | (((packedRecVal[7] >> 9) & 0x1) << 0);
+
+    rec->secondlevel_actions = (rec->secondlevel_actions & 0xFFFFFFFE) | (((packedRecVal[7] >> 10) & 0x1) << 0);
+
+    rec->reserved = (rec->reserved & 0xFFFFFFF0) | (((packedRecVal[7] >> 11) & 0xF) << 0);
+
+    rec->valid = (rec->valid & 0xFFFFFFFE) | (((packedRecVal[7] >> 15) & 0x1) << 0);
+
+    return 0;
+}
+
+
+int AQ_API_SetIngressPostCTLFRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressPostCTLFRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[6];
+
+    if (tableIndex >= NUMROWS_INGRESSPOSTCTLFRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 6);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->sa_da[0] >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->sa_da[0] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->sa_da[1] >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->eth_type >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x0000) | (((rec->match_mask >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFFF0) | (((rec->match_type >> 0) & 0xF) << 0);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFFEF) | (((rec->action >> 0) & 0x1) << 4);
+
+    SetRawSECIngressRecordVal(hw, packedRecVal, 6, 5, ROWOFFSET_INGRESSPOSTCTLFRECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetIngressPostCTLFRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressPostCTLFRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[6];
+
+    if (tableIndex >= NUMROWS_INGRESSPOSTCTLFRECORD)
+        return -EINVAL;
+
+    if ((tableIndex % 2) > 0)
+    {
+        GetRawSECIngressRecordVal(hw, packedRecVal, 6, 5, ROWOFFSET_INGRESSPOSTCTLFRECORD + tableIndex - 1);
+    }
+
+    memset(rec, 0, sizeof(AQ_API_SEC_IngressPostCTLFRecord));
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 6, 5, ROWOFFSET_INGRESSPOSTCTLFRECORD + tableIndex);
+
+    rec->sa_da[0] = (rec->sa_da[0] & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->sa_da[0] = (rec->sa_da[0] & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->sa_da[1] = (rec->sa_da[1] & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+
+    rec->eth_type = (rec->eth_type & 0xFFFF0000) | (((packedRecVal[3] >> 0) & 0xFFFF) << 0);
+
+    rec->match_mask = (rec->match_mask & 0xFFFF0000) | (((packedRecVal[4] >> 0) & 0xFFFF) << 0);
+
+    rec->match_type = (rec->match_type & 0xFFFFFFF0) | (((packedRecVal[5] >> 0) & 0xF) << 0);
+
+    rec->action = (rec->action & 0xFFFFFFFE) | (((packedRecVal[5] >> 4) & 0x1) << 0);
+
+    return 0;
+}
+
+int AQ_API_SetEgressCTLFRecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressCTLFRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[6];
+
+    if (tableIndex >= NUMROWS_EGRESSCTLFRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 6);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->sa_da[0] >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->sa_da[0] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->sa_da[1] >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->eth_type >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x0000) | (((rec->match_mask >> 0) & 0xFFFF) << 0);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFFF0) | (((rec->match_type >> 0) & 0xF) << 0);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFFEF) | (((rec->action >> 0) & 0x1) << 4);
+
+    SetRawSECEgressRecordVal(hw, packedRecVal, 6, 0, ROWOFFSET_EGRESSCTLFRECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetEgressCTLFRecord(struct aq_hw_s *hw, AQ_API_SEC_EgressCTLFRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[6];
+
+    if (tableIndex >= NUMROWS_EGRESSCTLFRECORD)
+        return -EINVAL;
+
+    if ((tableIndex % 2) > 0)
+    {
+        GetRawSECEgressRecordVal(hw, packedRecVal, 6, 0, ROWOFFSET_EGRESSCTLFRECORD + tableIndex - 1);
+    }
+
+    memset(rec, 0, sizeof(AQ_API_SEC_EgressCTLFRecord));
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 6, 0, ROWOFFSET_EGRESSCTLFRECORD + tableIndex);
+
+    rec->sa_da[0] = (rec->sa_da[0] & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->sa_da[0] = (rec->sa_da[0] & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->sa_da[1] = (rec->sa_da[1] & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+
+    rec->eth_type = (rec->eth_type & 0xFFFF0000) | (((packedRecVal[3] >> 0) & 0xFFFF) << 0);
+
+    rec->match_mask = (rec->match_mask & 0xFFFF0000) | (((packedRecVal[4] >> 0) & 0xFFFF) << 0);
+
+    rec->match_type = (rec->match_type & 0xFFFFFFF0) | (((packedRecVal[5] >> 0) & 0xF) << 0);
+
+    rec->action = (rec->action & 0xFFFFFFFE) | (((packedRecVal[5] >> 4) & 0x1) << 0);
+
+    return 0;
+}
+
+int AQ_API_SetEgressClassRecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressClassRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[28];
+
+    if (tableIndex >= NUMROWS_EGRESSCLASSRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 28);
+
+    packedRecVal[0] = (packedRecVal[0] & 0xF000) | (((rec->vlan_id >> 0) & 0xFFF) << 0);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x8FFF) | (((rec->vlan_up >> 0) & 0x7) << 12);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x7FFF) | (((rec->vlan_valid >> 0) & 0x1) << 15);
+
+    packedRecVal[1] = (packedRecVal[1] & 0xFF00) | (((rec->byte3 >> 0) & 0xFF) << 0);
+
+    packedRecVal[1] = (packedRecVal[1] & 0x00FF) | (((rec->byte2 >> 0) & 0xFF) << 8);
+
+    packedRecVal[2] = (packedRecVal[2] & 0xFF00) | (((rec->byte1 >> 0) & 0xFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x00FF) | (((rec->byte0 >> 0) & 0xFF) << 8);
+
+    packedRecVal[3] = (packedRecVal[3] & 0xFF00) | (((rec->tci >> 0) & 0xFF) << 0);
+
+    packedRecVal[3] = (packedRecVal[3] & 0x00FF) | (((rec->sci[0] >> 0) & 0xFF) << 8);
+    packedRecVal[4] = (packedRecVal[4] & 0x0000) | (((rec->sci[0] >> 8) & 0xFFFF) << 0);
+    packedRecVal[5] = (packedRecVal[5] & 0xFF00) | (((rec->sci[0] >> 24) & 0xFF) << 0);
+
+    packedRecVal[5] = (packedRecVal[5] & 0x00FF) | (((rec->sci[1] >> 0) & 0xFF) << 8);
+    packedRecVal[6] = (packedRecVal[6] & 0x0000) | (((rec->sci[1] >> 8) & 0xFFFF) << 0);
+    packedRecVal[7] = (packedRecVal[7] & 0xFF00) | (((rec->sci[1] >> 24) & 0xFF) << 0);
+
+    packedRecVal[7] = (packedRecVal[7] & 0x00FF) | (((rec->eth_type >> 0) & 0xFF) << 8);
+    packedRecVal[8] = (packedRecVal[8] & 0xFF00) | (((rec->eth_type >> 8) & 0xFF) << 0);
+
+    packedRecVal[8] = (packedRecVal[8] & 0x00FF) | (((rec->snap[0] >> 0) & 0xFF) << 8);
+    packedRecVal[9] = (packedRecVal[9] & 0x0000) | (((rec->snap[0] >> 8) & 0xFFFF) << 0);
+    packedRecVal[10] = (packedRecVal[10] & 0xFF00) | (((rec->snap[0] >> 24) & 0xFF) << 0);
+
+    packedRecVal[10] = (packedRecVal[10] & 0x00FF) | (((rec->snap[1] >> 0) & 0xFF) << 8);
+
+    packedRecVal[11] = (packedRecVal[11] & 0x0000) | (((rec->llc >> 0) & 0xFFFF) << 0);
+    packedRecVal[12] = (packedRecVal[12] & 0xFF00) | (((rec->llc >> 16) & 0xFF) << 0);
+
+    packedRecVal[12] = (packedRecVal[12] & 0x00FF) | (((rec->mac_sa[0] >> 0) & 0xFF) << 8);
+    packedRecVal[13] = (packedRecVal[13] & 0x0000) | (((rec->mac_sa[0] >> 8) & 0xFFFF) << 0);
+    packedRecVal[14] = (packedRecVal[14] & 0xFF00) | (((rec->mac_sa[0] >> 24) & 0xFF) << 0);
+
+    packedRecVal[14] = (packedRecVal[14] & 0x00FF) | (((rec->mac_sa[1] >> 0) & 0xFF) << 8);
+    packedRecVal[15] = (packedRecVal[15] & 0xFF00) | (((rec->mac_sa[1] >> 8) & 0xFF) << 0);
+
+    packedRecVal[15] = (packedRecVal[15] & 0x00FF) | (((rec->mac_da[0] >> 0) & 0xFF) << 8);
+    packedRecVal[16] = (packedRecVal[16] & 0x0000) | (((rec->mac_da[0] >> 8) & 0xFFFF) << 0);
+    packedRecVal[17] = (packedRecVal[17] & 0xFF00) | (((rec->mac_da[0] >> 24) & 0xFF) << 0);
+
+    packedRecVal[17] = (packedRecVal[17] & 0x00FF) | (((rec->mac_da[1] >> 0) & 0xFF) << 8);
+    packedRecVal[18] = (packedRecVal[18] & 0xFF00) | (((rec->mac_da[1] >> 8) & 0xFF) << 0);
+
+    packedRecVal[18] = (packedRecVal[18] & 0x00FF) | (((rec->pn >> 0) & 0xFF) << 8);
+    packedRecVal[19] = (packedRecVal[19] & 0x0000) | (((rec->pn >> 8) & 0xFFFF) << 0);
+    packedRecVal[20] = (packedRecVal[20] & 0xFF00) | (((rec->pn >> 24) & 0xFF) << 0);
+
+    packedRecVal[20] = (packedRecVal[20] & 0xC0FF) | (((rec->byte3_location >> 0) & 0x3F) << 8);
+
+    packedRecVal[20] = (packedRecVal[20] & 0xBFFF) | (((rec->byte3_mask >> 0) & 0x1) << 14);
+
+    packedRecVal[20] = (packedRecVal[20] & 0x7FFF) | (((rec->byte2_location >> 0) & 0x1) << 15);
+    packedRecVal[21] = (packedRecVal[21] & 0xFFE0) | (((rec->byte2_location >> 1) & 0x1F) << 0);
+
+    packedRecVal[21] = (packedRecVal[21] & 0xFFDF) | (((rec->byte2_mask >> 0) & 0x1) << 5);
+
+    packedRecVal[21] = (packedRecVal[21] & 0xF03F) | (((rec->byte1_location >> 0) & 0x3F) << 6);
+
+    packedRecVal[21] = (packedRecVal[21] & 0xEFFF) | (((rec->byte1_mask >> 0) & 0x1) << 12);
+
+    packedRecVal[21] = (packedRecVal[21] & 0x1FFF) | (((rec->byte0_location >> 0) & 0x7) << 13);
+    packedRecVal[22] = (packedRecVal[22] & 0xFFF8) | (((rec->byte0_location >> 3) & 0x7) << 0);
+
+    packedRecVal[22] = (packedRecVal[22] & 0xFFF7) | (((rec->byte0_mask >> 0) & 0x1) << 3);
+
+    packedRecVal[22] = (packedRecVal[22] & 0xFFCF) | (((rec->vlan_id_mask >> 0) & 0x3) << 4);
+
+    packedRecVal[22] = (packedRecVal[22] & 0xFFBF) | (((rec->vlan_up_mask >> 0) & 0x1) << 6);
+
+    packedRecVal[22] = (packedRecVal[22] & 0xFF7F) | (((rec->vlan_valid_mask >> 0) & 0x1) << 7);
+
+    packedRecVal[22] = (packedRecVal[22] & 0x00FF) | (((rec->tci_mask >> 0) & 0xFF) << 8);
+
+    packedRecVal[23] = (packedRecVal[23] & 0xFF00) | (((rec->sci_mask >> 0) & 0xFF) << 0);
+
+    packedRecVal[23] = (packedRecVal[23] & 0xFCFF) | (((rec->eth_type_mask >> 0) & 0x3) << 8);
+
+    packedRecVal[23] = (packedRecVal[23] & 0x83FF) | (((rec->snap_mask >> 0) & 0x1F) << 10);
+
+    packedRecVal[23] = (packedRecVal[23] & 0x7FFF) | (((rec->llc_mask >> 0) & 0x1) << 15);
+    packedRecVal[24] = (packedRecVal[24] & 0xFFFC) | (((rec->llc_mask >> 1) & 0x3) << 0);
+
+    packedRecVal[24] = (packedRecVal[24] & 0xFF03) | (((rec->sa_mask >> 0) & 0x3F) << 2);
+
+    packedRecVal[24] = (packedRecVal[24] & 0xC0FF) | (((rec->da_mask >> 0) & 0x3F) << 8);
+
+    packedRecVal[24] = (packedRecVal[24] & 0x3FFF) | (((rec->pn_mask >> 0) & 0x3) << 14);
+    packedRecVal[25] = (packedRecVal[25] & 0xFFFC) | (((rec->pn_mask >> 2) & 0x3) << 0);
+
+    packedRecVal[25] = (packedRecVal[25] & 0xFFFB) | (((rec->eight02dot2 >> 0) & 0x1) << 2);
+
+    packedRecVal[25] = (packedRecVal[25] & 0xFFF7) | (((rec->tci_sc >> 0) & 0x1) << 3);
+
+    packedRecVal[25] = (packedRecVal[25] & 0xFFEF) | (((rec->tci_87543 >> 0) & 0x1) << 4);
+
+    packedRecVal[25] = (packedRecVal[25] & 0xFFDF) | (((rec->exp_sectag_en >> 0) & 0x1) << 5);
+
+    packedRecVal[25] = (packedRecVal[25] & 0xF83F) | (((rec->sc_idx >> 0) & 0x1F) << 6);
+
+    packedRecVal[25] = (packedRecVal[25] & 0xE7FF) | (((rec->sc_sa >> 0) & 0x3) << 11);
+
+    packedRecVal[25] = (packedRecVal[25] & 0xDFFF) | (((rec->debug >> 0) & 0x1) << 13);
+
+    packedRecVal[25] = (packedRecVal[25] & 0x3FFF) | (((rec->action >> 0) & 0x3) << 14);
+
+    packedRecVal[26] = (packedRecVal[26] & 0xFFF7) | (((rec->valid >> 0) & 0x1) << 3);
+
+    SetRawSECEgressRecordVal(hw, packedRecVal, 28, 1, ROWOFFSET_EGRESSCLASSRECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetEgressClassRecord(struct aq_hw_s *hw, AQ_API_SEC_EgressClassRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[28];
+
+    if (tableIndex >= NUMROWS_EGRESSCLASSRECORD)
+        return -EINVAL;
+
+    if ((tableIndex % 2) > 0) {
+        GetRawSECEgressRecordVal(hw, packedRecVal, 28, 1, ROWOFFSET_EGRESSCLASSRECORD + tableIndex - 1);
+    }
+
+    memset(rec, 0, sizeof(AQ_API_SEC_EgressClassRecord));
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 28, 1, ROWOFFSET_EGRESSCLASSRECORD + tableIndex);
+
+    rec->vlan_id = (rec->vlan_id & 0xFFFFF000) | (((packedRecVal[0] >> 0) & 0xFFF) << 0);
+
+    rec->vlan_up = (rec->vlan_up & 0xFFFFFFF8) | (((packedRecVal[0] >> 12) & 0x7) << 0);
+
+    rec->vlan_valid = (rec->vlan_valid & 0xFFFFFFFE) | (((packedRecVal[0] >> 15) & 0x1) << 0);
+
+    rec->byte3 = (rec->byte3 & 0xFFFFFF00) | (((packedRecVal[1] >> 0) & 0xFF) << 0);
+
+    rec->byte2 = (rec->byte2 & 0xFFFFFF00) | (((packedRecVal[1] >> 8) & 0xFF) << 0);
+
+    rec->byte1 = (rec->byte1 & 0xFFFFFF00) | (((packedRecVal[2] >> 0) & 0xFF) << 0);
+
+    rec->byte0 = (rec->byte0 & 0xFFFFFF00) | (((packedRecVal[2] >> 8) & 0xFF) << 0);
+
+    rec->tci = (rec->tci & 0xFFFFFF00) | (((packedRecVal[3] >> 0) & 0xFF) << 0);
+
+    rec->sci[0] = (rec->sci[0] & 0xFFFFFF00) | (((packedRecVal[3] >> 8) & 0xFF) << 0);
+    rec->sci[0] = (rec->sci[0] & 0xFF0000FF) | (((packedRecVal[4] >> 0) & 0xFFFF) << 8);
+    rec->sci[0] = (rec->sci[0] & 0x00FFFFFF) | (((packedRecVal[5] >> 0) & 0xFF) << 24);
+
+    rec->sci[1] = (rec->sci[1] & 0xFFFFFF00) | (((packedRecVal[5] >> 8) & 0xFF) << 0);
+    rec->sci[1] = (rec->sci[1] & 0xFF0000FF) | (((packedRecVal[6] >> 0) & 0xFFFF) << 8);
+    rec->sci[1] = (rec->sci[1] & 0x00FFFFFF) | (((packedRecVal[7] >> 0) & 0xFF) << 24);
+
+    rec->eth_type = (rec->eth_type & 0xFFFFFF00) | (((packedRecVal[7] >> 8) & 0xFF) << 0);
+    rec->eth_type = (rec->eth_type & 0xFFFF00FF) | (((packedRecVal[8] >> 0) & 0xFF) << 8);
+
+    rec->snap[0] = (rec->snap[0] & 0xFFFFFF00) | (((packedRecVal[8] >> 8) & 0xFF) << 0);
+    rec->snap[0] = (rec->snap[0] & 0xFF0000FF) | (((packedRecVal[9] >> 0) & 0xFFFF) << 8);
+    rec->snap[0] = (rec->snap[0] & 0x00FFFFFF) | (((packedRecVal[10] >> 0) & 0xFF) << 24);
+
+    rec->snap[1] = (rec->snap[1] & 0xFFFFFF00) | (((packedRecVal[10] >> 8) & 0xFF) << 0);
+
+    rec->llc = (rec->llc & 0xFFFF0000) | (((packedRecVal[11] >> 0) & 0xFFFF) << 0);
+    rec->llc = (rec->llc & 0xFF00FFFF) | (((packedRecVal[12] >> 0) & 0xFF) << 16);
+
+    rec->mac_sa[0] = (rec->mac_sa[0] & 0xFFFFFF00) | (((packedRecVal[12] >> 8) & 0xFF) << 0);
+    rec->mac_sa[0] = (rec->mac_sa[0] & 0xFF0000FF) | (((packedRecVal[13] >> 0) & 0xFFFF) << 8);
+    rec->mac_sa[0] = (rec->mac_sa[0] & 0x00FFFFFF) | (((packedRecVal[14] >> 0) & 0xFF) << 24);
+
+    rec->mac_sa[1] = (rec->mac_sa[1] & 0xFFFFFF00) | (((packedRecVal[14] >> 8) & 0xFF) << 0);
+    rec->mac_sa[1] = (rec->mac_sa[1] & 0xFFFF00FF) | (((packedRecVal[15] >> 0) & 0xFF) << 8);
+
+    rec->mac_da[0] = (rec->mac_da[0] & 0xFFFFFF00) | (((packedRecVal[15] >> 8) & 0xFF) << 0);
+    rec->mac_da[0] = (rec->mac_da[0] & 0xFF0000FF) | (((packedRecVal[16] >> 0) & 0xFFFF) << 8);
+    rec->mac_da[0] = (rec->mac_da[0] & 0x00FFFFFF) | (((packedRecVal[17] >> 0) & 0xFF) << 24);
+
+    rec->mac_da[1] = (rec->mac_da[1] & 0xFFFFFF00) | (((packedRecVal[17] >> 8) & 0xFF) << 0);
+    rec->mac_da[1] = (rec->mac_da[1] & 0xFFFF00FF) | (((packedRecVal[18] >> 0) & 0xFF) << 8);
+
+    rec->pn = (rec->pn & 0xFFFFFF00) | (((packedRecVal[18] >> 8) & 0xFF) << 0);
+    rec->pn = (rec->pn & 0xFF0000FF) | (((packedRecVal[19] >> 0) & 0xFFFF) << 8);
+    rec->pn = (rec->pn & 0x00FFFFFF) | (((packedRecVal[20] >> 0) & 0xFF) << 24);
+
+    rec->byte3_location = (rec->byte3_location & 0xFFFFFFC0) | (((packedRecVal[20] >> 8) & 0x3F) << 0);
+
+    rec->byte3_mask = (rec->byte3_mask & 0xFFFFFFFE) | (((packedRecVal[20] >> 14) & 0x1) << 0);
+
+    rec->byte2_location = (rec->byte2_location & 0xFFFFFFFE) | (((packedRecVal[20] >> 15) & 0x1) << 0);
+    rec->byte2_location = (rec->byte2_location & 0xFFFFFFC1) | (((packedRecVal[21] >> 0) & 0x1F) << 1);
+
+    rec->byte2_mask = (rec->byte2_mask & 0xFFFFFFFE) | (((packedRecVal[21] >> 5) & 0x1) << 0);
+
+    rec->byte1_location = (rec->byte1_location & 0xFFFFFFC0) | (((packedRecVal[21] >> 6) & 0x3F) << 0);
+
+    rec->byte1_mask = (rec->byte1_mask & 0xFFFFFFFE) | (((packedRecVal[21] >> 12) & 0x1) << 0);
+
+    rec->byte0_location = (rec->byte0_location & 0xFFFFFFF8) | (((packedRecVal[21] >> 13) & 0x7) << 0);
+    rec->byte0_location = (rec->byte0_location & 0xFFFFFFC7) | (((packedRecVal[22] >> 0) & 0x7) << 3);
+
+    rec->byte0_mask = (rec->byte0_mask & 0xFFFFFFFE) | (((packedRecVal[22] >> 3) & 0x1) << 0);
+
+    rec->vlan_id_mask = (rec->vlan_id_mask & 0xFFFFFFFC) | (((packedRecVal[22] >> 4) & 0x3) << 0);
+
+    rec->vlan_up_mask = (rec->vlan_up_mask & 0xFFFFFFFE) | (((packedRecVal[22] >> 6) & 0x1) << 0);
+
+    rec->vlan_valid_mask = (rec->vlan_valid_mask & 0xFFFFFFFE) | (((packedRecVal[22] >> 7) & 0x1) << 0);
+
+    rec->tci_mask = (rec->tci_mask & 0xFFFFFF00) | (((packedRecVal[22] >> 8) & 0xFF) << 0);
+
+    rec->sci_mask = (rec->sci_mask & 0xFFFFFF00) | (((packedRecVal[23] >> 0) & 0xFF) << 0);
+
+    rec->eth_type_mask = (rec->eth_type_mask & 0xFFFFFFFC) | (((packedRecVal[23] >> 8) & 0x3) << 0);
+
+    rec->snap_mask = (rec->snap_mask & 0xFFFFFFE0) | (((packedRecVal[23] >> 10) & 0x1F) << 0);
+
+    rec->llc_mask = (rec->llc_mask & 0xFFFFFFFE) | (((packedRecVal[23] >> 15) & 0x1) << 0);
+    rec->llc_mask = (rec->llc_mask & 0xFFFFFFF9) | (((packedRecVal[24] >> 0) & 0x3) << 1);
+
+    rec->sa_mask = (rec->sa_mask & 0xFFFFFFC0) | (((packedRecVal[24] >> 2) & 0x3F) << 0);
+
+    rec->da_mask = (rec->da_mask & 0xFFFFFFC0) | (((packedRecVal[24] >> 8) & 0x3F) << 0);
+
+    rec->pn_mask = (rec->pn_mask & 0xFFFFFFFC) | (((packedRecVal[24] >> 14) & 0x3) << 0);
+    rec->pn_mask = (rec->pn_mask & 0xFFFFFFF3) | (((packedRecVal[25] >> 0) & 0x3) << 2);
+
+    rec->eight02dot2 = (rec->eight02dot2 & 0xFFFFFFFE) | (((packedRecVal[25] >> 2) & 0x1) << 0);
+
+    rec->tci_sc = (rec->tci_sc & 0xFFFFFFFE) | (((packedRecVal[25] >> 3) & 0x1) << 0);
+
+    rec->tci_87543 = (rec->tci_87543 & 0xFFFFFFFE) | (((packedRecVal[25] >> 4) & 0x1) << 0);
+
+    rec->exp_sectag_en = (rec->exp_sectag_en & 0xFFFFFFFE) | (((packedRecVal[25] >> 5) & 0x1) << 0);
+
+    rec->sc_idx = (rec->sc_idx & 0xFFFFFFE0) | (((packedRecVal[25] >> 6) & 0x1F) << 0);
+
+    rec->sc_sa = (rec->sc_sa & 0xFFFFFFFC) | (((packedRecVal[25] >> 11) & 0x3) << 0);
+
+    rec->debug = (rec->debug & 0xFFFFFFFE) | (((packedRecVal[25] >> 13) & 0x1) << 0);
+
+    rec->action = (rec->action & 0xFFFFFFFC) | (((packedRecVal[25] >> 14) & 0x3) << 0);
+
+    rec->valid = (rec->valid & 0xFFFFFFFE) | (((packedRecVal[26] >> 3) & 0x1) << 0);
+
+    return 0;
+}
+
+int AQ_API_SetEgressSCRecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressSCRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_EGRESSSCRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 8);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->start_time >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->start_time >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->stop_time >> 0) & 0xFFFF) << 0);
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->stop_time >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xFFFC) | (((rec->curr_an >> 0) & 0x3) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xFFFB) | (((rec->an_roll >> 0) & 0x1) << 2);
+
+    packedRecVal[4] = (packedRecVal[4] & 0xFE07) | (((rec->tci >> 0) & 0x3F) << 3);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x01FF) | (((rec->enc_off >> 0) & 0x7F) << 9);
+    packedRecVal[5] = (packedRecVal[5] & 0xFFFE) | (((rec->enc_off >> 7) & 0x1) << 0);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFFFD) | (((rec->protect >> 0) & 0x1) << 1);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFFFB) | (((rec->recv >> 0) & 0x1) << 2);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFFF7) | (((rec->fresh >> 0) & 0x1) << 3);
+
+    packedRecVal[5] = (packedRecVal[5] & 0xFFCF) | (((rec->sak_len >> 0) & 0x3) << 4);
+
+    packedRecVal[7] = (packedRecVal[7] & 0x7FFF) | (((rec->valid >> 0) & 0x1) << 15);
+
+    SetRawSECEgressRecordVal(hw, packedRecVal, 8, 2, ROWOFFSET_EGRESSSCRECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetEgressSCRecord(struct aq_hw_s *hw, AQ_API_SEC_EgressSCRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_EGRESSSCRECORD)
+        return -EINVAL;
+
+    memset(rec, 0, sizeof(AQ_API_SEC_EgressSCRecord));
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 8, 2, ROWOFFSET_EGRESSSCRECORD + tableIndex);
+
+    rec->start_time = (rec->start_time & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->start_time = (rec->start_time & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->stop_time = (rec->stop_time & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+    rec->stop_time = (rec->stop_time & 0x0000FFFF) | (((packedRecVal[3] >> 0) & 0xFFFF) << 16);
+
+    rec->curr_an = (rec->curr_an & 0xFFFFFFFC) | (((packedRecVal[4] >> 0) & 0x3) << 0);
+
+    rec->an_roll = (rec->an_roll & 0xFFFFFFFE) | (((packedRecVal[4] >> 2) & 0x1) << 0);
+
+    rec->tci = (rec->tci & 0xFFFFFFC0) | (((packedRecVal[4] >> 3) & 0x3F) << 0);
+
+    rec->enc_off = (rec->enc_off & 0xFFFFFF80) | (((packedRecVal[4] >> 9) & 0x7F) << 0);
+    rec->enc_off = (rec->enc_off & 0xFFFFFF7F) | (((packedRecVal[5] >> 0) & 0x1) << 7);
+
+    rec->protect = (rec->protect & 0xFFFFFFFE) | (((packedRecVal[5] >> 1) & 0x1) << 0);
+
+    rec->recv = (rec->recv & 0xFFFFFFFE) | (((packedRecVal[5] >> 2) & 0x1) << 0);
+
+    rec->fresh = (rec->fresh & 0xFFFFFFFE) | (((packedRecVal[5] >> 3) & 0x1) << 0);
+
+    rec->sak_len = (rec->sak_len & 0xFFFFFFFC) | (((packedRecVal[5] >> 4) & 0x3) << 0);
+
+    rec->valid = (rec->valid & 0xFFFFFFFE) | (((packedRecVal[7] >> 15) & 0x1) << 0);
+
+    return 0;
+}
+
+int AQ_API_SetEgressSARecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressSARecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_EGRESSSARECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 8);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->start_time >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->start_time >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->stop_time >> 0) & 0xFFFF) << 0);
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->stop_time >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x0000) | (((rec->next_pn >> 0) & 0xFFFF) << 0);
+    packedRecVal[5] = (packedRecVal[5] & 0x0000) | (((rec->next_pn >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFFFE) | (((rec->sat_pn >> 0) & 0x1) << 0);
+
+    packedRecVal[6] = (packedRecVal[6] & 0xFFFD) | (((rec->fresh >> 0) & 0x1) << 1);
+
+    packedRecVal[7] = (packedRecVal[7] & 0x7FFF) | (((rec->valid >> 0) & 0x1) << 15);
+
+    SetRawSECEgressRecordVal(hw, packedRecVal, 8, 2, ROWOFFSET_EGRESSSARECORD + tableIndex);
+
+    return 0;
+}
+
+int AQ_API_GetEgressSARecord(struct aq_hw_s *hw, AQ_API_SEC_EgressSARecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[8];
+
+    if (tableIndex >= NUMROWS_EGRESSSARECORD)
+        return -EINVAL;
+
+    memset(rec, 0, sizeof(AQ_API_SEC_EgressSARecord));
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 8, 2, ROWOFFSET_EGRESSSARECORD + tableIndex);
+
+    rec->start_time = (rec->start_time & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->start_time = (rec->start_time & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->stop_time = (rec->stop_time & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+    rec->stop_time = (rec->stop_time & 0x0000FFFF) | (((packedRecVal[3] >> 0) & 0xFFFF) << 16);
+
+    rec->next_pn = (rec->next_pn & 0xFFFF0000) | (((packedRecVal[4] >> 0) & 0xFFFF) << 0);
+    rec->next_pn = (rec->next_pn & 0x0000FFFF) | (((packedRecVal[5] >> 0) & 0xFFFF) << 16);
+
+    rec->sat_pn = (rec->sat_pn & 0xFFFFFFFE) | (((packedRecVal[6] >> 0) & 0x1) << 0);
+
+    rec->fresh = (rec->fresh & 0xFFFFFFFE) | (((packedRecVal[6] >> 1) & 0x1) << 0);
+
+    rec->valid = (rec->valid & 0xFFFFFFFE) | (((packedRecVal[7] >> 15) & 0x1) << 0);
+
+    return 0;
+}
+
+int AQ_API_SetEgressSAKeyRecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressSAKeyRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[16];
+
+    if (tableIndex >= NUMROWS_EGRESSSAKEYRECORD)
+        return -EINVAL;
+
+    memset(packedRecVal, 0, sizeof(uint16_t) * 16);
+
+    packedRecVal[0] = (packedRecVal[0] & 0x0000) | (((rec->key[0] >> 0) & 0xFFFF) << 0);
+    packedRecVal[1] = (packedRecVal[1] & 0x0000) | (((rec->key[0] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[2] = (packedRecVal[2] & 0x0000) | (((rec->key[1] >> 0) & 0xFFFF) << 0);
+    packedRecVal[3] = (packedRecVal[3] & 0x0000) | (((rec->key[1] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[4] = (packedRecVal[4] & 0x0000) | (((rec->key[2] >> 0) & 0xFFFF) << 0);
+    packedRecVal[5] = (packedRecVal[5] & 0x0000) | (((rec->key[2] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[6] = (packedRecVal[6] & 0x0000) | (((rec->key[3] >> 0) & 0xFFFF) << 0);
+    packedRecVal[7] = (packedRecVal[7] & 0x0000) | (((rec->key[3] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[8] = (packedRecVal[8] & 0x0000) | (((rec->key[4] >> 0) & 0xFFFF) << 0);
+    packedRecVal[9] = (packedRecVal[9] & 0x0000) | (((rec->key[4] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[10] = (packedRecVal[10] & 0x0000) | (((rec->key[5] >> 0) & 0xFFFF) << 0);
+    packedRecVal[11] = (packedRecVal[11] & 0x0000) | (((rec->key[5] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[12] = (packedRecVal[12] & 0x0000) | (((rec->key[6] >> 0) & 0xFFFF) << 0);
+    packedRecVal[13] = (packedRecVal[13] & 0x0000) | (((rec->key[6] >> 16) & 0xFFFF) << 0);
+
+    packedRecVal[14] = (packedRecVal[14] & 0x0000) | (((rec->key[7] >> 0) & 0xFFFF) << 0);
+    packedRecVal[15] = (packedRecVal[15] & 0x0000) | (((rec->key[7] >> 16) & 0xFFFF) << 0);
+
+    SetRawSECEgressRecordVal(hw, packedRecVal, 8, 2, ROWOFFSET_EGRESSSAKEYRECORD + tableIndex);
+    SetRawSECEgressRecordVal(hw, packedRecVal + 8, 8, 2, ROWOFFSET_EGRESSSAKEYRECORD + tableIndex - 32);
+
+    return 0;
+}
+
+int AQ_API_GetEgressSAKeyRecord(struct aq_hw_s *hw, AQ_API_SEC_EgressSAKeyRecord* rec, uint16_t tableIndex)
+{
+    uint16_t packedRecVal[16];
+
+    if (tableIndex >= NUMROWS_EGRESSSAKEYRECORD)
+        return -EINVAL;
+
+    memset(rec, 0, sizeof(AQ_API_SEC_EgressSAKeyRecord));
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 8, 2, ROWOFFSET_EGRESSSAKEYRECORD + tableIndex);
+    GetRawSECEgressRecordVal(hw, packedRecVal + 8, 8, 2, ROWOFFSET_EGRESSSAKEYRECORD + tableIndex - 32);
+
+    rec->key[0] = (rec->key[0] & 0xFFFF0000) | (((packedRecVal[0] >> 0) & 0xFFFF) << 0);
+    rec->key[0] = (rec->key[0] & 0x0000FFFF) | (((packedRecVal[1] >> 0) & 0xFFFF) << 16);
+
+    rec->key[1] = (rec->key[1] & 0xFFFF0000) | (((packedRecVal[2] >> 0) & 0xFFFF) << 0);
+    rec->key[1] = (rec->key[1] & 0x0000FFFF) | (((packedRecVal[3] >> 0) & 0xFFFF) << 16);
+
+    rec->key[2] = (rec->key[2] & 0xFFFF0000) | (((packedRecVal[4] >> 0) & 0xFFFF) << 0);
+    rec->key[2] = (rec->key[2] & 0x0000FFFF) | (((packedRecVal[5] >> 0) & 0xFFFF) << 16);
+
+    rec->key[3] = (rec->key[3] & 0xFFFF0000) | (((packedRecVal[6] >> 0) & 0xFFFF) << 0);
+    rec->key[3] = (rec->key[3] & 0x0000FFFF) | (((packedRecVal[7] >> 0) & 0xFFFF) << 16);
+
+    rec->key[4] = (rec->key[4] & 0xFFFF0000) | (((packedRecVal[8] >> 0) & 0xFFFF) << 0);
+    rec->key[4] = (rec->key[4] & 0x0000FFFF) | (((packedRecVal[9] >> 0) & 0xFFFF) << 16);
+
+    rec->key[5] = (rec->key[5] & 0xFFFF0000) | (((packedRecVal[10] >> 0) & 0xFFFF) << 0);
+    rec->key[5] = (rec->key[5] & 0x0000FFFF) | (((packedRecVal[11] >> 0) & 0xFFFF) << 16);
+
+    rec->key[6] = (rec->key[6] & 0xFFFF0000) | (((packedRecVal[12] >> 0) & 0xFFFF) << 0);
+    rec->key[6] = (rec->key[6] & 0x0000FFFF) | (((packedRecVal[13] >> 0) & 0xFFFF) << 16);
+
+    rec->key[7] = (rec->key[7] & 0xFFFF0000) | (((packedRecVal[14] >> 0) & 0xFFFF) << 0);
+    rec->key[7] = (rec->key[7] & 0x0000FFFF) | (((packedRecVal[15] >> 0) & 0xFFFF) << 16);
+
+    return 0;
+}
+
+int AQ_API_GetEgressSCCounters(struct aq_hw_s *hw, AQ_API_SEC_EgressSCCounters* counters, uint16_t SCIndex)
+{
+    uint16_t packedRecVal[4];
+
+    if (SCIndex >= NUMROWS_EGRESSSCRECORD)
+        return -EINVAL;
+
+    memset(counters, 0, sizeof(AQ_API_SEC_EgressSCCounters));
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, SCIndex * 8 + 4);
+    counters->sc_protected_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->sc_protected_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, SCIndex * 8 + 5);
+    counters->sc_encrypted_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->sc_encrypted_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, SCIndex * 8 + 6);
+    counters->sc_protected_octets[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->sc_protected_octets[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, SCIndex * 8 + 7);
+    counters->sc_encrypted_octets[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->sc_encrypted_octets[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    return 0;
+}
+
+int AQ_API_GetEgressSACounters(struct aq_hw_s *hw, AQ_API_SEC_EgressSACounters* counters, uint16_t SAIndex)
+{
+    uint16_t packedRecVal[4];
+
+    if (SAIndex >= NUMROWS_EGRESSSARECORD)
+        return -EINVAL;
+
+    memset(counters, 0, sizeof(AQ_API_SEC_EgressSACounters));
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, SAIndex * 8 + 0);
+    counters->sa_hit_drop_redirect[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->sa_hit_drop_redirect[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, SAIndex * 8 + 1);
+    counters->sa_protected2_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->sa_protected2_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, SAIndex * 8 + 2);
+    counters->sa_protected_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->sa_protected_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, SAIndex * 8 + 3);
+    counters->sa_encrypted_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->sa_encrypted_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    return 0;
+}
+
+int AQ_API_GetEgressCommonCounters(struct aq_hw_s *hw, AQ_API_SEC_EgressCommonCounters* counters)
+{
+    uint16_t packedRecVal[4];
+
+    memset(counters, 0, sizeof(AQ_API_SEC_EgressCommonCounters));
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, 256 + 0);
+    counters->ctl_pkt[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->ctl_pkt[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, 256 + 1);
+    counters->unknown_sa_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->unknown_sa_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, 256 + 2);
+    counters->untagged_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->untagged_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, 256 + 3);
+    counters->too_long[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->too_long[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, 256 + 4);
+    counters->ecc_error_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->ecc_error_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECEgressRecordVal(hw, packedRecVal, 4, 3, 256 + 5);
+    counters->unctrl_hit_drop_redir[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->unctrl_hit_drop_redir[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    return 0;
+}
+
+int AQ_API_ClearEgressCounters(struct aq_hw_s *hw)
+{
+    struct mssEgressControlRegister_t controlReg;
+
+    memset(&controlReg, 0, sizeof(struct mssEgressControlRegister_t));
+
+    mdioRead(hw, MMD_GLOBAL, mssEgressControlRegister_ADDR, &controlReg.word_0);
+    mdioRead(hw, MMD_GLOBAL, mssEgressControlRegister_ADDR + 4, &controlReg.word_1);
+
+    controlReg.bits_0.mssEgressClearCounter = 0;
+
+    mdioWrite(hw, MMD_GLOBAL, mssEgressControlRegister_ADDR, controlReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssEgressControlRegister_ADDR + 4, controlReg.word_1);
+
+    controlReg.bits_0.mssEgressClearCounter = 1;
+
+    mdioWrite(hw, MMD_GLOBAL, mssEgressControlRegister_ADDR, controlReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssEgressControlRegister_ADDR + 4, controlReg.word_1);
+
+    controlReg.bits_0.mssEgressClearCounter = 0;
+
+    mdioWrite(hw, MMD_GLOBAL, mssEgressControlRegister_ADDR, controlReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssEgressControlRegister_ADDR + 4,  controlReg.word_1);
+
+    return 0;
+}
+
+int AQ_API_GetIngressSACounters(struct aq_hw_s *hw, AQ_API_SEC_IngressSACounters* counters, uint16_t SAIndex)
+{
+    uint16_t packedRecVal[4];
+
+    if (SAIndex >= NUMROWS_INGRESSSARECORD)
+        return -EINVAL;
+
+    memset(counters, 0, sizeof(AQ_API_SEC_IngressSACounters));
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 0);
+    counters->untagged_hit_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->untagged_hit_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 1);
+    counters->ctrl_hit_drop_redir_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->ctrl_hit_drop_redir_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 2);
+    counters->not_using_sa[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->not_using_sa[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 3);
+    counters->unused_sa[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->unused_sa[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 4);
+    counters->not_valid_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->not_valid_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 5);
+    counters->invalid_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->invalid_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 6);
+    counters->ok_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->ok_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 7);
+    counters->late_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->late_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 8);
+    counters->delayed_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->delayed_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 9);
+    counters->unchecked_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->unchecked_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 10);
+    counters->validated_octets[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->validated_octets[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, SAIndex * 12 + 11);
+    counters->decrypted_octets[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->decrypted_octets[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    return 0;
+}
+
+int AQ_API_GetIngressCommonCounters(struct aq_hw_s *hw, AQ_API_SEC_IngressCommonCounters* counters)
+{
+    uint16_t packedRecVal[4];
+
+    memset(counters, 0, sizeof(AQ_API_SEC_IngressCommonCounters));
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 0);
+    counters->ctl_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->ctl_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 1);
+    counters->tagged_miss_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->tagged_miss_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 2);
+    counters->untagged_miss_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->untagged_miss_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 3);
+    counters->notag_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->notag_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 4);
+    counters->untagged_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->untagged_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 5);
+    counters->bad_tag_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->bad_tag_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 6);
+    counters->no_sci_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->no_sci_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 7);
+    counters->unknown_sci_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->unknown_sci_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 8);
+    counters->ctrl_prt_pass_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->ctrl_prt_pass_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 9);
+    counters->unctrl_prt_pass_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->unctrl_prt_pass_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 10);
+    counters->ctrl_prt_fail_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->ctrl_prt_fail_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 11);
+    counters->unctrl_prt_fail_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->unctrl_prt_fail_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 12);
+    counters->too_long_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->too_long_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 13);
+    counters->igpoc_ctl_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->igpoc_ctl_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 14);
+    counters->ecc_error_pkts[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->ecc_error_pkts[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    GetRawSECIngressRecordVal(hw, packedRecVal, 4, 6, 385 + 15);
+    counters->unctrl_hit_drop_redir[0] = packedRecVal[0] | (packedRecVal[1] << 16);
+    counters->unctrl_hit_drop_redir[1] = packedRecVal[2] | (packedRecVal[3] << 16);
+
+    return 0;
+}
+
+int AQ_API_ClearIngressCounters(struct aq_hw_s *hw)
+{
+    struct mssIngressControlRegister_t controlReg;
+
+    memset(&controlReg, 0, sizeof(struct mssIngressControlRegister_t));
+
+    mdioRead(hw, MMD_GLOBAL, mssIngressControlRegister_ADDR, &controlReg.word_0);
+    mdioRead(hw, MMD_GLOBAL, mssIngressControlRegister_ADDR +4, &controlReg.word_1);
+
+    controlReg.bits_0.mssIngressClearCount = 0;
+
+    mdioWrite(hw, MMD_GLOBAL, mssIngressControlRegister_ADDR, controlReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssIngressControlRegister_ADDR + 4, controlReg.word_1);
+
+    controlReg.bits_0.mssIngressClearCount = 1;
+
+    mdioWrite(hw, MMD_GLOBAL, mssIngressControlRegister_ADDR, controlReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssIngressControlRegister_ADDR + 4, controlReg.word_1);
+
+    controlReg.bits_0.mssIngressClearCount = 0;
+
+    mdioWrite(hw, MMD_GLOBAL, mssIngressControlRegister_ADDR, controlReg.word_0);
+    mdioWrite(hw, MMD_GLOBAL, mssIngressControlRegister_ADDR + 4, controlReg.word_1);
+
+    return 0;
+}
+
+
diff --git a/drivers/net/atlantic/macsec/macsec_api.h b/drivers/net/atlantic/macsec/macsec_api.h
new file mode 100644
index 0000000..653c29c
--- /dev/null
+++ b/drivers/net/atlantic/macsec/macsec_api.h
@@ -0,0 +1,111 @@ 
+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) */
+/* Copyright (C) 2014-2019 aQuantia Corporation. */
+
+#ifndef __MACSEC_API_H__
+#define __MACSEC_API_H__
+
+#include "../atl_types.h"
+#include "macsec_struct.h"
+
+
+#define NUMROWS_INGRESSPRECTLFRECORD 24
+#define ROWOFFSET_INGRESSPRECTLFRECORD 0
+
+#define NUMROWS_INGRESSPRECLASSRECORD 48
+#define ROWOFFSET_INGRESSPRECLASSRECORD 0
+
+#define NUMROWS_INGRESSPOSTCLASSRECORD 48
+#define ROWOFFSET_INGRESSPOSTCLASSRECORD 0
+
+#define NUMROWS_INGRESSSCRECORD 32
+#define ROWOFFSET_INGRESSSCRECORD 0
+ 
+#define NUMROWS_INGRESSSARECORD 32
+#define ROWOFFSET_INGRESSSARECORD 32
+
+#define NUMROWS_INGRESSSAKEYRECORD 32
+#define ROWOFFSET_INGRESSSAKEYRECORD 0
+
+#define NUMROWS_INGRESSPOSTCTLFRECORD 24
+#define ROWOFFSET_INGRESSPOSTCTLFRECORD 0
+
+#define NUMROWS_EGRESSCTLFRECORD 24
+#define ROWOFFSET_EGRESSCTLFRECORD 0
+
+#define NUMROWS_EGRESSCLASSRECORD 48
+#define ROWOFFSET_EGRESSCLASSRECORD 0
+
+#define NUMROWS_EGRESSSCRECORD 32
+#define ROWOFFSET_EGRESSSCRECORD 0
+
+#define NUMROWS_EGRESSSARECORD 32
+#define ROWOFFSET_EGRESSSARECORD 32
+
+#define NUMROWS_EGRESSSAKEYRECORD 32
+#define ROWOFFSET_EGRESSSAKEYRECORD 96
+
+int AQ_API_GetEgressCTLFRecord(struct aq_hw_s *hw, AQ_API_SEC_EgressCTLFRecord* rec, uint16_t tableIndex);
+
+int AQ_API_SetEgressCTLFRecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressCTLFRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetEgressClassRecord(struct aq_hw_s *hw, AQ_API_SEC_EgressClassRecord* rec, uint16_t tableIndex);
+
+int AQ_API_SetEgressClassRecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressClassRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetEgressSCRecord(struct aq_hw_s *hw, AQ_API_SEC_EgressSCRecord* rec, uint16_t tableIndex);
+
+int AQ_API_SetEgressSCRecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressSCRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetEgressSARecord(struct aq_hw_s *hw, AQ_API_SEC_EgressSARecord* rec, uint16_t tableIndex);
+
+int AQ_API_SetEgressSARecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressSARecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetEgressSAKeyRecord(struct aq_hw_s *hw, AQ_API_SEC_EgressSAKeyRecord* rec, uint16_t tableIndex); 
+
+int AQ_API_SetEgressSAKeyRecord(struct aq_hw_s *hw, const AQ_API_SEC_EgressSAKeyRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetIngressPreCTLFRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressPreCTLFRecord* rec, uint16_t);
+
+int AQ_API_SetIngressPreCTLFRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressPreCTLFRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetIngressPreClassRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressPreClassRecord* rec, uint16_t tableIndex);
+
+int AQ_API_SetIngressPreClassRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressPreClassRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetIngressSCRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressSCRecord* rec, uint16_t tableIndex);
+
+int AQ_API_SetIngressSCRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressSCRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetIngressSARecord(struct aq_hw_s *hw, AQ_API_SEC_IngressSARecord* rec, uint16_t);
+
+int AQ_API_SetIngressSARecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressSARecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetIngressSAKeyRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressSAKeyRecord* rec, uint16_t tableIndex);
+
+int AQ_API_SetIngressSAKeyRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressSAKeyRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetIngressPostClassRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressPostClassRecord* rec, uint16_t tableIndex);
+
+int AQ_API_SetIngressPostClassRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressPostClassRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetIngressPostCTLFRecord(struct aq_hw_s *hw, AQ_API_SEC_IngressPostCTLFRecord* rec, uint16_t tableIndex);
+
+int AQ_API_SetIngressPostCTLFRecord(struct aq_hw_s *hw, const AQ_API_SEC_IngressPostCTLFRecord* rec, uint16_t tableIndex);
+
+int AQ_API_GetEgressSCCounters(struct aq_hw_s *hw, AQ_API_SEC_EgressSCCounters* counters, uint16_t SCIndex);
+
+int AQ_API_GetEgressSACounters(struct aq_hw_s *hw, AQ_API_SEC_EgressSACounters* counters, uint16_t SAindex);
+
+int AQ_API_GetEgressCommonCounters(struct aq_hw_s *hw, AQ_API_SEC_EgressCommonCounters* counters);
+
+int AQ_API_ClearEgressCounters(struct aq_hw_s *hw);
+
+int AQ_API_GetIngressSACounters(struct aq_hw_s *hw, AQ_API_SEC_IngressSACounters* counters, uint16_t SAindex);
+
+int AQ_API_GetIngressCommonCounters(struct aq_hw_s *hw, AQ_API_SEC_IngressCommonCounters* counters);
+int AQ_API_ClearIngressCounters(struct aq_hw_s *hw);
+
+
+
+
+#endif /* __MACSEC_API_H__ */
diff --git a/drivers/net/atlantic/macsec/macsec_struct.h b/drivers/net/atlantic/macsec/macsec_struct.h
new file mode 100644
index 0000000..b408fdf
--- /dev/null
+++ b/drivers/net/atlantic/macsec/macsec_struct.h
@@ -0,0 +1,269 @@ 
+/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) */
+/* Copyright (C) 2014-2019 aQuantia Corporation. */
+
+#ifndef _MACSEC_STRUCT_H_
+#define _MACSEC_STRUCT_H_
+
+typedef struct
+{
+	uint32_t sa_da[2];
+	uint32_t eth_type;
+	uint32_t match_mask;
+	uint32_t match_type;
+	uint32_t action;
+} AQ_API_SEC_EgressCTLFRecord;
+
+typedef struct
+{
+	uint32_t vlan_id;
+	uint32_t vlan_up;
+	uint32_t vlan_valid;
+	uint32_t byte3;
+	uint32_t byte2;
+	uint32_t byte1;
+	uint32_t byte0;
+	uint32_t tci;
+	uint32_t sci[2];
+	uint32_t eth_type;
+	uint32_t snap[2];
+	uint32_t llc;
+	uint32_t mac_sa[2];
+	uint32_t mac_da[2];
+	uint32_t pn;
+	uint32_t byte3_location;
+	uint32_t byte3_mask;
+	uint32_t byte2_location;
+	uint32_t byte2_mask;
+	uint32_t byte1_location;
+	uint32_t byte1_mask;
+	uint32_t byte0_location;
+	uint32_t byte0_mask;
+	uint32_t vlan_id_mask;
+	uint32_t vlan_up_mask;
+	uint32_t vlan_valid_mask;
+	uint32_t tci_mask;
+	uint32_t sci_mask;
+	uint32_t eth_type_mask;
+	uint32_t snap_mask;
+	uint32_t llc_mask;
+	uint32_t sa_mask;
+	uint32_t da_mask;
+	uint32_t pn_mask;
+	uint32_t eight02dot2;
+	uint32_t tci_sc;
+	uint32_t tci_87543;
+	uint32_t exp_sectag_en;
+	uint32_t sc_idx;
+	uint32_t sc_sa;
+	uint32_t debug;
+	uint32_t action;
+	uint32_t valid;
+} AQ_API_SEC_EgressClassRecord;
+
+typedef struct
+{
+	uint32_t start_time;
+	uint32_t stop_time;
+	uint32_t curr_an;
+	uint32_t an_roll;
+	uint32_t tci;
+	uint32_t enc_off;
+	uint32_t protect;
+	uint32_t recv;
+	uint32_t fresh;
+	uint32_t sak_len;
+	uint32_t valid;
+} AQ_API_SEC_EgressSCRecord;
+
+typedef struct
+{
+	uint32_t start_time;
+	uint32_t stop_time;
+	uint32_t next_pn;
+	uint32_t sat_pn;
+	uint32_t fresh;
+	uint32_t valid;
+} AQ_API_SEC_EgressSARecord;
+
+typedef struct
+{
+	uint32_t key[8];
+} AQ_API_SEC_EgressSAKeyRecord;
+
+typedef struct
+{
+	uint32_t sa_da[2];
+	uint32_t eth_type;
+	uint32_t match_mask;
+	uint32_t match_type;
+	uint32_t action;
+} AQ_API_SEC_IngressPreCTLFRecord;
+
+typedef struct
+{
+	uint32_t sci[2];
+	uint32_t tci;
+	uint32_t encr_offset;
+	uint32_t eth_type;
+	uint32_t snap[2];
+	uint32_t llc;
+	uint32_t mac_sa[2];
+	uint32_t mac_da[2];
+	uint32_t lpbk_packet;
+	uint32_t an_mask;
+	uint32_t tci_mask;
+	uint32_t sci_mask;
+	uint32_t eth_type_mask;
+	uint32_t snap_mask;
+	uint32_t llc_mask;
+	uint32_t _802_2_encapsulate;
+	uint32_t sa_mask;
+	uint32_t da_mask;
+	uint32_t lpbk_mask;
+	uint32_t sc_idx;
+	uint32_t proc_dest;
+	uint32_t action;
+	uint32_t ctrl_unctrl;
+	uint32_t sci_from_table;
+	uint32_t reserved;
+	uint32_t valid;
+} AQ_API_SEC_IngressPreClassRecord;
+
+typedef struct
+{
+	uint32_t stop_time;
+	uint32_t start_time;
+	uint32_t validate_frames;
+	uint32_t replay_protect;
+	uint32_t anti_replay_window;
+	uint32_t receiving;
+	uint32_t fresh;
+	uint32_t an_rol;
+	uint32_t reserved;
+	uint32_t valid;
+} AQ_API_SEC_IngressSCRecord;
+
+typedef struct
+{
+	uint32_t stop_time;
+	uint32_t start_time;
+	uint32_t next_pn;
+	uint32_t sat_nextpn;
+	uint32_t in_use;
+	uint32_t fresh;
+	uint32_t reserved;
+	uint32_t valid;
+} AQ_API_SEC_IngressSARecord;
+
+typedef struct
+{
+	uint32_t key[8];
+	uint32_t key_len;
+} AQ_API_SEC_IngressSAKeyRecord;
+
+typedef struct
+{
+	uint32_t byte0;
+	uint32_t byte1;
+	uint32_t byte2;
+	uint32_t byte3;
+	uint32_t eth_type;
+	uint32_t eth_type_valid;
+	uint32_t vlan_id;
+	uint32_t vlan_up;
+	uint32_t vlan_valid;
+	uint32_t sai;
+	uint32_t sai_hit;
+	uint32_t eth_type_mask;
+	uint32_t byte3_location;
+	uint32_t byte3_mask;
+	uint32_t byte2_location;
+	uint32_t byte2_mask;
+	uint32_t byte1_location;
+	uint32_t byte1_mask;
+	uint32_t byte0_location;
+	uint32_t byte0_mask;
+	uint32_t eth_type_valid_mask;
+	uint32_t vlan_id_mask;
+	uint32_t vlan_up_mask;
+	uint32_t vlan_valid_mask;
+	uint32_t sai_mask;
+	uint32_t sai_hit_mask;
+	uint32_t firstlevel_actions;
+	uint32_t secondlevel_actions;
+	uint32_t reserved;
+	uint32_t valid;
+} AQ_API_SEC_IngressPostClassRecord;
+
+typedef struct
+{
+	uint32_t sa_da[2];
+	uint32_t eth_type;
+	uint32_t match_mask;
+	uint32_t match_type;
+	uint32_t action;
+} AQ_API_SEC_IngressPostCTLFRecord;
+
+typedef struct
+{
+	uint32_t sc_protected_pkts[2];
+	uint32_t sc_encrypted_pkts[2];
+	uint32_t sc_protected_octets[2];
+	uint32_t sc_encrypted_octets[2];
+} AQ_API_SEC_EgressSCCounters;
+
+typedef struct
+{
+	uint32_t sa_hit_drop_redirect[2];
+	uint32_t sa_protected2_pkts[2];
+	uint32_t sa_protected_pkts[2];
+	uint32_t sa_encrypted_pkts[2];
+} AQ_API_SEC_EgressSACounters;
+
+typedef struct
+{
+	uint32_t ctl_pkt[2];
+	uint32_t unknown_sa_pkts[2];
+	uint32_t untagged_pkts[2];
+	uint32_t too_long[2];
+	uint32_t ecc_error_pkts[2];
+	uint32_t unctrl_hit_drop_redir[2];
+} AQ_API_SEC_EgressCommonCounters;
+
+typedef struct
+{
+	uint32_t untagged_hit_pkts[2];
+	uint32_t ctrl_hit_drop_redir_pkts[2];
+	uint32_t not_using_sa[2];
+	uint32_t unused_sa[2];
+	uint32_t not_valid_pkts[2];
+	uint32_t invalid_pkts[2];
+	uint32_t ok_pkts[2];
+	uint32_t late_pkts[2];
+	uint32_t delayed_pkts[2];
+	uint32_t unchecked_pkts[2];
+	uint32_t validated_octets[2];
+	uint32_t decrypted_octets[2];
+} AQ_API_SEC_IngressSACounters;
+
+typedef struct
+{
+	uint32_t ctl_pkts[2];
+	uint32_t tagged_miss_pkts[2];
+	uint32_t untagged_miss_pkts[2];
+	uint32_t notag_pkts[2];
+	uint32_t untagged_pkts[2];
+	uint32_t bad_tag_pkts[2];
+	uint32_t no_sci_pkts[2];
+	uint32_t unknown_sci_pkts[2];
+	uint32_t ctrl_prt_pass_pkts[2];
+	uint32_t unctrl_prt_pass_pkts[2];
+	uint32_t ctrl_prt_fail_pkts[2];
+	uint32_t unctrl_prt_fail_pkts[2];
+	uint32_t too_long_pkts[2];
+	uint32_t igpoc_ctl_pkts[2];
+	uint32_t ecc_error_pkts[2];
+	uint32_t unctrl_hit_drop_redir[2];
+} AQ_API_SEC_IngressCommonCounters;
+
+#endif
diff --git a/drivers/net/atlantic/meson.build b/drivers/net/atlantic/meson.build
index d1c66f4..139cdec 100644
--- a/drivers/net/atlantic/meson.build
+++ b/drivers/net/atlantic/meson.build
@@ -13,4 +13,5 @@  sources = files(
 	'hw_atl/hw_atl_utils.c',
 	'rte_pmd_atlantic.c',
 	'macsec/mdio.c',
+	'macsec/macsec_api.c',
 )