From patchwork Sun Mar 29 15:23:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Beregalov X-Patchwork-Id: 25280 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 C8C31DDE26 for ; Mon, 30 Mar 2009 02:23:57 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755226AbZC2PXm (ORCPT ); Sun, 29 Mar 2009 11:23:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752215AbZC2PXm (ORCPT ); Sun, 29 Mar 2009 11:23:42 -0400 Received: from mail-fx0-f158.google.com ([209.85.220.158]:42083 "EHLO mail-fx0-f158.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751118AbZC2PXk (ORCPT ); Sun, 29 Mar 2009 11:23:40 -0400 Received: by fxm2 with SMTP id 2so1632449fxm.37 for ; Sun, 29 Mar 2009 08:23:37 -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=lPUoCBrl+C5ogA+AAn0EPvRm/pCZsuaYnYndFSD2nnA=; b=N64smkotjG/OHLSlV8mzMBdH+43nZzUy9M9yLQl74+00uDDMHP5MAESK1eC/6ffHna 5V3rDIfGE3nJTQd8Sgo6lKy13q8/9HBTVMPSGO3DzO1gbdJ6uTihNcCDb4S0IRTSolhE h2xe9QfOZV1CuMXYFvWU8VIBs+o3hcGfnlKSY= 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=QYfnp5e0P1jBEZtIuC1btJE/bMzCdz9CJ6EvNjPnzL24efWXaswRO9svPUUx4kY19z t4OUtkBfkE8+4ZCCUNc67zTRRdosa3ulyIe7E03GHNhInRizNPMzGaK28Lt6xizDZrB8 sB7pKexph1a4p5ll42yfL9TJPU054lnDiCqBk= Received: by 10.103.93.18 with SMTP id v18mr1261612mul.43.1238340217716; Sun, 29 Mar 2009 08:23:37 -0700 (PDT) Received: from orion (ppp91-76-231-215.pppoe.mtu-net.ru [91.76.231.215]) by mx.google.com with ESMTPS id n10sm7082088mue.39.2009.03.29.08.23.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 29 Mar 2009 08:23:37 -0700 (PDT) Date: Sun, 29 Mar 2009 19:23:34 +0400 From: Alexander Beregalov To: gregkh@suse.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 1/10] Staging: at76: convert to netdev_ops Message-ID: <20090329152334.GA11056@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/at76_usb/at76_usb.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/staging/at76_usb/at76_usb.c b/drivers/staging/at76_usb/at76_usb.c index 6f6e36a..c8af9a8 100644 --- a/drivers/staging/at76_usb/at76_usb.c +++ b/drivers/staging/at76_usb/at76_usb.c @@ -5259,6 +5259,18 @@ static int at76_alloc_urbs(struct at76_priv *priv, return 0; } +static const struct net_device_ops at76_netdev_ops = { + .ndo_open = at76_open, + .ndo_stop = at76_stop, + .ndo_get_stats = at76_get_stats, + .ndo_start_xmit = at76_tx, + .ndo_tx_timeout = at76_tx_timeout, + .ndo_set_multicast_list = at76_set_multicast, + .ndo_set_mac_address = at76_set_mac_address, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, +}; + /* Register network device and initialize the hardware */ static int at76_init_new_device(struct at76_priv *priv, struct usb_interface *interface) @@ -5303,21 +5315,15 @@ static int at76_init_new_device(struct at76_priv *priv, priv->scan_mode = SCAN_TYPE_ACTIVE; netdev->flags &= ~IFF_MULTICAST; /* not yet or never */ - netdev->open = at76_open; - netdev->stop = at76_stop; - netdev->get_stats = at76_get_stats; + netdev->netdev_ops = &at76_netdev_ops; netdev->ethtool_ops = &at76_ethtool_ops; /* Add pointers to enable iwspy support. */ priv->wireless_data.spy_data = &priv->spy_data; netdev->wireless_data = &priv->wireless_data; - netdev->hard_start_xmit = at76_tx; - netdev->tx_timeout = at76_tx_timeout; netdev->watchdog_timeo = 2 * HZ; netdev->wireless_handlers = &at76_handler_def; - netdev->set_multicast_list = at76_set_multicast; - netdev->set_mac_address = at76_set_mac_address; dev_alloc_name(netdev, "wlan%d"); ret = register_netdev(priv->netdev);