aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiawen Wu <jiawenwu@trustnetic.com>2024-05-17 14:51:38 +0800
committerSasha Levin <sashal@kernel.org>2024-05-27 14:57:13 -0400
commit58f1258c2909f3390114a130a9d0ae1cd95fe4b1 (patch)
treec22ee305868c97f9be4bafff312339eebc8bd57c
parenta43df0946ab77b85442490053de306fcf34a3037 (diff)
downloadlinux-stable-rc-queue/6.6.tar.gz
net: wangxun: fix to change Rx featuresqueue/6.6
[ Upstream commit 68067f065ee730c7c67b361c3c81808d25d5a90b ] 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: 6dbedcffcf54 ("net: libwx: Implement xx_set_features ops") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/wangxun/libwx/wx_lib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
index be434c833c69cf..e9310d9ca67c94 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
@@ -2646,12 +2646,14 @@ int wx_set_features(struct net_device *netdev, netdev_features_t features)
else
wr32m(wx, WX_RDB_RA_CTL, WX_RDB_RA_CTL_RSS_EN, 0);
+ netdev->features = features;
+
if (changed &
(NETIF_F_HW_VLAN_CTAG_RX |
NETIF_F_HW_VLAN_STAG_RX))
wx_set_rx_mode(netdev);
- return 1;
+ return 0;
}
EXPORT_SYMBOL(wx_set_features);