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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user