nvethernet: fix ndo_vlan_rx_kill_vid()

Issue: VLAN tag MAC register access after ether_close()

Fix: If netif is not running, return 0 from
ndo_vlan_rx_kill_vid and don't call OSI interface call.

Bug 200544722
Bug 200545674

Change-Id: Iecb4cb53e0e5cd3a544110b323b5e1c7b04ba1d5
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2204247
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Rakesh Goyal
2019-09-24 09:00:23 +05:30
committed by Revanth Kumar Uppala
parent 94a5973d19
commit 7bbf31a2a7

View File

@@ -2178,6 +2178,10 @@ static int ether_vlan_rx_kill_vid(struct net_device *ndev, __be16 vlan_proto,
struct osi_core_priv_data *osi_core = pdata->osi_core;
int ret = -1;
if (!netif_running(ndev)) {
return 0;
}
if (pdata->vlan_hash_filtering == OSI_HASH_FILTER_MODE) {
dev_err(pdata->dev,
"HASH FILTERING for VLAN tag is not supported in SW\n");