From patchwork Sun Apr 17 10:15:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 91546 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 183631007D5 for ; Sun, 17 Apr 2011 20:16:18 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756670Ab1DQKQI (ORCPT ); Sun, 17 Apr 2011 06:16:08 -0400 Received: from rere.qmqm.pl ([89.167.52.164]:48109 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756073Ab1DQKPt (ORCPT ); Sun, 17 Apr 2011 06:15:49 -0400 Received: by rere.qmqm.pl (Postfix, from userid 1000) id A22AF13A6D; Sun, 17 Apr 2011 12:15:47 +0200 (CEST) From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH] net: niu: convert to hw_features MIME-Version: 1.0 To: netdev@vger.kernel.org Message-Id: <20110417101547.A22AF13A6D@rere.qmqm.pl> Date: Sun, 17 Apr 2011 12:15:47 +0200 (CEST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Side effect: allow toggling of TX offloads. Signed-off-by: Michał Mirosław --- drivers/net/niu.c | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/net/niu.c b/drivers/net/niu.c index ea2272f..a707217 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -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, @@ -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, @@ -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,