xx_vv_immortalwrt/package/kernel/qca-ssdk/patches/121-MP-fix-build-issues.patch
2025-02-26 17:30:00 +08:00

76 lines
2.0 KiB
Diff

From a4378eb29c7b9dd95601d20f507a2220457f8ede Mon Sep 17 00:00:00 2001
From: Ziyang Huang <hzyitc@outlook.com>
Date: Sun, 8 Sep 2024 15:24:07 +0800
Subject: [PATCH] MP: fix build issues
Enable the IN_VSI make flag which enables macro definitions needed to
successfully compile the SSDK for the ipq50xx target. In addition, fix an
incorrect return type by expanding the macro called and return a boolean
instead of an integer.
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
config | 30 +-----------------------------
src/adpt/mp/adpt_mp_portctrl.c | 3 ++-
2 files changed, 3 insertions(+), 30 deletions(-)
--- a/config
+++ b/config
@@ -374,6 +374,7 @@ ifneq (, $(filter MPPE APPE HPPE CPPE AL
endif
ifneq (, $(filter MP, $(CHIP_TYPE)))
+ IN_VSI=TRUE
IN_UNIPHY=TRUE
endif
@@ -436,35 +437,6 @@ endif
# SDK Features According To Specfic Switch #
#############################################
ifeq (MP, $(CHIP_TYPE))
- ifeq (disable, $(ISISC_ENABLE))
- IN_ACL=FALSE
- IN_FDB=FALSE
- IN_IGMP=FALSE
- IN_LEAKY=FALSE
- IN_LED=FALSE
- IN_MIRROR=FALSE
- IN_MISC=FALSE
- IN_PORTVLAN=FALSE
- IN_QOS=FALSE
- IN_RATE=FALSE
- IN_STP=FALSE
- IN_VLAN=FALSE
- IN_REDUCED_ACL=FALSE
- IN_COSMAP=FALSE
- IN_IP=FALSE
- IN_NAT=FALSE
- IN_FLOW=FALSE
- IN_TRUNK=FALSE
- IN_RSS_HASH=FALSE
- IN_SEC=FALSE
- IN_QM=FALSE
- IN_PPPOE=FALSE
- IN_VSI=FALSE
- IN_SERVCODE=FALSE
- IN_BM=FALSE
- IN_SHAPER=FALSE
- IN_POLICER=FALSE
- endif
IN_CTRLPKT=TRUE
endif
--- a/src/adpt/mp/adpt_mp_portctrl.c
+++ b/src/adpt/mp/adpt_mp_portctrl.c
@@ -45,7 +45,8 @@ _adpt_mp_gcc_mac_clock_set(a_uint32_t de
static a_bool_t
_adpt_mp_port_phy_connected (a_uint32_t dev_id, fal_port_t port_id)
{
- ADPT_DEV_ID_CHECK(dev_id);
+ if (dev_id >= SW_MAX_NR_DEV)
+ return A_FALSE;
/* force port which connect s17c or other device chip*/
if (hsl_port_feature_get(dev_id, port_id, PHY_F_FORCE | PHY_F_SFP)) {