]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: eth: make hw_en_rxtx() a config member 22421/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Tue, 24 Mar 2026 07:55:12 +0000 (08:55 +0100)
committerRobert Marko <robimarko@gmail.com>
Wed, 25 Mar 2026 09:26:44 +0000 (10:26 +0100)
commit28165ed3d4dbbecf3ff92971a01e250e67113294
tree3621fc7b0954a3a0f3687969e217c6496193a207
parent81b193aba8f9d12b57997cbaee71b747a390bba4
realtek: eth: make hw_en_rxtx() a config member

Due to the last refactorings it has become clear that the following
code is wrong.

static void rteth_tx_timeout()
{
  ...
  rteth_838x_hw_en_rxtx(ctrl);

A generic function must not call a device specific function directly.
Make hw_en_rxtx() a config member and call that instead of the
functions directly.

With this change another optimization can take place. hw_init()
currently calls device specific hw_en_rxtx() functions at the start
of the function. This is wrong. Initialize the hardware first before
activating the network rx/tx. Take out the multiple calls and place
the rx/tx setup just before the hw_init() call.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22421
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