diff options
author | Aleksander Jan Bajkowski <olek2@wp.pl> | 2023-05-14 11:43:57 +0200 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2023-05-20 15:19:14 +0200 |
commit | 7365e6b00a7ab823467b7d92d4f3f0bdbe271f35 (patch) | |
tree | f3a7cc668c0e4b4a9c3c46a7aac21117a7ed2fc5 /target/linux/ipq40xx/files | |
parent | 5e91b4507c0010970482099464b44a5404835caa (diff) | |
download | upstream-7365e6b00a7ab823467b7d92d4f3f0bdbe271f35.tar.gz upstream-7365e6b00a7ab823467b7d92d4f3f0bdbe271f35.tar.bz2 upstream-7365e6b00a7ab823467b7d92d4f3f0bdbe271f35.zip |
kernel: remove obsolete kernel version switches
This removes unneeded kernel version switches from the targets after
kernel 5.10 has been dropped.
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Diffstat (limited to 'target/linux/ipq40xx/files')
-rw-r--r-- | target/linux/ipq40xx/files/drivers/net/dsa/qca/qca8k-ipq4019.c | 58 | ||||
-rw-r--r-- | target/linux/ipq40xx/files/drivers/net/phy/qca807x.c | 19 |
2 files changed, 0 insertions, 77 deletions
diff --git a/target/linux/ipq40xx/files/drivers/net/dsa/qca/qca8k-ipq4019.c b/target/linux/ipq40xx/files/drivers/net/dsa/qca/qca8k-ipq4019.c index a8c3a20406..202d1a582c 100644 --- a/target/linux/ipq40xx/files/drivers/net/dsa/qca/qca8k-ipq4019.c +++ b/target/linux/ipq40xx/files/drivers/net/dsa/qca/qca8k-ipq4019.c @@ -1435,23 +1435,12 @@ qca8k_port_fdb_dump(struct dsa_switch *ds, int port, return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) -static int -qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering, - struct switchdev_trans *trans) -#else static int qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering, struct netlink_ext_ack *extack) -#endif { struct qca8k_priv *priv = ds->priv; -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) - if (switchdev_trans_ph_prepare(trans)) - return 0; -#endif - if (vlan_filtering) { qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port), QCA8K_PORT_LOOKUP_VLAN_MODE, @@ -1465,70 +1454,32 @@ qca8k_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering, return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) -static int -qca8k_port_vlan_prepare(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan) -{ - return 0; -} -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) -static void -qca8k_port_vlan_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan) -#else static int qca8k_port_vlan_add(struct dsa_switch *ds, int port, const struct switchdev_obj_port_vlan *vlan, struct netlink_ext_ack *extack) -#endif { bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; struct qca8k_priv *priv = ds->priv; int ret = 0; -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) - u16 vid; - for (vid = vlan->vid_begin; vid <= vlan->vid_end && !ret; ++vid) - ret = qca8k_vlan_add(priv, port, vid, untagged); -#else ret = qca8k_vlan_add(priv, port, vlan->vid, untagged); -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) - if (ret) - dev_err(priv->dev, "Failed to add VLAN to port %d (%d)", port, ret); -#else if (ret) { dev_err(priv->dev, "Failed to add VLAN to port %d (%d)", port, ret); return ret; } -#endif if (pvid) { int shift = 16 * (port % 2); qca8k_rmw(priv, QCA8K_EGRESS_VLAN(port), -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) - 0xfff << shift, - vlan->vid_end << shift); -#else 0xfff << shift, vlan->vid << shift); -#endif qca8k_write(priv, QCA8K_REG_PORT_VLAN_CTRL0(port), -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) - QCA8K_PORT_VLAN_CVID(vlan->vid_end) | - QCA8K_PORT_VLAN_SVID(vlan->vid_end)); -#else QCA8K_PORT_VLAN_CVID(vlan->vid) | QCA8K_PORT_VLAN_SVID(vlan->vid)); -#endif } -#if LINUX_VERSION_CODE > KERNEL_VERSION(5,12,0) return 0; -#endif } static int @@ -1537,14 +1488,8 @@ qca8k_port_vlan_del(struct dsa_switch *ds, int port, { struct qca8k_priv *priv = ds->priv; int ret = 0; -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) - u16 vid; - for (vid = vlan->vid_begin; vid <= vlan->vid_end && !ret; ++vid) - ret = qca8k_vlan_del(priv, port, vid); -#else ret = qca8k_vlan_del(priv, port, vlan->vid); -#endif if (ret) dev_err(priv->dev, "Failed to delete VLAN from port %d (%d)", port, ret); @@ -1577,9 +1522,6 @@ static const struct dsa_switch_ops qca8k_switch_ops = { .port_fdb_del = qca8k_port_fdb_del, .port_fdb_dump = qca8k_port_fdb_dump, .port_vlan_filtering = qca8k_port_vlan_filtering, -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) - .port_vlan_prepare = qca8k_port_vlan_prepare, -#endif .port_vlan_add = qca8k_port_vlan_add, .port_vlan_del = qca8k_port_vlan_del, .phylink_validate = qca8k_phylink_validate, diff --git a/target/linux/ipq40xx/files/drivers/net/phy/qca807x.c b/target/linux/ipq40xx/files/drivers/net/phy/qca807x.c index 28e0e6bc8e..23b0ca74f7 100644 --- a/target/linux/ipq40xx/files/drivers/net/phy/qca807x.c +++ b/target/linux/ipq40xx/files/drivers/net/phy/qca807x.c @@ -576,16 +576,6 @@ static int qca807x_config_intr(struct phy_device *phydev) return ret; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) -static int qca807x_ack_intr(struct phy_device *phydev) -{ - int ret; - - ret = phy_read(phydev, QCA807X_INTR_STATUS); - - return (ret < 0) ? ret : 0; -} -#else static irqreturn_t qca807x_handle_interrupt(struct phy_device *phydev) { int irq_status, int_enabled; @@ -611,7 +601,6 @@ static irqreturn_t qca807x_handle_interrupt(struct phy_device *phydev) return IRQ_HANDLED; } -#endif static int qca807x_led_config(struct phy_device *phydev) { @@ -802,11 +791,7 @@ static struct phy_driver qca807x_drivers[] = { .config_init = qca807x_config, .read_status = qca807x_read_status, .config_intr = qca807x_config_intr, -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) - .ack_interrupt = qca807x_ack_intr, -#else .handle_interrupt = qca807x_handle_interrupt, -#endif .soft_reset = genphy_soft_reset, .get_tunable = qca807x_get_tunable, .set_tunable = qca807x_set_tunable, @@ -824,11 +809,7 @@ static struct phy_driver qca807x_drivers[] = { .config_init = qca807x_config, .read_status = qca807x_read_status, .config_intr = qca807x_config_intr, -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,12,0) - .ack_interrupt = qca807x_ack_intr, -#else .handle_interrupt = qca807x_handle_interrupt, -#endif .soft_reset = genphy_soft_reset, .get_tunable = qca807x_get_tunable, .set_tunable = qca807x_set_tunable, |