Commit 4a27327b authored by Dave Stevenson's avatar Dave Stevenson Committed by David S. Miller

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: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2259b7a6
...@@ -2363,7 +2363,7 @@ static int lan78xx_set_features(struct net_device *netdev, ...@@ -2363,7 +2363,7 @@ static int lan78xx_set_features(struct net_device *netdev,
pdata->rfe_ctl &= ~(RFE_CTL_ICMP_COE_ | RFE_CTL_IGMP_COE_); 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_; pdata->rfe_ctl |= RFE_CTL_VLAN_FILTER_;
else else
pdata->rfe_ctl &= ~RFE_CTL_VLAN_FILTER_; pdata->rfe_ctl &= ~RFE_CTL_VLAN_FILTER_;
...@@ -2976,6 +2976,9 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf) ...@@ -2976,6 +2976,9 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)
if (DEFAULT_TSO_CSUM_ENABLE) if (DEFAULT_TSO_CSUM_ENABLE)
dev->net->features |= NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG; 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; dev->net->hw_features = dev->net->features;
ret = lan78xx_setup_irq_domain(dev); ret = lan78xx_setup_irq_domain(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment