From: Pawel Dembicki Date: Wed, 17 Apr 2024 20:50:46 +0000 (+0200) Subject: net: dsa: vsc73xx: use macros for rgmii recognition X-Git-Tag: v6.10-rc1~153^2~204^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12af94b2955fa74548001624839aadce505fe957;p=thirdparty%2Flinux.git net: dsa: vsc73xx: use macros for rgmii recognition It's preparation for future use. At this moment, the RGMII port is used only for a connection to the MAC interface, but in the future, someone could connect a PHY to it. Using the "phy_interface_mode_is_rgmii" macro allows for the proper recognition of all RGMII modes. Suggested-by: Russell King (Oracle) Signed-off-by: Pawel Dembicki Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20240417205048.3542839-4-paweldembicki@gmail.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c index ad3634cf907ed..af148c58315a6 100644 --- a/drivers/net/dsa/vitesse-vsc73xx-core.c +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c @@ -810,7 +810,7 @@ static void vsc73xx_mac_link_up(struct phylink_config *config, else val = VSC73XX_MAC_CFG_TX_IPG_100_10M; - if (interface == PHY_INTERFACE_MODE_RGMII) + if (phy_interface_mode_is_rgmii(interface)) val |= VSC73XX_MAC_CFG_CLK_SEL_1000M; else val |= VSC73XX_MAC_CFG_CLK_SEL_EXT;