From patchwork Tue Mar 31 20:18:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle McMartin X-Patchwork-Id: 25443 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 B95B6DDE1B for ; Wed, 1 Apr 2009 07:19:09 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757229AbZCaUS6 (ORCPT ); Tue, 31 Mar 2009 16:18:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757223AbZCaUS5 (ORCPT ); Tue, 31 Mar 2009 16:18:57 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:60289 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754459AbZCaUS4 (ORCPT ); Tue, 31 Mar 2009 16:18:56 -0400 Received: from kyle by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1LokQ6-0003tc-BJ; Tue, 31 Mar 2009 20:18:53 +0000 Date: Tue, 31 Mar 2009 16:18:50 -0400 From: Kyle McMartin To: gregkh@suse.de Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org Subject: [PATCH] staging: at76_usb convert to netdev_ops Message-ID: <20090331201850.GC25513@bombadil.infradead.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Kyle McMartin Didn't see this in your patch queue, fixes build on Fedora, though we'll probably end up turning on CONFIG_COMPAT_NET_DEV_OPS for now anyway. Signed-off-by: Kyle McMartin Acked-by: David S. Miller --- -- 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 c8e4d31..59071e6 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_change_mtu = eth_change_mtu, + .ndo_validate_addr = eth_validate_addr, +}; + /* Register network device and initialize the hardware */ static int at76_init_new_device(struct at76_priv *priv, struct usb_interface *interface) @@ -5303,22 +5315,18 @@ 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; + dev_alloc_name(netdev, "wlan%d"); + /* 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); if (ret) {