diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-10-24 21:14:16 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-02-16 20:06:51 +0100 |
commit | b10d6044599d8c1fa7fbb2374bcbf30118d39db1 (patch) | |
tree | 3fc84f92c14dfa7178487b71e1b8d63c2b688439 /target/linux/generic/files | |
parent | 299b8554183791b325e393c880d32360d7d72f73 (diff) | |
download | upstream-b10d6044599d8c1fa7fbb2374bcbf30118d39db1.tar.gz upstream-b10d6044599d8c1fa7fbb2374bcbf30118d39db1.tar.bz2 upstream-b10d6044599d8c1fa7fbb2374bcbf30118d39db1.zip |
kernel: add linux 5.10 support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/files')
-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 0b0348bfdf..acfa0ebecd 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -513,6 +513,8 @@ ar8216_read_port_link(struct ar8xxx_priv *priv, int port, } } +#ifdef CONFIG_ETHERNET_PACKET_MANGLE + static struct sk_buff * ar8216_mangle_tx(struct net_device *dev, struct sk_buff *skb) { @@ -579,6 +581,8 @@ ar8216_mangle_rx(struct net_device *dev, struct sk_buff *skb) buf[15 + 2] = vlan & 0xff; } +#endif + int ar8216_wait_bit(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val) { @@ -2449,6 +2453,7 @@ ar8xxx_phy_config_init(struct phy_device *phydev) if (ret) return ret; +#ifdef CONFIG_ETHERNET_PACKET_MANGLE /* VID fixup only needed on ar8216 */ if (chip_is_ar8216(priv)) { dev->phy_ptr = priv; @@ -2456,6 +2461,7 @@ ar8xxx_phy_config_init(struct phy_device *phydev) dev->eth_mangle_rx = ar8216_mangle_rx; dev->eth_mangle_tx = ar8216_mangle_tx; } +#endif return 0; } @@ -2687,10 +2693,12 @@ ar8xxx_phy_detach(struct phy_device *phydev) if (!dev) return; +#ifdef CONFIG_ETHERNET_PACKET_MANGLE dev->phy_ptr = NULL; dev->priv_flags &= ~IFF_NO_IP_ALIGN; dev->eth_mangle_rx = NULL; dev->eth_mangle_tx = NULL; +#endif } static void |