summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/huawei/hinic/hinic_main.c
diff options
context:
space:
mode:
authorCai Huoqing <cai.huoqing@linux.dev>2022-11-03 11:05:11 +0300
committerDavid S. Miller <davem@davemloft.net>2022-11-07 11:50:20 +0300
commit2acf960e3be6177f437baade6d1883ebe4c641b2 (patch)
treef2a44f99ca1fc5817da991a6388d61c1fe67f616 /drivers/net/ethernet/huawei/hinic/hinic_main.c
parent13265568a8633ab0d22e9def8cd9b8b0edb3ca85 (diff)
downloadlinux-2acf960e3be6177f437baade6d1883ebe4c641b2.tar.xz
net: hinic: Add support for configuration of rx-vlan-filter by ethtool
When ethtool config rx-vlan-filter, the driver will send control command to firmware, then set to hardware in this patch. Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/huawei/hinic/hinic_main.c')
-rw-r--r--drivers/net/ethernet/huawei/hinic/hinic_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index 9d4d795e1081..977c41473ab7 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -1092,6 +1092,16 @@ static int set_features(struct hinic_dev *nic_dev,
}
}
+ if (changed & NETIF_F_HW_VLAN_CTAG_FILTER) {
+ ret = hinic_set_vlan_fliter(nic_dev,
+ !!(features &
+ NETIF_F_HW_VLAN_CTAG_FILTER));
+ if (ret) {
+ err = ret;
+ failed_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
+ }
+ }
+
if (err) {
nic_dev->netdev->features = features ^ failed_features;
return -EIO;