mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-16 16:21:53 +00:00
treewide: Option to build for all NSS firmware
The idea that "newer" NSS firmware = "better" is not always true. Especially given that 11.4 is the only firmware known to work with mesh, among other issues like WDS/rmnet_nss being broken on 12.5 releases. Add option to allow building for all known and available NSS firmwares. The following are now supported NSS firmwares: 1.) 11.4.0.5-5 2.) 12.1 3.) 12.2 4.) 12.5 Users should start with 11.4 as that seems to be the one with the most enabled features. It is now also the default version. Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
parent
9c1bd07946
commit
7a21a949cf
@ -11,7 +11,7 @@ PKG_NAME:=nss-firmware
|
||||
PKG_SOURCE_DATE:=2024-07-22
|
||||
PKG_SOURCE_VERSION:=8dceff47ef0ac967d01bf0dacd84d44842774af2
|
||||
PKG_MIRROR_HASH:=3334a63d0b2c7afe4f6d4e3c2ac86bc3e2a0d97df17f478eeec7d29936062edf
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/qosmio/qca-sdk-nss-fw.git
|
||||
@ -22,6 +22,8 @@ PKG_MAINTAINER:=Sean K <datapronix@protonmail.com>
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_NSS_FIRMWARE_VERSION_11_4 \
|
||||
CONFIG_NSS_FIRMWARE_VERSION_12_1 \
|
||||
CONFIG_NSS_FIRMWARE_VERSION_12_2 \
|
||||
CONFIG_NSS_FIRMWARE_VERSION_12_5
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -60,7 +62,6 @@ $(Package/nss-firmware-default)
|
||||
NSS_SOC:=MP
|
||||
endef
|
||||
|
||||
|
||||
define Package/nss-firmware-default/config
|
||||
menu "NSS Firmware Version"
|
||||
|
||||
@ -68,31 +69,51 @@ define Package/nss-firmware-default/config
|
||||
|
||||
choice
|
||||
prompt "Version"
|
||||
default NSS_FIRMWARE_VERSION_12_5
|
||||
default NSS_FIRMWARE_VERSION_11_4
|
||||
|
||||
config NSS_FIRMWARE_VERSION_12_5
|
||||
bool "NSS Firmware 12.5 Release 210"
|
||||
help
|
||||
This version does not work with NSS MESH
|
||||
This version does NOT work with NSS MESH (802.11s)
|
||||
|
||||
config NSS_FIRMWARE_VERSION_12_2
|
||||
bool "NSS Firmware 12.2 Release 161"
|
||||
help
|
||||
This version does NOT work with NSS MESH (802.11s)
|
||||
|
||||
config NSS_FIRMWARE_VERSION_12_1
|
||||
bool "NSS Firmware 12.1 Release 003"
|
||||
help
|
||||
This version does NOT work with NSS MESH (802.11s)
|
||||
|
||||
config NSS_FIRMWARE_VERSION_11_4
|
||||
bool "NSS Firmware 11.4.0.5 Release 5"
|
||||
help
|
||||
This version works with NSS MESH
|
||||
This version WORKS with NSS MESH (802.11s)
|
||||
endchoice
|
||||
endmenu
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_NSS_FIRMWARE_VERSION_11_4),)
|
||||
NSS_MAJOR:=11.4
|
||||
NSS_MINOR:=11.4.0.5
|
||||
NSS_REL:=5
|
||||
VERSION_PATH=$(PKG_BUILD_DIR)/QCA_Networking_2021.SPF_$(NSS_MAJOR)/CS
|
||||
NSS_MAJOR=11
|
||||
NSS_MINOR=4
|
||||
NSS_REL=5
|
||||
VERSION_PATH=$(PKG_BUILD_DIR)/QCA_Networking_2021.SPF_$(NSS_MAJOR).$(NSS_MINOR)/CS
|
||||
else ifneq ($(CONFIG_NSS_FIRMWARE_VERSION_12_1),)
|
||||
NSS_MAJOR=12
|
||||
NSS_MINOR=1
|
||||
NSS_REL=003
|
||||
VERSION_PATH=$(PKG_BUILD_DIR)/QCA_Networking_2022.SPF_$(NSS_MAJOR).$(NSS_MINOR)/ED1
|
||||
else ifneq ($(CONFIG_NSS_FIRMWARE_VERSION_12_2),)
|
||||
NSS_MAJOR=12
|
||||
NSS_MINOR=2
|
||||
NSS_REL=161
|
||||
VERSION_PATH=$(PKG_BUILD_DIR)/QCA_Networking_2022.SPF_$(NSS_MAJOR).$(NSS_MINOR)/ED1
|
||||
else
|
||||
NSS_MAJOR:=12.5
|
||||
NSS_MINOR:=12.5
|
||||
NSS_REL:=210
|
||||
VERSION_PATH=$(PKG_BUILD_DIR)/QCA_Networking_2024.SPF_$(NSS_MAJOR)/ED1
|
||||
NSS_MAJOR=12
|
||||
NSS_MINOR=5
|
||||
NSS_REL=210
|
||||
VERSION_PATH=$(PKG_BUILD_DIR)/QCA_Networking_2024.SPF_$(NSS_MAJOR).$(NSS_MINOR)/ED1
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
@ -101,7 +122,7 @@ endef
|
||||
define Package/nss-firmware/install
|
||||
$(INSTALL_DIR) $(PKG_BUILD_DIR)/$(IPQ_PLATFORM)
|
||||
$(TAR) --strip-components=1 -C $(PKG_BUILD_DIR)/$(IPQ_PLATFORM) -xf \
|
||||
$(VERSION_PATH)/$(IPQ_PLATFORM).ATH.$(NSS_MAJOR)/BIN-NSS*.$(NSS_MINOR)-$(NSS_REL)*$(NSS_PROFILE).tar.bz2
|
||||
$(VERSION_PATH)/$(IPQ_PLATFORM).ATH.$(NSS_MAJOR).$(NSS_MINOR)/BIN-NSS*.$(NSS_MAJOR).$(NSS_MINOR)*-$(NSS_REL)*$(NSS_PROFILE).tar.bz2
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/$(IPQ_PLATFORM)/retail_router0.bin \
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-nss-drv
|
||||
PKG_RELEASE:=11
|
||||
PKG_RELEASE:=12
|
||||
|
||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-drv.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
@ -140,6 +140,10 @@ else ifdef CONFIG_NSS_MEM_PROFILE_LOW
|
||||
EXTRA_CFLAGS += -DNSS_MEM_PROFILE_LOW
|
||||
endif
|
||||
|
||||
ifdef CONFIG_NSS_FIRMWARE_VERSION_12_5
|
||||
EXTRA_CFLAGS += -DNSS_FIRMWARE_VERSION_12_5
|
||||
endif
|
||||
|
||||
DRV_MAKE_OPTS:=
|
||||
|
||||
ifndef CONFIG_NSS_DRV_BRIDGE_ENABLE
|
||||
|
||||
201
qca-nss-drv/patches/0022-nss-drv-limit-fw-12.2.patch
Normal file
201
qca-nss-drv/patches/0022-nss-drv-limit-fw-12.2.patch
Normal file
@ -0,0 +1,201 @@
|
||||
--- a/exports/nss_capwap.h
|
||||
+++ b/exports/nss_capwap.h
|
||||
@@ -284,6 +284,7 @@ struct nss_capwap_dtls_msg {
|
||||
uint32_t reserved; /**< Reserved field for future use. */
|
||||
};
|
||||
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
/**
|
||||
* nss_capwap_flow_attr
|
||||
* Inner Flow attributes.
|
||||
@@ -293,6 +294,7 @@ struct nss_capwap_flow_attr {
|
||||
uint32_t flow_id; /**< Flow Identification. */
|
||||
uint32_t scs_sdwf_id; /**< SCS or SDWF Identification. */
|
||||
};
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* nss_capwap_flow_rule_msg
|
||||
@@ -312,7 +314,11 @@ struct nss_capwap_flow_rule_msg {
|
||||
/*
|
||||
* Flow attributes.
|
||||
*/
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
struct nss_capwap_flow_attr flow_attr;
|
||||
+#else
|
||||
+ uint32_t flow_id; /**< Flow identification. */
|
||||
+#endif
|
||||
};
|
||||
|
||||
/**
|
||||
--- a/exports/nss_ipv4.h
|
||||
+++ b/exports/nss_ipv4.h
|
||||
@@ -290,7 +290,9 @@ enum nss_ipv4_stats_types {
|
||||
#define NSS_IPV4_RULE_CREATE_IDENTIFIER_VALID 0x1000
|
||||
/**< Identifier is valid. */
|
||||
#define NSS_IPV4_RULE_CREATE_MIRROR_VALID 0x2000 /**< Mirror fields are valid. */
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
#define NSS_IPV4_RULE_CREATE_RAWIP_VALID 0x4000 /**< RAW IP fields are valid. */
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Multicast command rule flags
|
||||
--- a/exports/nss_pvxlan.h
|
||||
+++ b/exports/nss_pvxlan.h
|
||||
@@ -63,8 +63,10 @@ typedef enum nss_pvxlan_msg_type {
|
||||
NSS_PVXLAN_MSG_TYPE_TUNNEL_DISABLE, /**< Disable the tunnel. */
|
||||
NSS_PVXLAN_MSG_TYPE_MAC_ADD, /**< Add MAC rule to the database. */
|
||||
NSS_PVXLAN_MSG_TYPE_MAC_DEL, /**< Remove MAC rule from the database. */
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
NSS_PVXLAN_MSG_TYPE_CONFIG_VP, /**< VP configuration. */
|
||||
NSS_PVXLAN_MSG_TYPE_UNCONFIG_VP, /**< VP unconfiguration. */
|
||||
+#endif
|
||||
NSS_PVXLAN_MSG_TYPE_MAX, /**< Maximum message type. */
|
||||
} nss_pvxlan_msg_type_t;
|
||||
|
||||
@@ -97,10 +99,12 @@ typedef enum nss_pvxlan_error_response_t
|
||||
/**< MAC entry allocation failed. */
|
||||
PVXLAN_ERROR_MSG_MAC_ENTRY_DELETE_FAILED,
|
||||
/**< MAC entry deletion failed. */
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
PVXLAN_ERROR_MSG_CONFIG_VP_FAILED,
|
||||
/**< VP configuration failed. */
|
||||
PVXLAN_ERROR_MSG_UNCONFIG_VP_FAILED,
|
||||
/**< VP unconfiguration failed. */
|
||||
+#endif
|
||||
NSS_PVXLAN_ERROR_MAX, /**< Maximum error type. */
|
||||
} nss_pvxlan_error_response_t;
|
||||
|
||||
@@ -181,6 +185,7 @@ struct nss_pvxlan_mac_msg {
|
||||
uint16_t policy_id; /**< Policy ID. */
|
||||
};
|
||||
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
/**
|
||||
* nss_pvxlan_vp_msg
|
||||
* VP configuration message.
|
||||
@@ -192,6 +197,7 @@ struct nss_pvxlan_vp_msg {
|
||||
int16_t vp_num; /**< VP number. */
|
||||
bool ppe_to_host; /**< Enable/disable PPE to host mode. */
|
||||
};
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* nss_pvxlan_msg
|
||||
@@ -216,8 +222,10 @@ struct nss_pvxlan_msg {
|
||||
/**< MAC rule add message. */
|
||||
struct nss_pvxlan_mac_msg mac_del;
|
||||
/**< MAC rule delete message. */
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
struct nss_pvxlan_vp_msg vp_config;
|
||||
/**< VP configuration message. */
|
||||
+#endif
|
||||
} msg; /**< Message payload. */
|
||||
};
|
||||
|
||||
--- a/exports/nss_wifili_if.h
|
||||
+++ b/exports/nss_wifili_if.h
|
||||
@@ -1496,8 +1496,10 @@ struct nss_wifili_rx_ctrl_stats {
|
||||
uint32_t bcast_rcv_bytes; /**< Total number of broadcast bytes received. */
|
||||
uint32_t defrag_mcast_drop; /**< Total number of defrag multicast dropped packets. */
|
||||
uint32_t mcast_3addr_drop; /**< Total number of 3 address multicast dropped packets. */
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
uint32_t ucast_rcv_cnt; /**< Total number of unicast packets received. */
|
||||
uint32_t ucast_rcv_bytes; /**< Total number of unicast bytes received. */
|
||||
+#endif
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1509,8 +1511,10 @@ struct nss_wifili_retry_ctrl_stats {
|
||||
uint32_t tx_retry_count; /**< Transmit retry count. */
|
||||
uint32_t tx_multiple_retry_count; /**< Transmit multiple retry count. */
|
||||
uint32_t rx_retry_count; /**< Receive retry count. */
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
uint32_t tx_mpdu_retry_count; /**< Per mpdu retry count. */
|
||||
uint32_t tx_mpdu_total_retry_count; /**< Total mpdu retry count. */
|
||||
+#endif
|
||||
};
|
||||
|
||||
/**
|
||||
--- a/nss_pvxlan_log.c
|
||||
+++ b/nss_pvxlan_log.c
|
||||
@@ -36,7 +36,9 @@ static int8_t *nss_pvxlan_log_message_ty
|
||||
"PVxLAN Disable Tunnel",
|
||||
"PVxLAN Add MAC rule",
|
||||
"PVxLAN Delete MAC rule",
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
"PVxLAN Config VP"
|
||||
+#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -54,7 +56,9 @@ static int8_t *nss_pvxlan_log_error_resp
|
||||
"PVXLAN MAC Table Full",
|
||||
"PVXLAN MAC Exists",
|
||||
"PVXLAN MAC Does Not Exist",
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
"PVXLAN Config VP failed"
|
||||
+#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -158,6 +162,7 @@ static void nss_pvxlan_log_mac_del_msg(s
|
||||
nss_pvxlan_log_mac_msg(npvcm);
|
||||
}
|
||||
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
/*
|
||||
* nss_pvxlan_log_unconfig_vp_msg()
|
||||
* Log NSS PVXLAN unconfig VP message.
|
||||
@@ -181,6 +186,7 @@ static void nss_pvxlan_log_config_vp_msg
|
||||
vpm->vp_num,
|
||||
vpm->ppe_to_host ? "enabled" : "disabled");
|
||||
}
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* nss_pvxlan_log_verbose()
|
||||
@@ -213,6 +219,7 @@ static void nss_pvxlan_log_verbose(struc
|
||||
nss_pvxlan_log_mac_del_msg(npvm);
|
||||
break;
|
||||
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
case NSS_PVXLAN_MSG_TYPE_CONFIG_VP:
|
||||
nss_pvxlan_log_config_vp_msg(npvm);
|
||||
break;
|
||||
@@ -220,6 +227,7 @@ static void nss_pvxlan_log_verbose(struc
|
||||
case NSS_PVXLAN_MSG_TYPE_UNCONFIG_VP:
|
||||
nss_pvxlan_log_unconfig_vp_msg(npvm);
|
||||
break;
|
||||
+#endif
|
||||
|
||||
case NSS_PVXLAN_MSG_TYPE_SYNC_STATS:
|
||||
break;
|
||||
--- a/nss_capwap_log.c
|
||||
+++ b/nss_capwap_log.c
|
||||
@@ -166,7 +166,11 @@ static void nss_capwap_flow_rule_msg(str
|
||||
"CAPWAP Destination Port: %d\n"
|
||||
"CAPWAP Source IP: %x %x %x %x\n"
|
||||
"CAPWAP Destination IP: %x %x %x %x"
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
"CAPWAP Flow type:%d Flow ID: %d SCS_SDWF ID: %d",
|
||||
+#else
|
||||
+ "CAPWAP Flow ID: %d",
|
||||
+#endif
|
||||
ncfrm,
|
||||
ncfrm->ip_version, ncfrm->protocol,
|
||||
ncfrm->src_port, ncfrm->dst_port,
|
||||
@@ -174,9 +178,13 @@ static void nss_capwap_flow_rule_msg(str
|
||||
ncfrm->src_ip[2], ncfrm->src_ip[3],
|
||||
ncfrm->dst_ip[0], ncfrm->dst_ip[1],
|
||||
ncfrm->dst_ip[2], ncfrm->dst_ip[3],
|
||||
+#ifdef NSS_FIRMWARE_VERSION_12_5
|
||||
ncfrm->flow_attr.type,
|
||||
ncfrm->flow_attr.flow_id,
|
||||
ncfrm->flow_attr.scs_sdwf_id);
|
||||
+#else
|
||||
+ ncfrm->flow_id);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
Loading…
Reference in New Issue
Block a user