realtek: eth: simplify rtl8380_init_mac()
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 4 Jan 2026 19:42:13 +0000 (20:42 +0100)
committerStijn Tintel <stijn@linux-ipv6.be>
Fri, 9 Jan 2026 19:03:04 +0000 (21:03 +0200)
This function is now only called on RTL838x devices. Remove all
obsolete family checks.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21391
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c

index 69c6e95bd554bc8d2fac36e6005510f63c6dff69..7641cd95f01b75d02c13688f5c57653521fcafea 100644 (file)
@@ -1333,23 +1333,14 @@ static int rtl8390_init_mac(struct rtl838x_eth_priv *priv)
 
 static int rtl8380_init_mac(struct rtl838x_eth_priv *priv)
 {
-       if (priv->r->family_id == RTL8390_FAMILY_ID)
-               return rtl8390_init_mac(priv);
-
-       /* At present we do not know how to set up EEE on any other SoC than RTL8380 */
-       if (priv->r->family_id != RTL8380_FAMILY_ID)
-               return 0;
-
        pr_info("%s\n", __func__);
        /* fix timer for EEE */
        sw_w32(0x5001411, RTL838X_EEE_TX_TIMER_GIGA_CTRL);
        sw_w32(0x5001417, RTL838X_EEE_TX_TIMER_GELITE_CTRL);
 
        /* Init VLAN. TODO: Understand what is being done, here */
-       if (priv->r->family_id == RTL8380_FAMILY_ID) {
-               for (int i = 0; i <= 28; i++)
-                       sw_w32(0, 0xd57c + i * 0x80);
-       }
+       for (int i = 0; i <= 28; i++)
+               sw_w32(0, 0xd57c + i * 0x80);
 
        return 0;
 }