Commit c4509a5a authored by Haiyang Zhang's avatar Haiyang Zhang Committed by David S. Miller
Browse files

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: d6792a5a ("hv_netvsc: Add handler for LRO setting change")
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fc89cc35
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1807,8 +1807,10 @@ static int netvsc_set_features(struct net_device *ndev,

	ret = rndis_filter_set_offload_params(ndev, nvdev, &offloads);

	if (ret)
	if (ret) {
		features ^= NETIF_F_LRO;
		ndev->features = features;
	}

syncvf:
	if (!vf_netdev)