From 1e596dac503da44a9fcd3e2654a4963db3e2ee6a Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Wed, 28 Jan 2026 02:38:24 +0100
Subject: [PATCH] net: airoha: fix wrong airoha_get_fe_port()

It seems the SDK where the airoha_get_fe_port() logic was taken was
actually wrong and the AN7583 SoC doesn't have such difference. Instead
it does follow the same port order of AN7581 SoC.

Drop the switch case and apply the same condition on both AN7581 and
AN7583 SoC.

Fixes: e4e5ce823bdd ("net: airoha: Add AN7583 SoC support")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 drivers/net/ethernet/airoha/airoha_eth.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -2519,17 +2519,9 @@ static u32 airoha_get_dsa_tag(struct sk_
 int airoha_get_fe_port(struct airoha_gdm_dev *dev)
 {
 	struct airoha_gdm_port *port = dev->port;
-	struct airoha_eth *eth = dev->eth;
 
-	switch (eth->soc->version) {
-	case 0x7583:
-		return port->id == AIROHA_GDM3_IDX ? FE_PSE_PORT_GDM3
-						   : port->id;
-	case 0x7581:
-	default:
-		return port->id == AIROHA_GDM4_IDX ? FE_PSE_PORT_GDM4
-						   : port->id;
-	}
+	return port->id == AIROHA_GDM4_IDX ? FE_PSE_PORT_GDM4
+					   : port->id;
 }
 
 static netdev_features_t airoha_dev_fix_features(struct net_device *netdev,
