summaryrefslogtreecommitdiffstats
path: root/target/linux/ath25/files/drivers/net/phy/mvswitch.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath25/files/drivers/net/phy/mvswitch.c')
-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 bd3b9e1ad1..e3550d55ba 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(5,15,0)
+ dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
+#else
dev->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(5,15,0)
+ dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
+#else
dev->priv_flags &= ~IFF_NO_IP_ALIGN;
+#endif
}
static void