From 62e0f63aa33681409bae8ac544616873ce985dca Mon Sep 17 00:00:00 2001 From: Markus Stockhausen Date: Thu, 23 Apr 2026 13:34:46 +0200 Subject: [PATCH] realtek: eth: convert link up/down to regmap Make use of regmap in rteth_mac_link_down and rteth_mac_link_up. Signed-off-by: Markus Stockhausen Link: https://github.com/openwrt/openwrt/pull/23067 Signed-off-by: Hauke Mehrtens --- .../realtek/files-6.18/drivers/net/ethernet/rtl838x_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/realtek/files-6.18/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.18/drivers/net/ethernet/rtl838x_eth.c index 5739fdae66..2bbe93b48e 100644 --- a/target/linux/realtek/files-6.18/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-6.18/drivers/net/ethernet/rtl838x_eth.c @@ -1114,7 +1114,7 @@ static void rteth_mac_link_down(struct phylink_config *config, pr_debug("In %s\n", __func__); /* Stop TX/RX to port */ - sw_w32_mask(0x03, 0, ctrl->r->mac_l2_port_ctrl); + regmap_clear_bits(ctrl->map, ctrl->r->mac_l2_port_ctrl, 0x3); } static void rteth_mac_link_up(struct phylink_config *config, @@ -1127,7 +1127,7 @@ static void rteth_mac_link_up(struct phylink_config *config, pr_debug("In %s\n", __func__); /* Restart TX/RX to port */ - sw_w32_mask(0, 0x03, ctrl->r->mac_l2_port_ctrl); + regmap_set_bits(ctrl->map, ctrl->r->mac_l2_port_ctrl, 0x3); } static void rteth_set_mac_hw(struct net_device *dev, u8 *mac)