From patchwork Sat Apr 11 17:37:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25856 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.176.167]) by ozlabs.org (Postfix) with ESMTP id A39B0DE0D2 for ; Sun, 12 Apr 2009 03:38:13 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754712AbZDKRiK (ORCPT ); Sat, 11 Apr 2009 13:38:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752616AbZDKRiI (ORCPT ); Sat, 11 Apr 2009 13:38:08 -0400 Received: from qw-out-2122.google.com ([74.125.92.25]:44311 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322AbZDKRiH (ORCPT ); Sat, 11 Apr 2009 13:38:07 -0400 Received: by qw-out-2122.google.com with SMTP id 8so1786903qwh.37 for ; Sat, 11 Apr 2009 10:38:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=Bj7wS6gZUdK22pKM6Sp13AGVGxjHIcayjWjM0IE92P4=; b=kvICEZlrN0qHrSioLgS67+OZ1h6W2i0iJZ3Nvjcjnr8DTpt+L4g7ZcwPTadhmF/ard bniqLS41eNKy71B1T5Uju8E/YjTjvdCZWvfqzMcYlXulwtRNQi7sU/ZspJ8jqIOUieRY k19kW0ITWsCccNATKVVyebCSQbAQuEfoNBGeg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=b9SVSE9tbB4d6Kw9H9lJ49goFkTmmyCsBNqx4inJWsQhoa0vleaQeD6bjQ11GY5Zri LKACpJaLq3cnQWIywuAHzTuVeYllgFBSqSumdM8CBFXTSmbFtJaAjxgHdzslg1J7WxAu fQUEVC6ayVyNRI0fmIdXTGyFVxaAaCsrwHVKw= Received: by 10.220.73.194 with SMTP id r2mr5498985vcj.76.1239471485647; Sat, 11 Apr 2009 10:38:05 -0700 (PDT) Received: from orion (ppp91-78-156-47.pppoe.mtu-net.ru [91.78.156.47]) by mx.google.com with ESMTPS id 7sm5340578ywo.47.2009.04.11.10.38.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 11 Apr 2009 10:38:04 -0700 (PDT) Date: Sat, 11 Apr 2009 21:37:59 +0400 From: Alexander Beregalov To: netdev@vger.kernel.org Subject: Re: [PATCH 02/11] tsi108_eth: convert to net_device_ops Message-ID: <20090411173759.GB16999@orion> References: <20090411173019.GA16999@orion> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090411173019.GA16999@orion> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Alexander Beregalov --- drivers/net/tsi108_eth.c | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index bb43e7f..0f78f99 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -1561,6 +1561,18 @@ static const struct ethtool_ops tsi108_ethtool_ops = { .set_settings = tsi108_set_settings, }; +static const struct net_device_ops tsi108_netdev_ops = { + .ndo_open = tsi108_open, + .ndo_stop = tsi108_close, + .ndo_start_xmit = tsi108_send_packet, + .ndo_set_multicast_list = tsi108_set_rx_mode, + .ndo_get_stats = tsi108_get_stats, + .ndo_do_ioctl = tsi108_do_ioctl, + .ndo_set_mac_address = tsi108_set_mac, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, +}; + static int tsi108_init_one(struct platform_device *pdev) { @@ -1616,14 +1628,8 @@ tsi108_init_one(struct platform_device *pdev) data->phy_type = einfo->phy_type; data->irq_num = einfo->irq_num; data->id = pdev->id; - dev->open = tsi108_open; - dev->stop = tsi108_close; - dev->hard_start_xmit = tsi108_send_packet; - dev->set_mac_address = tsi108_set_mac; - dev->set_multicast_list = tsi108_set_rx_mode; - dev->get_stats = tsi108_get_stats; netif_napi_add(dev, &data->napi, tsi108_poll, 64); - dev->do_ioctl = tsi108_do_ioctl; + dev->netdev_ops = &tsi108_netdev_ops; dev->ethtool_ops = &tsi108_ethtool_ops; /* Apparently, the Linux networking code won't use scatter-gather