Commit 68067f06 authored by Jiawen Wu's avatar Jiawen Wu Committed by David S. Miller

net: wangxun: fix to change Rx features

Fix the issue where some Rx features cannot be changed.

When using ethtool -K to turn off rx offload, it returns error and
displays "Could not change any device features". And netdev->features
is not assigned a new value to actually configure the hardware.

Fixes: 6dbedcff ("net: libwx: Implement xx_set_features ops")
Signed-off-by: default avatarJiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 581073f6
...@@ -2690,12 +2690,14 @@ int wx_set_features(struct net_device *netdev, netdev_features_t features) ...@@ -2690,12 +2690,14 @@ int wx_set_features(struct net_device *netdev, netdev_features_t features)
wx->rss_enabled = false; wx->rss_enabled = false;
} }
netdev->features = features;
if (changed & if (changed &
(NETIF_F_HW_VLAN_CTAG_RX | (NETIF_F_HW_VLAN_CTAG_RX |
NETIF_F_HW_VLAN_STAG_RX)) NETIF_F_HW_VLAN_STAG_RX))
wx_set_rx_mode(netdev); wx_set_rx_mode(netdev);
return 1; return 0;
} }
EXPORT_SYMBOL(wx_set_features); EXPORT_SYMBOL(wx_set_features);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment