ethernet: dwmac4: fix VLAN in promisc mode not supported

This commit is contained in:
Joshua Riek
2023-07-05 22:43:57 -04:00
committed by Jianfeng Liu
parent 0211a4fd8f
commit 2883d11e25

View File

@@ -453,12 +453,6 @@ static int dwmac4_add_hw_vlan_rx_fltr(struct net_device *dev,
if (vid > 4095)
return -EINVAL;
if (hw->promisc) {
netdev_err(dev,
"Adding VLAN in promisc mode not supported\n");
return -EPERM;
}
/* Single Rx VLAN Filter */
if (hw->num_vlan == 1) {
/* For single VLAN filter, VID 0 means VLAN promiscuous */
@@ -508,12 +502,6 @@ static int dwmac4_del_hw_vlan_rx_fltr(struct net_device *dev,
{
int i, ret = 0;
if (hw->promisc) {
netdev_err(dev,
"Deleting VLAN in promisc mode not supported\n");
return -EPERM;
}
/* Single Rx VLAN Filter */
if (hw->num_vlan == 1) {
if ((hw->vlan_filter[0] & GMAC_VLAN_TAG_VID) == vid) {