From f8ec6a3b5fd650650c8e634e05b1bd2ef6fdff54 Mon Sep 17 00:00:00 2001 From: Markus Stockhausen Date: Sun, 4 Jan 2026 20:52:29 +0100 Subject: [PATCH] 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 Link: https://github.com/openwrt/openwrt/pull/21391 Signed-off-by: Stijn Tintel --- .../drivers/net/ethernet/rtl838x_eth.c | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c index 7641cd95f0..6a5cac510f 100644 --- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c +++ b/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) +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_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); + /* 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) {