From patchwork Sun Mar 29 15:24:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25281 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 152FDDDE28 for ; Mon, 30 Mar 2009 02:24:59 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756544AbZC2PYt (ORCPT ); Sun, 29 Mar 2009 11:24:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752251AbZC2PYs (ORCPT ); Sun, 29 Mar 2009 11:24:48 -0400 Received: from fk-out-0910.google.com ([209.85.128.187]:25905 "EHLO fk-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752215AbZC2PYr (ORCPT ); Sun, 29 Mar 2009 11:24:47 -0400 Received: by fk-out-0910.google.com with SMTP id 18so725961fkq.5 for ; Sun, 29 Mar 2009 08:24:44 -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:mime-version:content-type:content-disposition:user-agent; bh=hCt9Y0NeYNHuao1QB2543/2PX2kVC9tvMBG5hgKNc/o=; b=TFfwt+KoH05JR7ogNQgNr8hdC0YAzQo2qh+xsAZpJWBUkWuL4yQGS4BjsB07zY38va hPMS3uhDTGX6gR2EeZ2F1d+Vmc1cyQuBJNExz8mydWu33dQoF7B2xz9GCbbsnNFfB3Mj 15Y+fMBWISIqW8N0J2SGAuI4BKFVVCeaUgzaQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=nDK+NmL3zKUYwtoIWTUumRiJr+XyCBTTyj10f7Et1b3bqlz5/Vcem7jMEFqE774n81 3aW5WxdW6I3L/DEMZg01X6uhfN+/z4F7D8JmWUdwwKkSKMRqxlY6o5triErSbK99K9nq gatQ1Tv/iY+AfF16Waa6fbsNr+/xs/TMddaII= Received: by 10.103.240.5 with SMTP id s5mr1264294mur.106.1238340284347; Sun, 29 Mar 2009 08:24:44 -0700 (PDT) Received: from orion (ppp91-76-231-215.pppoe.mtu-net.ru [91.76.231.215]) by mx.google.com with ESMTPS id e10sm7407014muf.41.2009.03.29.08.24.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 29 Mar 2009 08:24:35 -0700 (PDT) Date: Sun, 29 Mar 2009 19:24:32 +0400 From: Alexander Beregalov To: gregkh@suse.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 2/10] Staging: epl: convert to netdev_ops Message-ID: <20090329152432.GB11056@orion> MIME-Version: 1.0 Content-Disposition: inline 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 Acked-by: David S. Miller --- drivers/staging/epl/VirtualEthernetLinux.c | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 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/staging/epl/VirtualEthernetLinux.c b/drivers/staging/epl/VirtualEthernetLinux.c index 21206c4..077724a 100644 --- a/drivers/staging/epl/VirtualEthernetLinux.c +++ b/drivers/staging/epl/VirtualEthernetLinux.c @@ -284,6 +284,17 @@ static tEplKernel VEthRecvFrame(tEplFrameInfo * pFrameInfo_p) return Ret; } +static const struct net_device_ops epl_netdev_ops = { + .ndo_open = VEthOpen, + .ndo_stop = VEthClose, + .ndo_get_stats = VEthGetStats, + .ndo_start_xmit = VEthXmit, + .ndo_tx_timeout = VEthTimeout, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, +}; + tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p) { tEplKernel Ret = kEplSuccessful; @@ -299,11 +310,7 @@ tEplKernel VEthAddInstance(tEplDllkInitParam *pInitParam_p) goto Exit; } - pVEthNetDevice_g->open = VEthOpen; - pVEthNetDevice_g->stop = VEthClose; - pVEthNetDevice_g->get_stats = VEthGetStats; - pVEthNetDevice_g->hard_start_xmit = VEthXmit; - pVEthNetDevice_g->tx_timeout = VEthTimeout; + pVEthNetDevice_g->netdev_ops = &epl_netdev_ops; pVEthNetDevice_g->watchdog_timeo = EPL_VETH_TX_TIMEOUT; pVEthNetDevice_g->destructor = free_netdev;