diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2021-06-09 23:46:35 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2021-06-25 12:30:20 +0200 |
commit | 8569bc5e0d1bdc4b252bf3f4e7c893ea2e17c98f (patch) | |
tree | d5a3ad202bed5ede3c03bcf510f3229012041f77 /target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c | |
parent | 74c58c9d5844d52e23a7fc52f4d45a5fedd06a2b (diff) | |
download | openwrt-8569bc5e0d1bdc4b252bf3f4e7c893ea2e17c98f.tar.gz openwrt-8569bc5e0d1bdc4b252bf3f4e7c893ea2e17c98f.tar.bz2 openwrt-8569bc5e0d1bdc4b252bf3f4e7c893ea2e17c98f.zip |
ramips: ethernet: ralink: rewrite esw_rt3050 to support link states
Ensure the esw is initialized before the ethernet device is sending
packets. Further implement carrier detection similar to mt7620.
If any port has a link, the ethernet device will detect a carrier.
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c index f98d7ec3da..435f007477 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c @@ -17,6 +17,7 @@ #include <asm/mach-ralink/ralink_regs.h> #include "mtk_eth_soc.h" +#include "esw_rt3050.h" #include "mdio_rt2880.h" static const u16 rt5350_reg_table[FE_REG_COUNT] = { @@ -115,6 +116,7 @@ static void rt5350_tx_dma(struct fe_tx_dma *txd) static struct fe_soc_data rt3050_data = { .init_data = rt305x_init_data, .fwd_config = rt3050_fwd_config, + .switch_init = rt3050_esw_init, .pdma_glo_cfg = FE_PDMA_SIZE_8DWORDS, .checksum_bit = RX_DMA_L4VALID, .rx_int = FE_RX_DONE_INT, @@ -127,6 +129,7 @@ static struct fe_soc_data rt5350_data = { .reg_table = rt5350_reg_table, .set_mac = rt5350_set_mac, .fwd_config = rt5350_fwd_config, + .switch_init = rt3050_esw_init, .tx_dma = rt5350_tx_dma, .pdma_glo_cfg = FE_PDMA_SIZE_8DWORDS, .checksum_bit = RX_DMA_L4VALID, |