Skip to content

Commit f27fc15

Browse files
6by9popcornmix
authored andcommitted
net: lan78xx: Add support for VLAN filtering.
HW_VLAN_CTAG_FILTER was partially implemented, but not fully to Linux. Complete the implementation of this. See #2458. Signed-off-by: Dave Stevenson <[email protected]>
1 parent 0333e5d commit f27fc15

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/usb/lan78xx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,7 @@ static int lan78xx_set_features(struct net_device *netdev,
22972297
pdata->rfe_ctl &= ~(RFE_CTL_ICMP_COE_ | RFE_CTL_IGMP_COE_);
22982298
}
22992299

2300-
if (features & NETIF_F_HW_VLAN_CTAG_RX)
2300+
if (features & NETIF_F_HW_VLAN_CTAG_FILTER)
23012301
pdata->rfe_ctl |= RFE_CTL_VLAN_FILTER_;
23022302
else
23032303
pdata->rfe_ctl &= ~RFE_CTL_VLAN_FILTER_;
@@ -2921,6 +2921,9 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)
29212921
if (DEFAULT_TSO_CSUM_ENABLE)
29222922
dev->net->features |= NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG;
29232923

2924+
if (DEFAULT_VLAN_FILTER_ENABLE)
2925+
dev->net->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
2926+
29242927
dev->net->hw_features = dev->net->features;
29252928

29262929
ret = lan78xx_setup_irq_domain(dev);

0 commit comments

Comments
 (0)