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/generic/files/drivers/net/phy/ar8216.c | |
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/generic/files/drivers/net/phy/ar8216.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 11cb18e4f3..3e6494aebb 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -2465,7 +2465,11 @@ 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) + dev->extra_priv_flags |= IFF_NO_IP_ALIGN; +#else dev->priv_flags |= IFF_NO_IP_ALIGN; +#endif dev->eth_mangle_rx = ar8216_mangle_rx; dev->eth_mangle_tx = ar8216_mangle_tx; } @@ -2700,7 +2704,11 @@ 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) + dev->extra_priv_flags &= ~IFF_NO_IP_ALIGN; +#else dev->priv_flags &= ~IFF_NO_IP_ALIGN; +#endif dev->eth_mangle_rx = NULL; dev->eth_mangle_tx = NULL; #endif |