diff options
| author | Jiawen Wu <jiawenwu@trustnetic.com> | 2024-05-17 14:51:40 +0800 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2024-05-17 10:17:36 +0100 |
| commit | 1d3c6414950badaa38002af3b5857e01a21f01e9 (patch) | |
| tree | 56297ef0e3d8ce043a556c3025ab104b2cc13633 /drivers/net/ethernet/wangxun/libwx/wx_lib.c | |
| parent | ac71ab7816b675f1c9614015bd87bfccb456c394 (diff) | |
net: txgbe: fix to control VLAN strip
When VLAN tag strip is changed to enable or disable, the hardware requires
the Rx ring to be in a disabled state, otherwise the feature cannot be
changed.
Fixes: f3b03c655f67 ("net: wangxun: Implement vlan add and kill functions")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/wangxun/libwx/wx_lib.c')
| -rw-r--r-- | drivers/net/ethernet/wangxun/libwx/wx_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c index d0cb09a4bd3d..07ba3a270a14 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c @@ -2692,9 +2692,9 @@ int wx_set_features(struct net_device *netdev, netdev_features_t features) netdev->features = features; - if (changed & - (NETIF_F_HW_VLAN_CTAG_RX | - NETIF_F_HW_VLAN_STAG_RX)) + if (wx->mac.type == wx_mac_sp && changed & NETIF_F_HW_VLAN_CTAG_RX) + wx->do_reset(netdev); + else if (changed & (NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_FILTER)) wx_set_rx_mode(netdev); return 0; |