generic: 5.15: rework hack patch

Rework hack patch in dir for kernel 5.15.
For the specific patch of packet mangeling introduce a new extra_priv_flags
as we don't have enough space to add additional flags in priv_flags.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
Ansuel Smith
2021-11-04 23:25:50 +01:00
committed by Daniel Golle
parent 7829ae4a2f
commit 1f302afd73
19 changed files with 133 additions and 93 deletions

View File

@@ -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