aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/usb/lan78xx.c
diff options
context:
space:
mode:
authorDave Stevenson <dave.stevenson@raspberrypi.org>2018-06-25 15:07:13 +0100
committerDavid S. Miller <davem@davemloft.net>2018-06-26 22:53:29 +0900
commit4a27327b156e1e543c839a9358ba885564729ae7 (patch)
tree22a605480b206cc711ca5053d466dc2c9ed62547 /drivers/net/usb/lan78xx.c
parentnet: lan78xx: Allow for VLAN headers in timeout calcs (diff)
downloadwireguard-linux-4a27327b156e1e543c839a9358ba885564729ae7.tar.xz
wireguard-linux-4a27327b156e1e543c839a9358ba885564729ae7.zip
net: lan78xx: Add support for VLAN filtering.
HW_VLAN_CTAG_FILTER was partially implemented, but not advertised to Linux. Complete the implementation of this. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/lan78xx.c')
-rw-r--r--drivers/net/usb/lan78xx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 1a1d3cc8e308..bd41a36924db 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2363,7 +2363,7 @@ static int lan78xx_set_features(struct net_device *netdev,
pdata->rfe_ctl &= ~(RFE_CTL_ICMP_COE_ | RFE_CTL_IGMP_COE_);
}
- if (features & NETIF_F_HW_VLAN_CTAG_RX)
+ if (features & NETIF_F_HW_VLAN_CTAG_FILTER)
pdata->rfe_ctl |= RFE_CTL_VLAN_FILTER_;
else
pdata->rfe_ctl &= ~RFE_CTL_VLAN_FILTER_;
@@ -2976,6 +2976,9 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)
if (DEFAULT_TSO_CSUM_ENABLE)
dev->net->features |= NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG;
+ if (DEFAULT_VLAN_FILTER_ENABLE)
+ dev->net->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
+
dev->net->hw_features = dev->net->features;
ret = lan78xx_setup_irq_domain(dev);