From 6b95386fd321b19936fdf806142ce8a079bfc251 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 1 Jan 2016 21:17:21 +0000 Subject: [PATCH] ralink: fix rt3050/5350 ethernet switch support Signed-off-by: John Crispin SVN-Revision: 48030 --- ...next-mediatek-add-support-for-rt3050.patch | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch b/target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch index 69e06b07ba..8fd09d3694 100644 --- a/target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch +++ b/target/linux/ramips/patches-4.3/0506-net-next-mediatek-add-support-for-rt3050.patch @@ -19,8 +19,6 @@ Signed-off-by: Michael Lee 2 files changed, 159 insertions(+), 17 deletions(-) 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 +++ b/drivers/net/ethernet/mediatek/esw_rt3050.c @@ -14,27 +14,11 @@ @@ -51,7 +49,7 @@ index f07f4a5..670ae16 100644 /* HW limitations for this switch: * - 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, -@@ -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) { @@ -60,9 +58,24 @@ index f07f4a5..670ae16 100644 struct device_node *np = pdev->dev.of_node; const __be32 *port_map, *reg_init; struct rt305x_esw *esw; -diff --git a/drivers/net/ethernet/mediatek/soc_rt3050.c b/drivers/net/ethernet/mediatek/soc_rt3050.c -new file mode 100644 -index 0000000..228c94f +@@ -629,12 +613,9 @@ + }, + }; + +-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 "); ++MODULE_DESCRIPTION("Switch driver for RT305X SoC"); ++MODULE_VERSION(MTK_FE_DRV_VERSION); --- /dev/null +++ b/drivers/net/ethernet/mediatek/soc_rt3050.c @@ -0,0 +1,158 @@ @@ -224,6 +237,3 @@ index 0000000..228c94f +}; + +MODULE_DEVICE_TABLE(of, of_fe_match); --- -1.7.10.4 -