1 From c9101bf318db158e88e293aface9ce952657d958 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Tue, 10 Apr 2018 12:39:06 +0100
4 Subject: [PATCH 270/454] net: lan78xx: Add support for VLAN filtering.
6 HW_VLAN_CTAG_FILTER was partially implemented, but not fully to Linux.
7 Complete the implementation of this.
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
13 drivers/net/usb/lan78xx.c | 5 ++++-
14 1 file changed, 4 insertions(+), 1 deletion(-)
16 --- a/drivers/net/usb/lan78xx.c
17 +++ b/drivers/net/usb/lan78xx.c
18 @@ -2275,7 +2275,7 @@ static int lan78xx_set_features(struct n
19 pdata->rfe_ctl &= ~(RFE_CTL_ICMP_COE_ | RFE_CTL_IGMP_COE_);
22 - if (features & NETIF_F_HW_VLAN_CTAG_RX)
23 + if (features & NETIF_F_HW_VLAN_CTAG_FILTER)
24 pdata->rfe_ctl |= RFE_CTL_VLAN_FILTER_;
26 pdata->rfe_ctl &= ~RFE_CTL_VLAN_FILTER_;
27 @@ -2888,6 +2888,9 @@ static int lan78xx_bind(struct lan78xx_n
28 if (DEFAULT_TSO_CSUM_ENABLE)
29 dev->net->features |= NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG;
31 + if (DEFAULT_VLAN_FILTER_ENABLE)
32 + dev->net->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
34 dev->net->hw_features = dev->net->features;
36 ret = lan78xx_setup_irq_domain(dev);