aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2021-11-04 23:25:50 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-03-27 00:07:34 +0000
commit1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6 (patch)
tree7c015f93344ad49d6dbf9888364b65f442d18483 /target/linux/generic/files
parent7829ae4a2f9d37fa66b683d5824e0e3e93bb6c50 (diff)
downloadupstream-1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6.tar.gz
upstream-1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6.tar.bz2
upstream-1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6.zip
generic: 5.15: rework hack patch
Rework hack patch in dir for kernel 5.15. For the specific patch of packet mangeling introduce a new extra_priv_flags as we don't have enough space to add additional flags in priv_flags. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c8
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_common.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 11cb18e4f3..3e6494aebb 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -2465,7 +2465,11 @@ ar8xxx_phy_config_init(struct phy_device *phydev)
/* VID fixup only needed on ar8216 */
if (chip_is_ar8216(priv)) {
dev->phy_ptr = priv;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
+ dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
+#else
dev->priv_flags |= IFF_NO_IP_ALIGN;
+#endif
dev->eth_mangle_rx = ar8216_mangle_rx;
dev->eth_mangle_tx = ar8216_mangle_tx;
}
@@ -2700,7 +2704,11 @@ ar8xxx_phy_detach(struct phy_device *phydev)
#ifdef CONFIG_ETHERNET_PACKET_MANGLE
dev->phy_ptr = NULL;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
+ dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
+#else
dev->priv_flags &= ~IFF_NO_IP_ALIGN;
+#endif
dev->eth_mangle_rx = NULL;
dev->eth_mangle_tx = NULL;
#endif
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
index 030c5c86d6..87d731ec3e 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
@@ -529,7 +529,7 @@ static int b53_configure_ports_of(struct b53_device *dev)
po |= PORT_OVERRIDE_SPEED_2000M;
else
po |= GMII_PO_SPEED_2000M;
- /* fall through */
+ fallthrough;
case 1000:
po |= GMII_PO_SPEED_1000M;
break;