aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2020-04-09 14:09:48 +0800
committerChuanhong Guo <gch981213@gmail.com>2020-04-12 22:27:17 +0800
commit33d027c5b8fb5265ea84ac41a7bfedd805c48b24 (patch)
tree81e9e97d1700c47db77ee6c592ac836ad1f669b6 /target/linux/ramips
parentb0ec8d0ca0713113a0384bd74b560bd17c298712 (diff)
downloadupstream-33d027c5b8fb5265ea84ac41a7bfedd805c48b24.tar.gz
upstream-33d027c5b8fb5265ea84ac41a7bfedd805c48b24.tar.bz2
upstream-33d027c5b8fb5265ea84ac41a7bfedd805c48b24.zip
ramips: move and rename out-of-tree mtk eth driver
move the driver into shared 'files' directory and rename all symbols from mediatek/mtk to ralink. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Kconfig70
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Makefile22
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/Kconfig70
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/Makefile22
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.h (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.h)2
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.h (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.h)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.h (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.h)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7621.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c)2
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.h (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h)2
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mdio_mt7620.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_mt7620.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mdio_rt2880.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_rt2880.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mdio_rt2880.h (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_rt2880.h)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.h (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.h)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_debugfs.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_debugfs.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c)12
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.h)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_offload.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c)6
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_offload.h (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.h)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7620.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7621.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt2880.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt2880.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt3050.c)0
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3883.c (renamed from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt3883.c)0
-rw-r--r--target/linux/ramips/mt7620/config-4.1414
-rw-r--r--target/linux/ramips/mt7621/config-5.41
-rw-r--r--target/linux/ramips/mt76x8/config-4.1410
-rw-r--r--target/linux/ramips/patches-4.14/200-add-ralink-eth.patch20
-rw-r--r--target/linux/ramips/patches-5.4/200-add-ralink-eth.patch20
-rw-r--r--target/linux/ramips/rt288x/config-4.1410
-rw-r--r--target/linux/ramips/rt305x/config-4.148
-rw-r--r--target/linux/ramips/rt3883/config-4.1410
36 files changed, 171 insertions, 130 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Kconfig b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Kconfig
deleted file mode 100644
index 822806fd85..0000000000
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Kconfig
+++ /dev/null
@@ -1,70 +0,0 @@
-config NET_VENDOR_MEDIATEK
- tristate "Mediatek/Ralink ethernet driver"
- depends on RALINK
- help
- This driver supports the ethernet mac inside the Mediatek and Ralink WiSoCs
-
-config NET_MEDIATEK_SOC
- def_tristate NET_VENDOR_MEDIATEK
-
-if NET_MEDIATEK_SOC
-choice
- prompt "MAC type"
-
-config NET_MEDIATEK_RT2880
- bool "RT2882"
- depends on MIPS && SOC_RT288X
-
-config NET_MEDIATEK_RT3050
- bool "RT3050/MT7628"
- depends on MIPS && (SOC_RT305X || SOC_MT7620)
-
-config NET_MEDIATEK_RT3883
- bool "RT3883"
- depends on MIPS && SOC_RT3883
-
-config NET_MEDIATEK_MT7620
- bool "MT7620"
- depends on MIPS && SOC_MT7620
-
-config NET_MEDIATEK_MT7621
- bool "MT7621"
- depends on MIPS && SOC_MT7621
-
-endchoice
-
-config NET_MEDIATEK_OFFLOAD
- def_bool NET_MEDIATEK_SOC
- depends on NET_MEDIATEK_MT7621
-
-config NET_MEDIATEK_HW_QOS
- def_bool NET_MEDIATEK_SOC
- depends on NET_MEDIATEK_MT7623
-
-config NET_MEDIATEK_MDIO
- def_bool NET_MEDIATEK_SOC
- depends on (NET_MEDIATEK_RT2880 || NET_MEDIATEK_RT3883 || NET_MEDIATEK_MT7620 || NET_MEDIATEK_MT7621)
- select PHYLIB
-
-config NET_MEDIATEK_MDIO_RT2880
- def_bool NET_MEDIATEK_SOC
- depends on (NET_MEDIATEK_RT2880 || NET_MEDIATEK_RT3883)
- select NET_MEDIATEK_MDIO
-
-config NET_MEDIATEK_MDIO_MT7620
- def_bool NET_MEDIATEK_SOC
- depends on (NET_MEDIATEK_MT7620 || NET_MEDIATEK_MT7621)
- select NET_MEDIATEK_MDIO
-
-config NET_MEDIATEK_ESW_RT3050
- def_tristate NET_MEDIATEK_SOC
- depends on NET_MEDIATEK_RT3050
-
-config NET_MEDIATEK_GSW_MT7620
- def_tristate NET_MEDIATEK_SOC
- depends on NET_MEDIATEK_MT7620
-
-config NET_MEDIATEK_GSW_MT7621
- def_tristate NET_MEDIATEK_SOC
- depends on NET_MEDIATEK_MT7621
-endif
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Makefile b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Makefile
deleted file mode 100644
index b038ae3699..0000000000
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Makefile for the Ralink SoCs built-in ethernet macs
-#
-
-mtk-eth-soc-y += mtk_eth_soc.o ethtool.o
-
-mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO) += mdio.o
-mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO_RT2880) += mdio_rt2880.o
-mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MDIO_MT7620) += mdio_mt7620.o
-
-mtk-eth-soc-$(CONFIG_NET_MEDIATEK_OFFLOAD) += mtk_offload.o mtk_debugfs.o
-
-mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT2880) += soc_rt2880.o
-mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT3050) += soc_rt3050.o
-mtk-eth-soc-$(CONFIG_NET_MEDIATEK_RT3883) += soc_rt3883.o
-mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7620) += soc_mt7620.o
-mtk-eth-soc-$(CONFIG_NET_MEDIATEK_MT7621) += soc_mt7621.o
-
-obj-$(CONFIG_NET_MEDIATEK_ESW_RT3050) += esw_rt3050.o
-obj-$(CONFIG_NET_MEDIATEK_GSW_MT7620) += gsw_mt7620.o mt7530.o
-obj-$(CONFIG_NET_MEDIATEK_GSW_MT7621) += gsw_mt7621.o mt7530.o
-obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk-eth-soc.o
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/Kconfig b/target/linux/ramips/files/drivers/net/ethernet/ralink/Kconfig
new file mode 100644
index 0000000000..51cace5333
--- /dev/null
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/Kconfig
@@ -0,0 +1,70 @@
+config NET_VENDOR_RALINK
+ tristate "Ralink ethernet driver"
+ depends on RALINK
+ help
+ This driver supports the ethernet mac inside Ralink WiSoCs
+
+config NET_RALINK_SOC
+ def_tristate NET_VENDOR_RALINK
+
+if NET_RALINK_SOC
+choice
+ prompt "MAC type"
+
+config NET_RALINK_RT2880
+ bool "RT2882"
+ depends on MIPS && SOC_RT288X
+
+config NET_RALINK_RT3050
+ bool "RT3050/MT7628"
+ depends on MIPS && (SOC_RT305X || SOC_MT7620)
+
+config NET_RALINK_RT3883
+ bool "RT3883"
+ depends on MIPS && SOC_RT3883
+
+config NET_RALINK_MT7620
+ bool "MT7620"
+ depends on MIPS && SOC_MT7620
+
+config NET_RALINK_MT7621
+ bool "MT7621"
+ depends on MIPS && SOC_MT7621
+
+endchoice
+
+config NET_RALINK_OFFLOAD
+ def_bool NET_RALINK_SOC
+ depends on NET_RALINK_MT7621
+
+config NET_RALINK_HW_QOS
+ def_bool NET_RALINK_SOC
+ depends on NET_RALINK_MT7623
+
+config NET_RALINK_MDIO
+ def_bool NET_RALINK_SOC
+ depends on (NET_RALINK_RT2880 || NET_RALINK_RT3883 || NET_RALINK_MT7620 || NET_RALINK_MT7621)
+ select PHYLIB
+
+config NET_RALINK_MDIO_RT2880
+ def_bool NET_RALINK_SOC
+ depends on (NET_RALINK_RT2880 || NET_RALINK_RT3883)
+ select NET_RALINK_MDIO
+
+config NET_RALINK_MDIO_MT7620
+ def_bool NET_RALINK_SOC
+ depends on (NET_RALINK_MT7620 || NET_RALINK_MT7621)
+ select NET_RALINK_MDIO
+
+config NET_RALINK_ESW_RT3050
+ def_tristate NET_RALINK_SOC
+ depends on NET_RALINK_RT3050
+
+config NET_RALINK_GSW_MT7620
+ def_tristate NET_RALINK_SOC
+ depends on NET_RALINK_MT7620
+
+config NET_RALINK_GSW_MT7621
+ def_tristate NET_RALINK_SOC
+ depends on NET_RALINK_MT7621
+endif
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/Makefile b/target/linux/ramips/files/drivers/net/ethernet/ralink/Makefile
new file mode 100644
index 0000000000..eba21643b2
--- /dev/null
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/Makefile
@@ -0,0 +1,22 @@
+#
+# Makefile for the Ralink SoCs built-in ethernet macs
+#
+
+ralink-eth-y += mtk_eth_soc.o ethtool.o
+
+ralink-eth-$(CONFIG_NET_RALINK_MDIO) += mdio.o
+ralink-eth-$(CONFIG_NET_RALINK_MDIO_RT2880) += mdio_rt2880.o
+ralink-eth-$(CONFIG_NET_RALINK_MDIO_MT7620) += mdio_mt7620.o
+
+ralink-eth-$(CONFIG_NET_RALINK_OFFLOAD) += mtk_offload.o mtk_debugfs.o
+
+ralink-eth-$(CONFIG_NET_RALINK_RT2880) += soc_rt2880.o
+ralink-eth-$(CONFIG_NET_RALINK_RT3050) += soc_rt3050.o
+ralink-eth-$(CONFIG_NET_RALINK_RT3883) += soc_rt3883.o
+ralink-eth-$(CONFIG_NET_RALINK_MT7620) += soc_mt7620.o
+ralink-eth-$(CONFIG_NET_RALINK_MT7621) += soc_mt7621.o
+
+obj-$(CONFIG_NET_RALINK_ESW_RT3050) += esw_rt3050.o
+obj-$(CONFIG_NET_RALINK_GSW_MT7620) += gsw_mt7620.o mt7530.o
+obj-$(CONFIG_NET_RALINK_GSW_MT7621) += gsw_mt7621.o mt7530.o
+obj-$(CONFIG_NET_RALINK_SOC) += ralink-eth.o
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c
index 292f11a170..292f11a170 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.h
index b757e5d639..bbc8fbd52a 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.h
@@ -15,7 +15,7 @@
#ifndef _RALINK_ESW_RT3052_H__
#define _RALINK_ESW_RT3052_H__
-#ifdef CONFIG_NET_MEDIATEK_ESW_RT3052
+#ifdef CONFIG_NET_RALINK_ESW_RT3052
int __init mtk_switch_init(void);
void mtk_switch_exit(void);
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c
index 5732c28536..5732c28536 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.h
index 6fd16f0b66..6fd16f0b66 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.h
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c
index bd379e6c7d..bd379e6c7d 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.h
index 03d030446a..03d030446a 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.h
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7621.c
index 232bcd8cf4..232bcd8cf4 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7621.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
index ce27abf69c..28c9250162 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
@@ -110,7 +110,7 @@ static void phy_init(struct fe_priv *priv, struct phy_device *phy)
phy->autoneg = AUTONEG_ENABLE;
phy->speed = 0;
phy->duplex = 0;
- phy->supported &= IS_ENABLED(CONFIG_NET_MEDIATEK_MDIO_MT7620) ?
+ phy->supported &= IS_ENABLED(CONFIG_NET_RALINK_MDIO_MT7620) ?
PHY_GBIT_FEATURES : PHY_BASIC_FEATURES;
phy->advertising = phy->supported | ADVERTISED_Autoneg;
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.h
index 78364e33a1..d4a2a40473 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.h
@@ -15,7 +15,7 @@
#ifndef _RALINK_MDIO_H__
#define _RALINK_MDIO_H__
-#ifdef CONFIG_NET_MEDIATEK_MDIO
+#ifdef CONFIG_NET_RALINK_MDIO
int fe_mdio_init(struct fe_priv *priv);
void fe_mdio_cleanup(struct fe_priv *priv);
int fe_connect_phy_node(struct fe_priv *priv,
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_mt7620.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio_mt7620.c
index 9efe7896a5..9efe7896a5 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_mt7620.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio_mt7620.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_rt2880.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio_rt2880.c
index 8d82c8f7ad..8d82c8f7ad 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_rt2880.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio_rt2880.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_rt2880.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio_rt2880.h
index 70e344283e..70e344283e 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_rt2880.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio_rt2880.h
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c
index d1e56a76e9..d1e56a76e9 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.h
index cf725c2f2b..cf725c2f2b 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mt7530.h
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_debugfs.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_debugfs.c
index 2938119e89..2938119e89 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_debugfs.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_debugfs.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
index 00e84bbcfb..e3a35c7c22 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
@@ -941,14 +941,14 @@ static int fe_poll_rx(struct napi_struct *napi, int budget,
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
RX_DMA_VID(trxd.rxd3));
-#ifdef CONFIG_NET_MEDIATEK_OFFLOAD
+#ifdef CONFIG_NET_RALINK_OFFLOAD
if (mtk_offload_check_rx(priv, skb, trxd.rxd4) == 0) {
#endif
stats->rx_packets++;
stats->rx_bytes += pktlen;
napi_gro_receive(napi, skb);
-#ifdef CONFIG_NET_MEDIATEK_OFFLOAD
+#ifdef CONFIG_NET_RALINK_OFFLOAD
} else {
dev_kfree_skb(skb);
}
@@ -1290,7 +1290,7 @@ static int fe_open(struct net_device *dev)
napi_enable(&priv->rx_napi);
fe_int_enable(priv->soc->tx_int | priv->soc->rx_int);
netif_start_queue(dev);
-#ifdef CONFIG_NET_MEDIATEK_OFFLOAD
+#ifdef CONFIG_NET_RALINK_OFFLOAD
mtk_ppe_probe(priv);
#endif
@@ -1329,7 +1329,7 @@ static int fe_stop(struct net_device *dev)
fe_free_dma(priv);
-#ifdef CONFIG_NET_MEDIATEK_OFFLOAD
+#ifdef CONFIG_NET_RALINK_OFFLOAD
mtk_ppe_remove(priv);
#endif
@@ -1493,7 +1493,7 @@ static int fe_change_mtu(struct net_device *dev, int new_mtu)
return fe_open(dev);
}
-#ifdef CONFIG_NET_MEDIATEK_OFFLOAD
+#ifdef CONFIG_NET_RALINK_OFFLOAD
static int
fe_flow_offload(enum flow_offload_type type, struct flow_offload *flow,
struct flow_offload_hw_path *src,
@@ -1527,7 +1527,7 @@ static const struct net_device_ops fe_netdev_ops = {
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = fe_poll_controller,
#endif
-#ifdef CONFIG_NET_MEDIATEK_OFFLOAD
+#ifdef CONFIG_NET_RALINK_OFFLOAD
.ndo_flow_offload = fe_flow_offload,
#endif
};
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h
index 2f6fe1724c..2f6fe1724c 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_offload.c
index 6c23bbc036..2fd424f6e3 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_offload.c
@@ -60,7 +60,7 @@ mtk_foe_prepare_v4(struct mtk_foe_entry *entry,
entry->ipv4_hnapt.iblk2.dscp = 0;
entry->ipv4_hnapt.iblk2.port_mg = 0x3f;
entry->ipv4_hnapt.iblk2.port_ag = 0x1f;
-#ifdef CONFIG_NET_MEDIATEK_HW_QOS
+#ifdef CONFIG_NET_RALINK_HW_QOS
entry->ipv4_hnapt.iblk2.qid = 1;
entry->ipv4_hnapt.iblk2.fqos = 1;
#endif
@@ -202,7 +202,7 @@ int mtk_flow_offload(struct mtk_eth *eth,
return 0;
}
-#ifdef CONFIG_NET_MEDIATEK_HW_QOS
+#ifdef CONFIG_NET_RALINK_HW_QOS
#define QDMA_TX_SCH_TX 0x1a14
@@ -393,7 +393,7 @@ static int mtk_ppe_start(struct mtk_eth *eth)
dev_info(eth->dev, "PPE started\n");
-#ifdef CONFIG_NET_MEDIATEK_HW_QOS
+#ifdef CONFIG_NET_RALINK_HW_QOS
mtk_ppe_scheduler(eth, 0, 500000);
mtk_ppe_scheduler(eth, 1, 500000);
mtk_ppe_queue(eth, 0, 0, 7, 32, 250000, 0);
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_offload.h
index f714c90f92..f714c90f92 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_offload.h
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7620.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c
index c4684d02d6..c4684d02d6 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7620.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7621.c
index 26a198fa2b..26a198fa2b 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7621.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt2880.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt2880.c
index 6c89c997d9..6c89c997d9 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt2880.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt2880.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt3050.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c
index 914b81410e..914b81410e 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt3050.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt3883.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3883.c
index 4935b7fbd4..4935b7fbd4 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt3883.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3883.c
diff --git a/target/linux/ramips/mt7620/config-4.14 b/target/linux/ramips/mt7620/config-4.14
index 92a7a2fd38..635b3c67f8 100644
--- a/target/linux/ramips/mt7620/config-4.14
+++ b/target/linux/ramips/mt7620/config-4.14
@@ -164,13 +164,13 @@ CONFIG_MTD_SPLIT_TPLINK_FW=y
CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NET_MEDIATEK_GSW_MT7620=y
-CONFIG_NET_MEDIATEK_MDIO=y
-CONFIG_NET_MEDIATEK_MDIO_MT7620=y
-CONFIG_NET_MEDIATEK_MT7620=y
-# CONFIG_NET_MEDIATEK_RT3050 is not set
-CONFIG_NET_MEDIATEK_SOC=y
-CONFIG_NET_VENDOR_MEDIATEK=y
+CONFIG_NET_RALINK_GSW_MT7620=y
+CONFIG_NET_RALINK_MDIO=y
+CONFIG_NET_RALINK_MDIO_MT7620=y
+CONFIG_NET_RALINK_MT7620=y
+# CONFIG_NET_RALINK_RT3050 is not set
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_VENDOR_RALINK=y
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
# CONFIG_NO_IOPORT_MAP is not set
CONFIG_OF=y
diff --git a/target/linux/ramips/mt7621/config-5.4 b/target/linux/ramips/mt7621/config-5.4
index 9fb90b8625..2d887d776b 100644
--- a/target/linux/ramips/mt7621/config-5.4
+++ b/target/linux/ramips/mt7621/config-5.4
@@ -227,6 +227,7 @@ CONFIG_NET_FLOW_LIMIT=y
CONFIG_NET_MEDIATEK_SOC=y
CONFIG_NET_SWITCHDEV=y
CONFIG_NET_VENDOR_MEDIATEK=y
+# CONFIG_NET_VENDOR_RALINK is not set
CONFIG_NR_CPUS=4
CONFIG_OF=y
CONFIG_OF_ADDRESS=y
diff --git a/target/linux/ramips/mt76x8/config-4.14 b/target/linux/ramips/mt76x8/config-4.14
index 21cf070374..3fd8bd54a9 100644
--- a/target/linux/ramips/mt76x8/config-4.14
+++ b/target/linux/ramips/mt76x8/config-4.14
@@ -158,11 +158,11 @@ CONFIG_MTD_SPLIT_TRX_FW=y
CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NET_MEDIATEK_ESW_RT3050=y
-# CONFIG_NET_MEDIATEK_MT7620 is not set
-CONFIG_NET_MEDIATEK_RT3050=y
-CONFIG_NET_MEDIATEK_SOC=y
-CONFIG_NET_VENDOR_MEDIATEK=y
+CONFIG_NET_RALINK_ESW_RT3050=y
+# CONFIG_NET_RALINK_MT7620 is not set
+CONFIG_NET_RALINK_RT3050=y
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_VENDOR_RALINK=y
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
# CONFIG_NO_IOPORT_MAP is not set
CONFIG_OF=y
diff --git a/target/linux/ramips/patches-4.14/200-add-ralink-eth.patch b/target/linux/ramips/patches-4.14/200-add-ralink-eth.patch
new file mode 100644
index 0000000000..b662fe5e6f
--- /dev/null
+++ b/target/linux/ramips/patches-4.14/200-add-ralink-eth.patch
@@ -0,0 +1,20 @@
+--- a/drivers/net/ethernet/Kconfig
++++ b/drivers/net/ethernet/Kconfig
+@@ -159,6 +159,7 @@ source "drivers/net/ethernet/packetengin
+ source "drivers/net/ethernet/pasemi/Kconfig"
+ source "drivers/net/ethernet/qlogic/Kconfig"
+ source "drivers/net/ethernet/qualcomm/Kconfig"
++source "drivers/net/ethernet/ralink/Kconfig"
+ source "drivers/net/ethernet/realtek/Kconfig"
+ source "drivers/net/ethernet/renesas/Kconfig"
+ source "drivers/net/ethernet/rdc/Kconfig"
+--- a/drivers/net/ethernet/Makefile
++++ b/drivers/net/ethernet/Makefile
+@@ -70,6 +70,7 @@ obj-$(CONFIG_NET_PACKET_ENGINE) += packe
+ obj-$(CONFIG_NET_VENDOR_PASEMI) += pasemi/
+ obj-$(CONFIG_NET_VENDOR_QLOGIC) += qlogic/
+ obj-$(CONFIG_NET_VENDOR_QUALCOMM) += qualcomm/
++obj-$(CONFIG_NET_VENDOR_RALINK) += ralink/
+ obj-$(CONFIG_NET_VENDOR_REALTEK) += realtek/
+ obj-$(CONFIG_NET_VENDOR_RENESAS) += renesas/
+ obj-$(CONFIG_NET_VENDOR_RDC) += rdc/
diff --git a/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch b/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch
new file mode 100644
index 0000000000..b8fd8e511d
--- /dev/null
+++ b/target/linux/ramips/patches-5.4/200-add-ralink-eth.patch
@@ -0,0 +1,20 @@
+--- a/drivers/net/ethernet/Kconfig
++++ b/drivers/net/ethernet/Kconfig
+@@ -159,6 +159,7 @@ source "drivers/net/ethernet/pasemi/Kcon
+ source "drivers/net/ethernet/pensando/Kconfig"
+ source "drivers/net/ethernet/qlogic/Kconfig"
+ source "drivers/net/ethernet/qualcomm/Kconfig"
++source "drivers/net/ethernet/ralink/Kconfig"
+ source "drivers/net/ethernet/rdc/Kconfig"
+ source "drivers/net/ethernet/realtek/Kconfig"
+ source "drivers/net/ethernet/renesas/Kconfig"
+--- a/drivers/net/ethernet/Makefile
++++ b/drivers/net/ethernet/Makefile
+@@ -72,6 +72,7 @@ obj-$(CONFIG_NET_VENDOR_PACKET_ENGINES)
+ obj-$(CONFIG_NET_VENDOR_PASEMI) += pasemi/
+ obj-$(CONFIG_NET_VENDOR_QLOGIC) += qlogic/
+ obj-$(CONFIG_NET_VENDOR_QUALCOMM) += qualcomm/
++obj-$(CONFIG_NET_VENDOR_RALINK) += ralink/
+ obj-$(CONFIG_NET_VENDOR_REALTEK) += realtek/
+ obj-$(CONFIG_NET_VENDOR_RENESAS) += renesas/
+ obj-$(CONFIG_NET_VENDOR_RDC) += rdc/
diff --git a/target/linux/ramips/rt288x/config-4.14 b/target/linux/ramips/rt288x/config-4.14
index 9c713fd2bd..44b20edad6 100644
--- a/target/linux/ramips/rt288x/config-4.14
+++ b/target/linux/ramips/rt288x/config-4.14
@@ -149,11 +149,11 @@ CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_MTD_SPLIT_WRGG_FW=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NET_MEDIATEK_MDIO=y
-CONFIG_NET_MEDIATEK_MDIO_RT2880=y
-CONFIG_NET_MEDIATEK_RT2880=y
-CONFIG_NET_MEDIATEK_SOC=y
-CONFIG_NET_VENDOR_MEDIATEK=y
+CONFIG_NET_RALINK_MDIO=y
+CONFIG_NET_RALINK_MDIO_RT2880=y
+CONFIG_NET_RALINK_RT2880=y
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_VENDOR_RALINK=y
CONFIG_NLS=m
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
# CONFIG_NO_IOPORT_MAP is not set
diff --git a/target/linux/ramips/rt305x/config-4.14 b/target/linux/ramips/rt305x/config-4.14
index 60197a1eb8..4f3234f497 100644
--- a/target/linux/ramips/rt305x/config-4.14
+++ b/target/linux/ramips/rt305x/config-4.14
@@ -140,10 +140,10 @@ CONFIG_MTD_SPLIT_SEAMA_FW=y
CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NET_MEDIATEK_ESW_RT3050=y
-CONFIG_NET_MEDIATEK_RT3050=y
-CONFIG_NET_MEDIATEK_SOC=y
-CONFIG_NET_VENDOR_MEDIATEK=y
+CONFIG_NET_RALINK_ESW_RT3050=y
+CONFIG_NET_RALINK_RT3050=y
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_VENDOR_RALINK=y
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
# CONFIG_NO_IOPORT_MAP is not set
CONFIG_OF=y
diff --git a/target/linux/ramips/rt3883/config-4.14 b/target/linux/ramips/rt3883/config-4.14
index f16b09deb0..2eda81f160 100644
--- a/target/linux/ramips/rt3883/config-4.14
+++ b/target/linux/ramips/rt3883/config-4.14
@@ -153,11 +153,11 @@ CONFIG_MTD_SPLIT_SEAMA_FW=y
CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NET_MEDIATEK_MDIO=y
-CONFIG_NET_MEDIATEK_MDIO_RT2880=y
-CONFIG_NET_MEDIATEK_RT3883=y
-CONFIG_NET_MEDIATEK_SOC=y
-CONFIG_NET_VENDOR_MEDIATEK=y
+CONFIG_NET_RALINK_MDIO=y
+CONFIG_NET_RALINK_MDIO_RT2880=y
+CONFIG_NET_RALINK_RT3883=y
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_VENDOR_RALINK=y
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
# CONFIG_NO_IOPORT_MAP is not set
CONFIG_OF=y