mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
hv_netvsc: Fix error handling in netvsc_set_features()
When an error is returned by rndis_filter_set_offload_params(), we should
still assign the unaffected features to ndev->features. Otherwise, these
features will be missing.
Fixes: d6792a5a07
("hv_netvsc: Add handler for LRO setting change")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fc89cc358f
commit
c4509a5ac0
1 changed files with 3 additions and 1 deletions
|
@ -1807,8 +1807,10 @@ static int netvsc_set_features(struct net_device *ndev,
|
||||||
|
|
||||||
ret = rndis_filter_set_offload_params(ndev, nvdev, &offloads);
|
ret = rndis_filter_set_offload_params(ndev, nvdev, &offloads);
|
||||||
|
|
||||||
if (ret)
|
if (ret) {
|
||||||
features ^= NETIF_F_LRO;
|
features ^= NETIF_F_LRO;
|
||||||
|
ndev->features = features;
|
||||||
|
}
|
||||||
|
|
||||||
syncvf:
|
syncvf:
|
||||||
if (!vf_netdev)
|
if (!vf_netdev)
|
||||||
|
|
Loading…
Reference in a new issue