realtek: eth: Rename configuration structure
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Wed, 31 Dec 2025 13:09:58 +0000 (14:09 +0100)
committerRobert Marko <robimarko@gmail.com>
Sun, 4 Jan 2026 18:06:26 +0000 (19:06 +0100)
The name of the configuration structure suggests that it
contains a list of registers. As it contains functions too
change the name according to other realtek drivers.

- "Invent" a new driver prefix "rteth"
- Rename the structure and variables to config/cfg

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21345
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h

index 0684f6c4d7fe76b38f7502027c805d66a0c5cf60..28b5a57ddb6672a5261de295a4c2cfbbd79e9a5d 100644 (file)
@@ -193,7 +193,7 @@ struct rtl838x_eth_priv {
        struct phylink *phylink;
        struct phylink_config phylink_config;
        struct phylink_pcs pcs;
-       const struct rtl838x_eth_reg *r;
+       const struct rteth_config *r;
        u8 cpu_port;
        u32 lastEvent;
        u16 rxrings;
@@ -445,7 +445,7 @@ static irqreturn_t rtl93xx_net_irq(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static const struct rtl838x_eth_reg rtl838x_reg = {
+static const struct rteth_config rteth_838x_cfg = {
        .family_id = RTL8380_FAMILY_ID,
        .net_irq = rtl83xx_net_irq,
        .mac_port_ctrl = rtl838x_mac_port_ctrl,
@@ -471,7 +471,7 @@ static const struct rtl838x_eth_reg rtl838x_reg = {
        .decode_tag = rtl838x_decode_tag,
 };
 
-static const struct rtl838x_eth_reg rtl839x_reg = {
+static const struct rteth_config rteth_839x_cfg = {
        .family_id = RTL8390_FAMILY_ID,
        .net_irq = rtl83xx_net_irq,
        .mac_port_ctrl = rtl839x_mac_port_ctrl,
@@ -497,7 +497,7 @@ static const struct rtl838x_eth_reg rtl839x_reg = {
        .decode_tag = rtl839x_decode_tag,
 };
 
-static const struct rtl838x_eth_reg rtl930x_reg = {
+static const struct rteth_config rteth_930x_cfg = {
        .family_id = RTL9300_FAMILY_ID,
        .net_irq = rtl93xx_net_irq,
        .mac_port_ctrl = rtl930x_mac_port_ctrl,
@@ -529,7 +529,7 @@ static const struct rtl838x_eth_reg rtl930x_reg = {
        .decode_tag = rtl930x_decode_tag,
 };
 
-static const struct rtl838x_eth_reg rtl931x_reg = {
+static const struct rteth_config rteth_931x_cfg = {
        .family_id = RTL9310_FAMILY_ID,
        .net_irq = rtl93xx_net_irq,
        .mac_port_ctrl = rtl931x_mac_port_ctrl,
@@ -1645,7 +1645,7 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
        struct net_device *dev;
        struct device_node *dn = pdev->dev.of_node;
        struct rtl838x_eth_priv *priv;
-       const struct rtl838x_eth_reg *matchdata;
+       const struct rteth_config *matchdata;
        phy_interface_t phy_mode;
        struct phylink *phylink;
        u8 mac_addr[ETH_ALEN];
@@ -1660,7 +1660,7 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
                return -EINVAL;
        }
 
-       matchdata = (const struct rtl838x_eth_reg *)device_get_match_data(&pdev->dev);
+       matchdata = (const struct rteth_config *)device_get_match_data(&pdev->dev);
 
        rxrings = (matchdata->family_id == RTL8380_FAMILY_ID ||
                   matchdata->family_id == RTL8390_FAMILY_ID) ? 8 : 32;
@@ -1830,19 +1830,19 @@ static void rtl838x_eth_remove(struct platform_device *pdev)
 static const struct of_device_id rtl838x_eth_of_ids[] = {
        {
                .compatible = "realtek,rtl8380-eth",
-               .data = &rtl838x_reg,
+               .data = &rteth_838x_cfg,
        },
        {
                .compatible = "realtek,rtl8392-eth",
-               .data = &rtl839x_reg,
+               .data = &rteth_839x_cfg,
        },
        {
                .compatible = "realtek,rtl9301-eth",
-               .data = &rtl930x_reg,
+               .data = &rteth_930x_cfg,
        },
        {
                .compatible = "realtek,rtl9311-eth",
-               .data = &rtl931x_reg,
+               .data = &rteth_931x_cfg,
        },
        { /* sentinel */ }
 };
index eceb6960b67ec7471bd6ca7343f4836fd06be761..4fe5a9e990b149345c7db2ed01d4289a9719587e 100644 (file)
@@ -447,7 +447,7 @@ inline u32 rtl931x_get_mac_tx_pause_sts(int p)
 struct p_hdr;
 struct dsa_tag;
 
-struct rtl838x_eth_reg {
+struct rteth_config {
        int family_id;
        irqreturn_t (*net_irq)(int irq, void *dev_id);
        int (*mac_port_ctrl)(int port);