From patchwork Fri Jan 9 23:01:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 17668 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 0ADB74760F for ; Sat, 10 Jan 2009 10:22:04 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932300AbZAIXUg (ORCPT ); Fri, 9 Jan 2009 18:20:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757889AbZAIXUI (ORCPT ); Fri, 9 Jan 2009 18:20:08 -0500 Received: from suva.vyatta.com ([76.74.103.44]:42226 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754267AbZAIXR6 (ORCPT ); Fri, 9 Jan 2009 18:17:58 -0500 Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id n09NHvwr017177; Fri, 9 Jan 2009 15:17:57 -0800 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id n09NHvkO017176; Fri, 9 Jan 2009 15:17:57 -0800 Message-Id: <20090109230138.926785388@linux-foundation.org> User-Agent: quilt/0.47-1 Date: Fri, 09 Jan 2009 15:01:27 -0800 From: Stephen Hemminger To: David Miller Cc: netdev@vger.kernel.org Subject: [patch 30/45] znet: convert to net_device_ops References: <20090109230057.575650817@linux-foundation.org> Content-Disposition: inline; filename=znet.patch Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Stephen Hemminger --- 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 --- a/drivers/net/znet.c 2009-01-08 08:30:16.000000000 -0800 +++ b/drivers/net/znet.c 2009-01-09 10:01:35.000000000 -0800 @@ -358,6 +358,17 @@ static void znet_set_multicast_list (str * multicast address configured isn't equal to IFF_ALLMULTI */ } +static const struct net_device_ops znet_netdev_ops = { + .ndo_open = znet_open, + .ndo_stop = znet_close, + .ndo_start_xmit = znet_send_packet, + .ndo_set_multicast_list = znet_set_multicast_list, + .ndo_tx_timeout = znet_tx_timeout, + .ndo_change_mtu = eth_change_mtu, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, +}; + /* The Z-Note probe is pretty easy. The NETIDBLK exists in the safe-to-probe BIOS area. We just scan for the signature, and pull the vital parameters out of the structure. */ @@ -440,11 +451,7 @@ static int __init znet_probe (void) znet->tx_end = znet->tx_start + znet->tx_buf_len; /* The ZNET-specific entries in the device structure. */ - dev->open = &znet_open; - dev->hard_start_xmit = &znet_send_packet; - dev->stop = &znet_close; - dev->set_multicast_list = &znet_set_multicast_list; - dev->tx_timeout = znet_tx_timeout; + dev->netdev_ops = &znet_netdev_ops; dev->watchdog_timeo = TX_TIMEOUT; err = register_netdev(dev); if (err)