Refactoring designware VLAN code and introducing support for hardware-accelerated VLAN stripping for dwxgmac2 IP, the current patch set consists of two key changes: 1) Refactoring VLAN Functions: The first change involves moving common VLAN-related functions of the DesignWare Ethernet MAC into a dedicated file, stmmac_vlan.c. This refactoring aims to improve code organization and maintainability by centralizing VLAN handling logic. 2) Enabling VLAN for 10G Ethernet MAC IP: The second change enables VLAN support specifically for the 10G Ethernet MAC IP. This enhancement leverages the hardware capabilities of the to perform VLAN stripping, Changes from previous submmited patches. v2: The hardware VLAN enablement switch was detached from the device tree source (DTS). Instead, the hardware VLAN enablement is now dynamically determined in stmmac_main.c based on the currently running IP. Link: https://lore.kernel.org/lkml/BL3PR11MB5748AC693D9D61FB56DB7313C1F32 @BL3PR11MB5748.namprd11.prod.outlook.com/ v1: The initial submission introduced hardware VLAN support for the 10G Ethernet MAC IP. Link: https://lore.kernel.org/netdev/DM8PR11MB5751E5388AEFCFB80BCB483FC13FA @DM8PR11MB5751.namprd11.prod.outlook.com/ Boon Khai Ng (2): net: stmmac: Refactor VLAN implementation net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN stripping drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 40 --- .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 295 +----------------- .../net/ethernet/stmicro/stmmac/dwxgmac2.h | 25 +- .../ethernet/stmicro/stmmac/dwxgmac2_core.c | 89 +----- .../ethernet/stmicro/stmmac/dwxgmac2_descs.c | 18 ++ drivers/net/ethernet/stmicro/stmmac/hwif.c | 8 + drivers/net/ethernet/stmicro/stmmac/hwif.h | 61 ++-- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- .../net/ethernet/stmicro/stmmac/stmmac_vlan.c | 294 +++++++++++++++++ .../net/ethernet/stmicro/stmmac/stmmac_vlan.h | 63 ++++ 12 files changed, 434 insertions(+), 464 deletions(-) create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.h -- 2.25.1