From patchwork Mon Oct 15 10:24:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 984082 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mork.no Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="j82il27/"; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.b="bwfKGOcr"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42YZSs1NZsz9s5c for ; Mon, 15 Oct 2018 21:30:05 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nc8fPJsfLvm8dY5FRfUg2a97PJFRnBrjcrpFlDuSOB4=; b=j82il27/d396N6 8sk4El3ds22RruHCcnGSqlf1ow06tEN72wBEHH3N3SJ+4udNY0/+sp5gj49kJMYHn0aTGM0rSCAcN pfbI22y+ZF2a4y7ZVP3c0JFadkfc3SPMxOl+kvz3Cz8oXElmt3GSIOMMid73N9EiUYSg2ygcVBmqT xUrKm1/8pdQR33Yi2tzyQH/Ul658Zkbi0L4lab1uKaIcZ0Y9bfUoCfIO5IuVMdcGXZa8dYHAJ6FKv QKxX6zeuJSlwYkot/fwkoON1KLudYTS4A+SJQhgsfSqgchB8YYd0r/Nm3YX5zKbcFclky+19xmadp TvINpctnDmhyiP1T2eyw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC08M-0004Uw-6Y; Mon, 15 Oct 2018 10:29:58 +0000 Received: from canardo.mork.no ([2001:4641::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC04D-0002Wy-2H for openwrt-devel@lists.openwrt.org; Mon, 15 Oct 2018 10:26:19 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id w9FAPNlb030825 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Oct 2018 12:25:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1539599123; bh=K96myx1F3awOrqFL6GUUH8yOiYqGxnH5mXmWsyV1gDw=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=bwfKGOcrtHeYZrJRK4cZyG6nq6+pVOEXVlUjmwc9nSzB0WSXuSAwXjuY94Bf7ILlo XePTuCFFzb0kFdKG5aWUqgehqZEsVnZJwnbj6BYRQtQK7+Lv91zDsrEeYO9FUe4ikr qBuGTB9fMDhUdkeZOD7Gag3lXbl5RhbPGAoDUeT0= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id w9FAPNmX030817; Mon, 15 Oct 2018 12:25:23 +0200 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: OpenWrt Development List Date: Mon, 15 Oct 2018 12:24:57 +0200 Message-Id: <20181015102503.30731-4-bjorn@mork.no> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181015102503.30731-1-bjorn@mork.no> References: <20181015102503.30731-1-bjorn@mork.no> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.100.1 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181015_032542_091245_6FE1C1B9 X-CRM114-Status: GOOD ( 13.47 ) X-Spam-Score: -2.4 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [2001:4641:0:0:0:0:0:1 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [OpenWrt-Devel] [RFC 3/9] ramips: rename out-of-tree net driver to "ralink" X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Bj=C3=B8rn_Mork?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Bjørn Mork --- .../drivers/net/ethernet/mediatek/Kconfig | 70 ---------------------- .../drivers/net/ethernet/mediatek/Makefile | 22 ------- .../files-4.14/drivers/net/ethernet/ralink/Kconfig | 70 ++++++++++++++++++++++ .../drivers/net/ethernet/ralink/Makefile | 22 +++++++ .../net/ethernet/{mediatek => ralink}/esw_rt3050.c | 0 .../net/ethernet/{mediatek => ralink}/esw_rt3050.h | 2 +- .../net/ethernet/{mediatek => ralink}/ethtool.c | 0 .../net/ethernet/{mediatek => ralink}/ethtool.h | 0 .../net/ethernet/{mediatek => ralink}/gsw_mt7620.c | 0 .../net/ethernet/{mediatek => ralink}/gsw_mt7620.h | 0 .../net/ethernet/{mediatek => ralink}/gsw_mt7621.c | 0 .../net/ethernet/{mediatek => ralink}/mdio.c | 2 +- .../net/ethernet/{mediatek => ralink}/mdio.h | 2 +- .../ethernet/{mediatek => ralink}/mdio_mt7620.c | 0 .../ethernet/{mediatek => ralink}/mdio_rt2880.c | 0 .../ethernet/{mediatek => ralink}/mdio_rt2880.h | 0 .../net/ethernet/{mediatek => ralink}/mt7530.c | 0 .../net/ethernet/{mediatek => ralink}/mt7530.h | 0 .../ethernet/{mediatek => ralink}/mtk_debugfs.c | 0 .../ethernet/{mediatek => ralink}/mtk_eth_soc.c | 12 ++-- .../ethernet/{mediatek => ralink}/mtk_eth_soc.h | 0 .../ethernet/{mediatek => ralink}/mtk_offload.c | 6 +- .../ethernet/{mediatek => ralink}/mtk_offload.h | 0 .../net/ethernet/{mediatek => ralink}/soc_mt7620.c | 0 .../net/ethernet/{mediatek => ralink}/soc_mt7621.c | 0 .../net/ethernet/{mediatek => ralink}/soc_rt2880.c | 0 .../net/ethernet/{mediatek => ralink}/soc_rt3050.c | 0 .../net/ethernet/{mediatek => ralink}/soc_rt3883.c | 0 target/linux/ramips/mt7620/config-4.14 | 14 ++--- target/linux/ramips/mt7621/config-4.14 | 12 ++-- target/linux/ramips/mt76x8/config-4.14 | 10 ++-- .../patches-4.14/700-add-net-ethernet-ralink.patch | 20 +++++++ target/linux/ramips/rt288x/config-4.14 | 10 ++-- target/linux/ramips/rt305x/config-4.14 | 8 +-- target/linux/ramips/rt3883/config-4.14 | 10 ++-- 35 files changed, 156 insertions(+), 136 deletions(-) delete mode 100644 target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Kconfig delete mode 100644 target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/Makefile create mode 100644 target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/Kconfig create mode 100644 target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/Makefile rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/esw_rt3050.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/esw_rt3050.h (95%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/ethtool.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/ethtool.h (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/gsw_mt7620.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/gsw_mt7620.h (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/gsw_mt7621.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mdio.c (98%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mdio.h (96%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mdio_mt7620.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mdio_rt2880.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mdio_rt2880.h (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mt7530.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mt7530.h (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mtk_debugfs.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mtk_eth_soc.c (99%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mtk_eth_soc.h (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mtk_offload.c (99%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/mtk_offload.h (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/soc_mt7620.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/soc_mt7621.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/soc_rt2880.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/soc_rt3050.c (100%) rename target/linux/ramips/files-4.14/drivers/net/ethernet/{mediatek => ralink}/soc_rt3883.c (100%) create mode 100644 target/linux/ramips/patches-4.14/700-add-net-ethernet-ralink.patch 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 822806fd856f..000000000000 --- 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 b038ae369948..000000000000 --- 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-4.14/drivers/net/ethernet/ralink/Kconfig b/target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/Kconfig new file mode 100644 index 000000000000..9d413d2714bc --- /dev/null +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/Kconfig @@ -0,0 +1,70 @@ +config NET_VENDOR_RALINK + tristate "Mediatek/Ralink ethernet driver" + depends on RALINK + help + This driver supports the ethernet mac inside the Mediatek and 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-4.14/drivers/net/ethernet/ralink/Makefile b/target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/Makefile new file mode 100644 index 000000000000..9dccb8fa6e81 --- /dev/null +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/Makefile @@ -0,0 +1,22 @@ +# +# Makefile for the Ralink SoCs built-in ethernet macs +# + +mtk-eth-soc-y += mtk_eth_soc.o ethtool.o + +mtk-eth-soc-$(CONFIG_NET_RALINK_MDIO) += mdio.o +mtk-eth-soc-$(CONFIG_NET_RALINK_MDIO_RT2880) += mdio_rt2880.o +mtk-eth-soc-$(CONFIG_NET_RALINK_MDIO_MT7620) += mdio_mt7620.o + +mtk-eth-soc-$(CONFIG_NET_RALINK_OFFLOAD) += mtk_offload.o mtk_debugfs.o + +mtk-eth-soc-$(CONFIG_NET_RALINK_RT2880) += soc_rt2880.o +mtk-eth-soc-$(CONFIG_NET_RALINK_RT3050) += soc_rt3050.o +mtk-eth-soc-$(CONFIG_NET_RALINK_RT3883) += soc_rt3883.o +mtk-eth-soc-$(CONFIG_NET_RALINK_MT7620) += soc_mt7620.o +mtk-eth-soc-$(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) += mtk-eth-soc.o diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/esw_rt3050.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/esw_rt3050.h similarity index 95% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.h rename to target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/esw_rt3050.h index b757e5d63946..bbc8fbd52a40 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.h +++ b/target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/ethtool.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/ethtool.h similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/ethtool.h rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/gsw_mt7620.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/gsw_mt7620.h similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.h rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/gsw_mt7621.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mdio.c similarity index 98% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c rename to target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/mdio.c index a1c115687ec5..e2c3a30cec1c 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c +++ b/target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mdio.h similarity index 96% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h rename to target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/mdio.h index 498cf144e631..ca00180af85a 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.h +++ b/target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mdio_mt7620.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_mt7620.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mdio_rt2880.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_rt2880.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mdio_rt2880.h similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio_rt2880.h rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mt7530.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mt7530.h similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.h rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mtk_debugfs.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_debugfs.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mtk_eth_soc.c similarity index 99% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c rename to target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/mtk_eth_soc.c index e0bc0ab818c4..5455e2fa062f 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/mtk_eth_soc.c @@ -933,14 +933,14 @@ static int fe_poll_rx(struct napi_struct *napi, int budget, skb_checksum_none_assert(skb); skb->protocol = eth_type_trans(skb, netdev); -#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); } @@ -1282,7 +1282,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 @@ -1321,7 +1321,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 @@ -1465,7 +1465,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, @@ -1499,7 +1499,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-4.14/drivers/net/ethernet/ralink/mtk_eth_soc.h similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.h rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/mtk_offload.c similarity index 99% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c rename to target/linux/ramips/files-4.14/drivers/net/ethernet/ralink/mtk_offload.c index 3001c081f7c4..9dab5e03be77 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c +++ b/target/linux/ramips/files-4.14/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 @@ -188,7 +188,7 @@ write: return 0; } -#ifdef CONFIG_NET_MEDIATEK_HW_QOS +#ifdef CONFIG_NET_RALINK_HW_QOS #define QDMA_TX_SCH_TX 0x1a14 @@ -379,7 +379,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-4.14/drivers/net/ethernet/ralink/mtk_offload.h similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.h rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/soc_mt7620.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7620.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/soc_mt7621.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_mt7621.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/soc_rt2880.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt2880.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/soc_rt3050.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt3050.c rename to target/linux/ramips/files-4.14/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-4.14/drivers/net/ethernet/ralink/soc_rt3883.c similarity index 100% rename from target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/soc_rt3883.c rename to target/linux/ramips/files-4.14/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 1162ed47b282..639766ecc4a6 100644 --- a/target/linux/ramips/mt7620/config-4.14 +++ b/target/linux/ramips/mt7620/config-4.14 @@ -163,13 +163,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-4.14 b/target/linux/ramips/mt7621/config-4.14 index 0e060237802f..07e0ec5038c5 100644 --- a/target/linux/ramips/mt7621/config-4.14 +++ b/target/linux/ramips/mt7621/config-4.14 @@ -186,12 +186,12 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTK_MTD_NAND=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NET_FLOW_LIMIT=y -CONFIG_NET_MEDIATEK_GSW_MT7621=y -CONFIG_NET_MEDIATEK_MDIO=y -CONFIG_NET_MEDIATEK_MDIO_MT7620=y -CONFIG_NET_MEDIATEK_MT7621=y -CONFIG_NET_MEDIATEK_SOC=y -CONFIG_NET_VENDOR_MEDIATEK=y +CONFIG_NET_RALINK_GSW_MT7621=y +CONFIG_NET_RALINK_MDIO=y +CONFIG_NET_RALINK_MDIO_MT7620=y +CONFIG_NET_RALINK_MT7621=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_NR_CPUS=4 diff --git a/target/linux/ramips/mt76x8/config-4.14 b/target/linux/ramips/mt76x8/config-4.14 index 81e08489315d..3f2e91ede666 100644 --- a/target/linux/ramips/mt76x8/config-4.14 +++ b/target/linux/ramips/mt76x8/config-4.14 @@ -159,11 +159,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/700-add-net-ethernet-ralink.patch b/target/linux/ramips/patches-4.14/700-add-net-ethernet-ralink.patch new file mode 100644 index 000000000000..b662fe5e6f23 --- /dev/null +++ b/target/linux/ramips/patches-4.14/700-add-net-ethernet-ralink.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/rt288x/config-4.14 b/target/linux/ramips/rt288x/config-4.14 index de4dffe885cf..2676a819463c 100644 --- a/target/linux/ramips/rt288x/config-4.14 +++ b/target/linux/ramips/rt288x/config-4.14 @@ -150,11 +150,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 346a8a8814f7..27969e8819a0 100644 --- a/target/linux/ramips/rt305x/config-4.14 +++ b/target/linux/ramips/rt305x/config-4.14 @@ -141,10 +141,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 93d803e2edef..94163d52afa6 100644 --- a/target/linux/ramips/rt3883/config-4.14 +++ b/target/linux/ramips/rt3883/config-4.14 @@ -155,11 +155,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