diff options
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 7985165e84fc..c762c6ac055b 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -4188,17 +4188,13 @@ static int sky2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom | |||
4188 | static int sky2_set_flags(struct net_device *dev, u32 data) | 4188 | static int sky2_set_flags(struct net_device *dev, u32 data) |
4189 | { | 4189 | { |
4190 | struct sky2_port *sky2 = netdev_priv(dev); | 4190 | struct sky2_port *sky2 = netdev_priv(dev); |
4191 | u32 supported = | ||
4192 | (sky2->hw->flags & SKY2_HW_RSS_BROKEN) ? 0 : ETH_FLAG_RXHASH; | ||
4193 | int rc; | ||
4191 | 4194 | ||
4192 | if (data & ~ETH_FLAG_RXHASH) | 4195 | rc = ethtool_op_set_flags(dev, data, supported); |
4193 | return -EOPNOTSUPP; | 4196 | if (rc) |
4194 | 4197 | return rc; | |
4195 | if (data & ETH_FLAG_RXHASH) { | ||
4196 | if (sky2->hw->flags & SKY2_HW_RSS_BROKEN) | ||
4197 | return -EINVAL; | ||
4198 | |||
4199 | dev->features |= NETIF_F_RXHASH; | ||
4200 | } else | ||
4201 | dev->features &= ~NETIF_F_RXHASH; | ||
4202 | 4198 | ||
4203 | rx_set_rss(dev); | 4199 | rx_set_rss(dev); |
4204 | 4200 | ||