developer | 33759cf | 2024-10-11 15:19:50 +0800 | [diff] [blame] | 1 | From 5feba07f7e9ccf9c9a3d862e321c84ac4fd089a9 Mon Sep 17 00:00:00 2001 |
| 2 | From: "neal.yen" <neal.yen@mediatek.com> |
| 3 | Date: Thu, 26 Sep 2024 20:19:57 +0800 |
| 4 | Subject: [PATCH] 999-2743-drivers-net-dsa-mxl862xx-kernel-compatible |
| 5 | |
| 6 | --- |
| 7 | drivers/net/dsa/mxl862xx/mxl862xx.c | 32 ----------------------------- |
| 8 | 1 file changed, 32 deletions(-) |
| 9 | |
| 10 | diff --git a/drivers/net/dsa/mxl862xx/mxl862xx.c b/drivers/net/dsa/mxl862xx/mxl862xx.c |
| 11 | index 5cab346..cbf2fe4 100755 |
| 12 | --- a/drivers/net/dsa/mxl862xx/mxl862xx.c |
| 13 | +++ b/drivers/net/dsa/mxl862xx/mxl862xx.c |
| 14 | @@ -1494,7 +1494,6 @@ static void mxl862xx_phylink_mac_link_down(struct dsa_switch *ds, int port, |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | -#if (KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE) |
| 19 | static void mxl862xx_phylink_mac_link_up(struct dsa_switch *ds, int port, |
| 20 | unsigned int mode, |
| 21 | phy_interface_t interface, |
| 22 | @@ -1589,32 +1588,6 @@ static void mxl862xx_phylink_mac_link_up(struct dsa_switch *ds, int port, |
| 23 | return; |
| 24 | } |
| 25 | |
| 26 | -#else |
| 27 | -static void mxl862xx_phylink_mac_link_up(struct dsa_switch *ds, int port, |
| 28 | - unsigned int mode, |
| 29 | - phy_interface_t interface, |
| 30 | - struct phy_device *phydev) |
| 31 | -{ |
| 32 | - mxl862xx_port_link_cfg_t port_link_cfg = { 0 }; |
| 33 | - int ret; |
| 34 | - |
| 35 | - if (dsa_is_cpu_port(ds, port)) |
| 36 | - return; |
| 37 | - |
| 38 | - port_link_cfg.port_id = port + 1; |
| 39 | - |
| 40 | - port_link_cfg.link_force = true; |
| 41 | - port_link_cfg.link = MXL862XX_PORT_LINK_UP; |
| 42 | - |
| 43 | - ret = mxl862xx_port_link_cfg_set(&mxl_dev, &port_link_cfg); |
| 44 | - if (ret != MXL862XX_STATUS_OK) { |
| 45 | - dev_err(ds->dev, |
| 46 | - "%s: Port link configuration for port %d failed with %d\n", |
| 47 | - __func__, port, ret); |
| 48 | - return; |
| 49 | - } |
| 50 | -} |
| 51 | -#endif |
| 52 | #endif |
| 53 | |
| 54 | static void mxl862xx_get_ethtool_stats(struct dsa_switch *ds, int port, |
| 55 | @@ -4398,13 +4371,8 @@ static int mxl862xx_change_tag_protocol(struct dsa_switch *ds, |
| 56 | } |
| 57 | #endif |
| 58 | |
| 59 | -#if (KERNEL_VERSION(5, 6, 0) > LINUX_VERSION_CODE) |
| 60 | -static enum dsa_tag_protocol mxl862xx_get_tag_protocol(struct dsa_switch *ds, |
| 61 | - int port) |
| 62 | -#else |
| 63 | static enum dsa_tag_protocol mxl862xx_get_tag_protocol(struct dsa_switch *ds, |
| 64 | int port, enum dsa_tag_protocol m) |
| 65 | -#endif |
| 66 | { |
| 67 | enum dsa_tag_protocol tag_proto; |
| 68 | |
| 69 | -- |
| 70 | 2.45.2 |
| 71 | |