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>
priv->orig_features = dev->features;
#ifdef HEADER_MODE
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;
dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
dev->features |= NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_TX;
#else
dev->features |= NETIF_F_HW_VLAN_CTAG_RX;
dev->features |= NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_TX;
#else
dev->features |= NETIF_F_HW_VLAN_CTAG_RX;
dev->eth_mangle_rx = NULL;
dev->eth_mangle_tx = NULL;
dev->features = priv->orig_features;
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;
dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
/* VID fixup only needed on ar8216 */
if (chip_is_ar8216(priv)) {
dev->phy_ptr = priv;
/* VID fixup only needed on ar8216 */
if (chip_is_ar8216(priv)) {
dev->phy_ptr = priv;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
+ dev->priv_flags |= IFF_NO_IP_ALIGN;
+#else LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
dev->extra_priv_flags |= IFF_NO_IP_ALIGN;
dev->eth_mangle_rx = ar8216_mangle_rx;
dev->eth_mangle_tx = ar8216_mangle_tx;
}
dev->eth_mangle_rx = ar8216_mangle_rx;
dev->eth_mangle_tx = ar8216_mangle_tx;
}
#ifdef CONFIG_ETHERNET_PACKET_MANGLE
dev->phy_ptr = NULL;
#ifdef CONFIG_ETHERNET_PACKET_MANGLE
dev->phy_ptr = NULL;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0)
+ dev->priv_flags &= ~IFF_NO_IP_ALIGN;
+#else LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN;
dev->eth_mangle_rx = NULL;
dev->eth_mangle_tx = NULL;
#endif
dev->eth_mangle_rx = NULL;
dev->eth_mangle_tx = NULL;
#endif