提交 8a73125c 编写于 作者: D Dragos Foianu 提交者: David S. Miller

ethtool: fixed trailing statements in ethtool

Applied fixes suggested by checkpatch.pl.
Signed-off-by: NDragos Foianu <dragos.foianu@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f2f79cca
...@@ -279,11 +279,16 @@ static u32 __ethtool_get_flags(struct net_device *dev) ...@@ -279,11 +279,16 @@ static u32 __ethtool_get_flags(struct net_device *dev)
{ {
u32 flags = 0; u32 flags = 0;
if (dev->features & NETIF_F_LRO) flags |= ETH_FLAG_LRO; if (dev->features & NETIF_F_LRO)
if (dev->features & NETIF_F_HW_VLAN_CTAG_RX) flags |= ETH_FLAG_RXVLAN; flags |= ETH_FLAG_LRO;
if (dev->features & NETIF_F_HW_VLAN_CTAG_TX) flags |= ETH_FLAG_TXVLAN; if (dev->features & NETIF_F_HW_VLAN_CTAG_RX)
if (dev->features & NETIF_F_NTUPLE) flags |= ETH_FLAG_NTUPLE; flags |= ETH_FLAG_RXVLAN;
if (dev->features & NETIF_F_RXHASH) flags |= ETH_FLAG_RXHASH; if (dev->features & NETIF_F_HW_VLAN_CTAG_TX)
flags |= ETH_FLAG_TXVLAN;
if (dev->features & NETIF_F_NTUPLE)
flags |= ETH_FLAG_NTUPLE;
if (dev->features & NETIF_F_RXHASH)
flags |= ETH_FLAG_RXHASH;
return flags; return flags;
} }
...@@ -295,11 +300,16 @@ static int __ethtool_set_flags(struct net_device *dev, u32 data) ...@@ -295,11 +300,16 @@ static int __ethtool_set_flags(struct net_device *dev, u32 data)
if (data & ~ETH_ALL_FLAGS) if (data & ~ETH_ALL_FLAGS)
return -EINVAL; return -EINVAL;
if (data & ETH_FLAG_LRO) features |= NETIF_F_LRO; if (data & ETH_FLAG_LRO)
if (data & ETH_FLAG_RXVLAN) features |= NETIF_F_HW_VLAN_CTAG_RX; features |= NETIF_F_LRO;
if (data & ETH_FLAG_TXVLAN) features |= NETIF_F_HW_VLAN_CTAG_TX; if (data & ETH_FLAG_RXVLAN)
if (data & ETH_FLAG_NTUPLE) features |= NETIF_F_NTUPLE; features |= NETIF_F_HW_VLAN_CTAG_RX;
if (data & ETH_FLAG_RXHASH) features |= NETIF_F_RXHASH; if (data & ETH_FLAG_TXVLAN)
features |= NETIF_F_HW_VLAN_CTAG_TX;
if (data & ETH_FLAG_NTUPLE)
features |= NETIF_F_NTUPLE;
if (data & ETH_FLAG_RXHASH)
features |= NETIF_F_RXHASH;
/* allow changing only bits set in hw_features */ /* allow changing only bits set in hw_features */
changed = (features ^ dev->features) & ETH_ALL_FEATURES; changed = (features ^ dev->features) & ETH_ALL_FEATURES;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册