Skip to content

Commit

Permalink
net: niu: convert to hw_features
Browse files Browse the repository at this point in the history
Side effect: allow toggling of TX offloads.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michał Mirosław authored and David S. Miller committed Apr 18, 2011
1 parent f4786a9 commit 3cd8ef4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions drivers/net/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -7913,11 +7913,6 @@ static int niu_set_phys_id(struct net_device *dev,
return 0;
}

static int niu_set_flags(struct net_device *dev, u32 data)
{
return ethtool_op_set_flags(dev, data, ETH_FLAG_RXHASH);
}

static const struct ethtool_ops niu_ethtool_ops = {
.get_drvinfo = niu_get_drvinfo,
.get_link = ethtool_op_get_link,
Expand All @@ -7934,8 +7929,6 @@ static const struct ethtool_ops niu_ethtool_ops = {
.set_phys_id = niu_set_phys_id,
.get_rxnfc = niu_get_nfc,
.set_rxnfc = niu_set_nfc,
.set_flags = niu_set_flags,
.get_flags = ethtool_op_get_flags,
};

static int niu_ldg_assign_ldn(struct niu *np, struct niu_parent *parent,
Expand Down Expand Up @@ -9764,8 +9757,8 @@ static void __devinit niu_device_announce(struct niu *np)

static void __devinit niu_set_basic_features(struct net_device *dev)
{
dev->features |= (NETIF_F_SG | NETIF_F_HW_CSUM |
NETIF_F_GRO | NETIF_F_RXHASH);
dev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_RXHASH;
dev->features |= dev->hw_features | NETIF_F_RXCSUM;
}

static int __devinit niu_pci_init_one(struct pci_dev *pdev,
Expand Down

0 comments on commit 3cd8ef4

Please sign in to comment.