realtek: eth: reorder init_mac() functions
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 4 Jan 2026 19:52:29 +0000 (20:52 +0100)
committerStijn Tintel <stijn@linux-ipv6.be>
Fri, 9 Jan 2026 19:03:04 +0000 (21:03 +0200)
Move the functions close to each other and sort them.
No functional changes here.

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 7641cd95f01b75d02c13688f5c57653521fcafea..6a5cac510fa3bc7725db81d3d90f944c91aa821a 100644 (file)
@@ -1325,12 +1325,6 @@ static int rtl838x_set_mac_address(struct net_device *dev, void *p)
        return 0;
 }
 
-static int rtl8390_init_mac(struct rtl838x_eth_priv *priv)
-{
-       /* We will need to set-up EEE and the egress-rate limitation */
-       return 0;
-}
-
 static int rtl8380_init_mac(struct rtl838x_eth_priv *priv)
 {
        pr_info("%s\n", __func__);
@@ -1345,24 +1339,10 @@ static int rtl8380_init_mac(struct rtl838x_eth_priv *priv)
        return 0;
 }
 
-static int rteth_get_link_ksettings(struct net_device *ndev,
-                                   struct ethtool_link_ksettings *cmd)
-{
-       struct rtl838x_eth_priv *priv = netdev_priv(ndev);
-
-       pr_debug("%s called\n", __func__);
-
-       return phylink_ethtool_ksettings_get(priv->phylink, cmd);
-}
-
-static int rteth_set_link_ksettings(struct net_device *ndev,
-                                   const struct ethtool_link_ksettings *cmd)
+static int rtl8390_init_mac(struct rtl838x_eth_priv *priv)
 {
-       struct rtl838x_eth_priv *priv = netdev_priv(ndev);
-
-       pr_debug("%s called\n", __func__);
-
-       return phylink_ethtool_ksettings_set(priv->phylink, cmd);
+       /* We will need to set-up EEE and the egress-rate limitation */
+       return 0;
 }
 
 static int rtl931x_chip_init(struct rtl838x_eth_priv *priv)
@@ -1398,6 +1378,26 @@ static int rtl931x_chip_init(struct rtl838x_eth_priv *priv)
        return 0;
 }
 
+static int rteth_get_link_ksettings(struct net_device *ndev,
+                                   struct ethtool_link_ksettings *cmd)
+{
+       struct rtl838x_eth_priv *priv = netdev_priv(ndev);
+
+       pr_debug("%s called\n", __func__);
+
+       return phylink_ethtool_ksettings_get(priv->phylink, cmd);
+}
+
+static int rteth_set_link_ksettings(struct net_device *ndev,
+                                   const struct ethtool_link_ksettings *cmd)
+{
+       struct rtl838x_eth_priv *priv = netdev_priv(ndev);
+
+       pr_debug("%s called\n", __func__);
+
+       return phylink_ethtool_ksettings_set(priv->phylink, cmd);
+}
+
 static netdev_features_t rtl838x_fix_features(struct net_device *dev,
                                              netdev_features_t features)
 {