ralink: fix rt3050/5350 ethernet switch support

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48030
master
John Crispin 9 years ago
parent c55d8d4253
commit 6b95386fd3
  1. 28
      target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch

@ -19,8 +19,6 @@ Signed-off-by: Michael Lee <igvtee@gmail.com>
2 files changed, 159 insertions(+), 17 deletions(-) 2 files changed, 159 insertions(+), 17 deletions(-)
create mode 100644 drivers/net/ethernet/mediatek/soc_rt3050.c create mode 100644 drivers/net/ethernet/mediatek/soc_rt3050.c
diff --git a/drivers/net/ethernet/mediatek/esw_rt3050.c b/drivers/net/ethernet/mediatek/esw_rt3050.c
index f07f4a5..670ae16 100644
--- a/drivers/net/ethernet/mediatek/esw_rt3050.c --- a/drivers/net/ethernet/mediatek/esw_rt3050.c
+++ b/drivers/net/ethernet/mediatek/esw_rt3050.c +++ b/drivers/net/ethernet/mediatek/esw_rt3050.c
@@ -14,27 +14,11 @@ @@ -14,27 +14,11 @@
@ -51,7 +49,7 @@ index f07f4a5..670ae16 100644
/* HW limitations for this switch: /* HW limitations for this switch:
* - No large frame support (PKT_MAX_LEN at most 1536) * - No large frame support (PKT_MAX_LEN at most 1536)
* - Can't have untagged vlan and tagged vlan on one port at the same time, * - Can't have untagged vlan and tagged vlan on one port at the same time,
@@ -559,7 +543,7 @@ static irqreturn_t esw_interrupt(int irq, void *_esw) @@ -559,7 +543,7 @@
static int esw_probe(struct platform_device *pdev) static int esw_probe(struct platform_device *pdev)
{ {
@ -60,9 +58,24 @@ index f07f4a5..670ae16 100644
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
const __be32 *port_map, *reg_init; const __be32 *port_map, *reg_init;
struct rt305x_esw *esw; struct rt305x_esw *esw;
diff --git a/drivers/net/ethernet/mediatek/soc_rt3050.c b/drivers/net/ethernet/mediatek/soc_rt3050.c @@ -629,12 +613,9 @@
new file mode 100644 },
index 0000000..228c94f };
-int __init mtk_switch_init(void)
-{
- return platform_driver_register(&esw_driver);
-}
+module_platform_driver(esw_driver);
-void mtk_switch_exit(void)
-{
- platform_driver_unregister(&esw_driver);
-}
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
+MODULE_DESCRIPTION("Switch driver for RT305X SoC");
+MODULE_VERSION(MTK_FE_DRV_VERSION);
--- /dev/null --- /dev/null
+++ b/drivers/net/ethernet/mediatek/soc_rt3050.c +++ b/drivers/net/ethernet/mediatek/soc_rt3050.c
@@ -0,0 +1,158 @@ @@ -0,0 +1,158 @@
@ -224,6 +237,3 @@ index 0000000..228c94f
+}; +};
+ +
+MODULE_DEVICE_TABLE(of, of_fe_match); +MODULE_DEVICE_TABLE(of, of_fe_match);
--
1.7.10.4

Loading…
Cancel
Save