diff options
Diffstat (limited to 'net/core/ethtool.c')
| -rw-r--r-- | net/core/ethtool.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index ab5fa6336c84..78e9d9223e40 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
| @@ -279,11 +279,16 @@ static u32 __ethtool_get_flags(struct net_device *dev) | |||
| 279 | { | 279 | { |
| 280 | u32 flags = 0; | 280 | u32 flags = 0; |
| 281 | 281 | ||
| 282 | if (dev->features & NETIF_F_LRO) flags |= ETH_FLAG_LRO; | 282 | if (dev->features & NETIF_F_LRO) |
| 283 | if (dev->features & NETIF_F_HW_VLAN_CTAG_RX) flags |= ETH_FLAG_RXVLAN; | 283 | flags |= ETH_FLAG_LRO; |
| 284 | if (dev->features & NETIF_F_HW_VLAN_CTAG_TX) flags |= ETH_FLAG_TXVLAN; | 284 | if (dev->features & NETIF_F_HW_VLAN_CTAG_RX) |
| 285 | if (dev->features & NETIF_F_NTUPLE) flags |= ETH_FLAG_NTUPLE; | 285 | flags |= ETH_FLAG_RXVLAN; |
| 286 | if (dev->features & NETIF_F_RXHASH) flags |= ETH_FLAG_RXHASH; | 286 | if (dev->features & NETIF_F_HW_VLAN_CTAG_TX) |
| 287 | flags |= ETH_FLAG_TXVLAN; | ||
| 288 | if (dev->features & NETIF_F_NTUPLE) | ||
| 289 | flags |= ETH_FLAG_NTUPLE; | ||
| 290 | if (dev->features & NETIF_F_RXHASH) | ||
| 291 | flags |= ETH_FLAG_RXHASH; | ||
| 287 | 292 | ||
| 288 | return flags; | 293 | return flags; |
| 289 | } | 294 | } |
| @@ -295,11 +300,16 @@ static int __ethtool_set_flags(struct net_device *dev, u32 data) | |||
| 295 | if (data & ~ETH_ALL_FLAGS) | 300 | if (data & ~ETH_ALL_FLAGS) |
| 296 | return -EINVAL; | 301 | return -EINVAL; |
| 297 | 302 | ||
| 298 | if (data & ETH_FLAG_LRO) features |= NETIF_F_LRO; | 303 | if (data & ETH_FLAG_LRO) |
| 299 | if (data & ETH_FLAG_RXVLAN) features |= NETIF_F_HW_VLAN_CTAG_RX; | 304 | features |= NETIF_F_LRO; |
| 300 | if (data & ETH_FLAG_TXVLAN) features |= NETIF_F_HW_VLAN_CTAG_TX; | 305 | if (data & ETH_FLAG_RXVLAN) |
| 301 | if (data & ETH_FLAG_NTUPLE) features |= NETIF_F_NTUPLE; | 306 | features |= NETIF_F_HW_VLAN_CTAG_RX; |
| 302 | if (data & ETH_FLAG_RXHASH) features |= NETIF_F_RXHASH; | 307 | if (data & ETH_FLAG_TXVLAN) |
| 308 | features |= NETIF_F_HW_VLAN_CTAG_TX; | ||
| 309 | if (data & ETH_FLAG_NTUPLE) | ||
| 310 | features |= NETIF_F_NTUPLE; | ||
| 311 | if (data & ETH_FLAG_RXHASH) | ||
| 312 | features |= NETIF_F_RXHASH; | ||
| 303 | 313 | ||
| 304 | /* allow changing only bits set in hw_features */ | 314 | /* allow changing only bits set in hw_features */ |
| 305 | changed = (features ^ dev->features) & ETH_ALL_FEATURES; | 315 | changed = (features ^ dev->features) & ETH_ALL_FEATURES; |
