nss-drv: Limit arch specific NSS features

Prevent selecting or building NSS features that are ipq806x specific

These include:

- Port ID (nss_portid.c)
- OAM (nss_oam.c)
- Timestamping (nss_tstamp.c)
- Legacy WiFi Offload (nss_wifi.c)

Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
Sean Khan 2025-05-30 14:35:29 -04:00
parent 589db1c9c8
commit 03f6cb25eb
3 changed files with 153 additions and 1 deletions

View File

@ -133,12 +133,13 @@ config NSS_DRV_OAM_ENABLE
bool
default n
prompt "Enable OAM"
depends on TARGET_qualcommax_ipq806x
depends on TARGET_ipq806x
config NSS_DRV_PORTID_ENABLE
bool
default n
prompt "Enable PORTID"
depends on TARGET_ipq806x
config NSS_DRV_LSO_RX_ENABLE
bool
@ -215,6 +216,7 @@ config NSS_DRV_TSTAMP_ENABLE
bool
default n
prompt "Enable TSTAMP"
depends on TARGET_ipq806x
config NSS_DRV_TUN6RD_ENABLE
bool

View File

@ -0,0 +1,75 @@
--- a/Makefile
+++ b/Makefile
@@ -123,12 +123,14 @@ qca-nss-drv-objs += \
endif
endif
+ifeq ($(SoC),$(filter $(SoC),ipq806x))
ifneq "$(NSS_DRV_TSTAMP_ENABLE)" "n"
ccflags-y += -DNSS_DRV_TSTAMP_ENABLE
qca-nss-drv-objs += \
nss_tstamp.o \
nss_tstamp_stats.o
endif
+endif
ifneq "$(NSS_DRV_GRE_ENABLE)" "n"
ccflags-y += -DNSS_DRV_GRE_ENABLE
@@ -248,6 +250,7 @@ qca-nss-drv-objs += \
nss_rmnet_rx_stats.o
endif
+ifeq ($(SoC),$(filter $(SoC),ipq806x))
ifneq "$(NSS_DRV_PORTID_ENABLE)" "n"
ccflags-y += -DNSS_DRV_PORTID_ENABLE
qca-nss-drv-objs += \
@@ -255,6 +258,7 @@ qca-nss-drv-objs += \
nss_portid_log.o \
nss_portid_stats.o
endif
+endif
ifneq "$(NSS_DRV_IGS_ENABLE)" "n"
ccflags-y += -DNSS_DRV_IGS_ENABLE
@@ -263,12 +267,14 @@ qca-nss-drv-objs += \
nss_igs_stats.o
endif
+ifeq ($(SoC),$(filter $(SoC),ipq806x))
ifneq "$(NSS_DRV_OAM_ENABLE)" "n"
ccflags-y += -DNSS_DRV_OAM_ENABLE
qca-nss-drv-objs += \
nss_oam.o \
nss_oam_log.o
endif
+endif
ifneq "$(NSS_DRV_CLMAP_ENABLE)" "n"
ccflags-y += -DNSS_DRV_CLMAP_ENABLE
@@ -343,16 +349,13 @@ endif
ifneq "$(NSS_DRV_WIFIOFFLOAD_ENABLE)" "n"
ccflags-y += -DNSS_DRV_WIFIOFFLOAD_ENABLE
-ifneq "$(NSS_DRV_WIFI_LEGACY_ENABLE)" "n"
-ccflags-y += -DNSS_DRV_WIFI_LEGACY_ENABLE
+ifeq ($(SoC),$(filter $(SoC),ipq806x))
qca-nss-drv-objs += \
nss_wifi.o \
nss_wifi_log.o \
nss_wifi_stats.o
-ifeq ($(SoC),$(filter $(SoC),ipq806x))
ccflags-y += -DNSS_HAL_IPQ806x_SUPPORT
-endif
-endif
+else
qca-nss-drv-objs += \
nss_wifi_vdev.o \
nss_wifili.o \
@@ -361,6 +364,7 @@ qca-nss-drv-objs += \
nss_wifili_strings.o \
nss_wifi_mac_db.o
endif
+endif
ifneq "$(NSS_DRV_VLAN_ENABLE)" "n"
ccflags-y += -DNSS_DRV_VLAN_ENABLE

View File

@ -0,0 +1,75 @@
--- a/Makefile
+++ b/Makefile
@@ -122,12 +122,14 @@ qca-nss-drv-objs += \
endif
endif
+ifeq ($(SoC),$(filter $(SoC),ipq806x))
ifneq "$(NSS_DRV_TSTAMP_ENABLE)" "n"
ccflags-y += -DNSS_DRV_TSTAMP_ENABLE
qca-nss-drv-objs += \
nss_tstamp.o \
nss_tstamp_stats.o
endif
+endif
ifneq "$(NSS_DRV_GRE_ENABLE)" "n"
ccflags-y += -DNSS_DRV_GRE_ENABLE
@@ -255,6 +257,7 @@ qca-nss-drv-objs += \
nss_rmnet_rx_stats.o
endif
+ifeq ($(SoC),$(filter $(SoC),ipq806x))
ifneq "$(NSS_DRV_PORTID_ENABLE)" "n"
ccflags-y += -DNSS_DRV_PORTID_ENABLE
qca-nss-drv-objs += \
@@ -262,6 +265,7 @@ qca-nss-drv-objs += \
nss_portid_log.o \
nss_portid_stats.o
endif
+endif
ifneq "$(NSS_DRV_IGS_ENABLE)" "n"
ccflags-y += -DNSS_DRV_IGS_ENABLE
@@ -270,12 +274,14 @@ qca-nss-drv-objs += \
nss_igs_stats.o
endif
+ifeq ($(SoC),$(filter $(SoC),ipq806x))
ifneq "$(NSS_DRV_OAM_ENABLE)" "n"
ccflags-y += -DNSS_DRV_OAM_ENABLE
qca-nss-drv-objs += \
nss_oam.o \
nss_oam_log.o
endif
+endif
ifneq "$(NSS_DRV_CLMAP_ENABLE)" "n"
ccflags-y += -DNSS_DRV_CLMAP_ENABLE
@@ -350,16 +356,13 @@ endif
ifneq "$(NSS_DRV_WIFIOFFLOAD_ENABLE)" "n"
ccflags-y += -DNSS_DRV_WIFIOFFLOAD_ENABLE
-ifneq "$(NSS_DRV_WIFI_LEGACY_ENABLE)" "n"
-ccflags-y += -DNSS_DRV_WIFI_LEGACY_ENABLE
+ifeq ($(SoC),$(filter $(SoC),ipq806x))
qca-nss-drv-objs += \
nss_wifi.o \
nss_wifi_log.o \
nss_wifi_stats.o
-ifeq ($(SoC),$(filter $(SoC),ipq806x))
ccflags-y += -DNSS_HAL_IPQ806x_SUPPORT
-endif
-endif
+else
qca-nss-drv-objs += \
nss_wifi_vdev.o \
nss_wifili.o \
@@ -368,6 +371,7 @@ qca-nss-drv-objs += \
nss_wifili_strings.o \
nss_wifi_mac_db.o
endif
+endif
ifneq "$(NSS_DRV_VLAN_ENABLE)" "n"
ccflags-y += -DNSS_DRV_VLAN_ENABLE