diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2021-11-04 23:25:50 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-03-27 00:07:34 +0000 |
commit | 1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6 (patch) | |
tree | 7c015f93344ad49d6dbf9888364b65f442d18483 /target/linux/ath25 | |
parent | 7829ae4a2f9d37fa66b683d5824e0e3e93bb6c50 (diff) | |
download | upstream-1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6.tar.gz upstream-1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6.tar.bz2 upstream-1f302afd7350f46ec0fcc4b12b0ad59ac92fe5b6.zip |
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>
Diffstat (limited to 'target/linux/ath25')
-rw-r--r-- | target/linux/ath25/files/drivers/net/phy/mvswitch.c | 8 |
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 |