]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: eth: simplify mac port control access 21691/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sun, 25 Jan 2026 09:23:23 +0000 (10:23 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 27 Jan 2026 00:22:08 +0000 (01:22 +0100)
commit6ac2a17ebf27b7ad29a3aec7fc42bd211bd2ae7d
tree5d2c090ad3c691097388ba92bc16414df2da7e0f
parentfff4fe32ddc8d2dc7c23c4012739ebfd65aba846
realtek: eth: simplify mac port control access

The ethernet driver uses an indirection for access to the MAC_PORT_CTRL
register (aka. MAC_L2_PORT_CTRL on RTL93xx). It defines the base address
and adds up the cpu port offset. This is not needed as the driver does
not handle the non-cpu ports. Use direct register access instead and
avoid register confusion by always using the "_L2_" naming.

While we are here:

- Drop the functions and use defines instead
- Add CPU port defines for better readability

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21691
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h