diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2022-10-19 23:48:42 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-05-22 22:28:17 +0200 |
commit | 5f987b84ef0b5d6dc2bcc3d15819e1358d1f3eb0 (patch) | |
tree | 8828aab37906ce89aae86558a27910b2893b3ff2 /target/linux/generic | |
parent | 4ed347aaad5de7b50d047f29aa99138b9b265daa (diff) |
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>
Diffstat (limited to 'target/linux/generic')
-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 5e248f856e..876754597a 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -2459,7 +2459,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(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; +#endif dev->eth_mangle_rx = ar8216_mangle_rx; dev->eth_mangle_tx = ar8216_mangle_tx; } @@ -2694,7 +2698,11 @@ ar8xxx_phy_detach(struct phy_device *phydev) #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; +#endif dev->eth_mangle_rx = NULL; dev->eth_mangle_tx = NULL; #endif |