aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath25
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-10-19 23:48:42 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2023-05-22 22:28:17 +0200
commit5f987b84ef0b5d6dc2bcc3d15819e1358d1f3eb0 (patch)
tree8828aab37906ce89aae86558a27910b2893b3ff2 /target/linux/ath25
parent4ed347aaad5de7b50d047f29aa99138b9b265daa (diff)
downloadupstream-5f987b84ef0b5d6dc2bcc3d15819e1358d1f3eb0.tar.gz
upstream-5f987b84ef0b5d6dc2bcc3d15819e1358d1f3eb0.tar.bz2
upstream-5f987b84ef0b5d6dc2bcc3d15819e1358d1f3eb0.zip
kernel: refresh IFF_NO_IP_ALIGN ifdef for kernel >= 6.1
Kernel 6.1 expanded the priv_flags to long bitmap so update and restore it to priv_flags. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'target/linux/ath25')
-rw-r--r--target/linux/ath25/files/drivers/net/phy/mvswitch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/linux/ath25/files/drivers/net/phy/mvswitch.c b/target/linux/ath25/files/drivers/net/phy/mvswitch.c
index 29f2f9f0e82..285d306ef09 100644
--- a/target/linux/ath25/files/drivers/net/phy/mvswitch.c
+++ b/target/linux/ath25/files/drivers/net/phy/mvswitch.c
@@ -312,7 +312,11 @@ mvswitch_config_init(struct phy_device *pdev)
priv->orig_features = dev->features;
#ifdef HEADER_MODE
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
+ dev->priv_flags |= IFF_NO_IP_ALIGN;
+#else
dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
+#endif
dev->features |= NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_TX;
#else
dev->features |= NETIF_F_HW_VLAN_CTAG_RX;
@@ -372,7 +376,11 @@ mvswitch_detach(struct phy_device *pdev)
dev->eth_mangle_rx = NULL;
dev->eth_mangle_tx = NULL;
dev->features = priv->orig_features;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
+ dev->priv_flags &= ~IFF_NO_IP_ALIGN;
+#else
dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
+#endif
}
static void