diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2019-10-30 16:32:11 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-31 02:17:36 +0100 |
commit | c4509a5ac0ace94d5b1f0092dc4d36933c1d896e (patch) | |
tree | 8710715dceb299bed1ac3ef42b420d61c25f3dd6 /drivers/net/hyperv | |
parent | cxgb4: fix panic when attaching to ULD fail (diff) | |
download | linux-c4509a5ac0ace94d5b1f0092dc4d36933c1d896e.tar.xz linux-c4509a5ac0ace94d5b1f0092dc4d36933c1d896e.zip |
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: d6792a5a0747 ("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>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index fd4fff57fd6e..bab7c1f84dfd 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -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) |