kernel: refresh IFF_NO_IP_ALIGN ifdef for kernel >= 6.1
[openwrt/staging/ansuel.git] / target / linux / generic / files / drivers / net / phy / ar8216.c
index bf98fd599ecb761d4b4f54c244302a9b1d35a7e6..54a964094f604a92dc0aba9d41f6fa60e4cef0f6 100644 (file)
@@ -2467,7 +2467,9 @@ 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)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
+               dev->priv_flags |= IFF_NO_IP_ALIGN;
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
                dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
 #else
                dev->priv_flags |= IFF_NO_IP_ALIGN;
@@ -2706,7 +2708,9 @@ 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)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
+       dev->priv_flags &= ~IFF_NO_IP_ALIGN;
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
        dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
 #else
        dev->priv_flags &= ~IFF_NO_IP_ALIGN;