Browse Source

realtek: eth: reorder init_mac() functions

Move the functions close to each other and sort them.
No functional changes here.

Signed-off-by: Markus Stockhausen <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/21391
Signed-off-by: Stijn Tintel <[email protected]>
Markus Stockhausen 1 week ago
parent
commit
f8ec6a3b5f
1 changed files with 23 additions and 23 deletions
  1. 23 23
      target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c

+ 23 - 23
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c

@@ -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)
 {