From patchwork Tue Dec 2 16:14:37 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 11800 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 33AFEDDDEF for ; Wed, 3 Dec 2008 03:14:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755259AbYLBQOl (ORCPT ); Tue, 2 Dec 2008 11:14:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751746AbYLBQOl (ORCPT ); Tue, 2 Dec 2008 11:14:41 -0500 Received: from mail.vyatta.com ([76.74.103.46]:45573 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbYLBQOk (ORCPT ); Tue, 2 Dec 2008 11:14:40 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.vyatta.com (Postfix) with ESMTP id 69A144F4228; Tue, 2 Dec 2008 08:14:41 -0800 (PST) X-Virus-Scanned: amavisd-new at X-Spam-Flag: NO X-Spam-Score: -1.388 X-Spam-Level: X-Spam-Status: No, score=-1.388 tagged_above=-10 required=3 tests=[AWL=-0.672, BAYES_00=-2.599, FH_HOST_EQ_VERIZON_P=0.001, RCVD_IN_PBL=0.905, RCVD_IN_SORBS_DUL=0.877, RDNS_DYNAMIC=0.1] Received: from mail.vyatta.com ([127.0.0.1]) by localhost (mail.vyatta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v503qFhxMSCZ; Tue, 2 Dec 2008 08:14:40 -0800 (PST) Received: from extreme (pool-96-225-207-155.ptldor.fios.verizon.net [96.225.207.155]) by mail.vyatta.com (Postfix) with ESMTP id 6E9B54F4209; Tue, 2 Dec 2008 08:14:40 -0800 (PST) Date: Tue, 2 Dec 2008 08:14:37 -0800 From: Stephen Hemminger To: David Miller , Jeff Garzik Cc: netdev@vger.kernel.org Subject: [PATCH] mac8390: update to net_device_ops Message-ID: <20081202081437.7c884ede@extreme> Organization: Vyatta X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Another related 8390 driver. Since this is for nubus, not sure if anyone still has the hardware? 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/Makefile 2008-12-02 07:58:02.000000000 -0800 +++ b/drivers/net/Makefile 2008-12-02 07:56:15.000000000 -0800 @@ -97,7 +97,7 @@ obj-$(CONFIG_HAMACHI) += hamachi.o obj-$(CONFIG_NET) += Space.o loopback.o obj-$(CONFIG_SEEQ8005) += seeq8005.o obj-$(CONFIG_NET_SB1000) += sb1000.o -obj-$(CONFIG_MAC8390) += mac8390.o +obj-$(CONFIG_MAC8390) += mac8390.o 8390.o obj-$(CONFIG_APNE) += apne.o 8390.o obj-$(CONFIG_PCMCIA_PCNET) += 8390.o obj-$(CONFIG_HP100) += hp100.o --- a/drivers/net/mac8390.c 2008-12-02 07:58:07.000000000 -0800 +++ b/drivers/net/mac8390.c 2008-12-02 07:56:24.000000000 -0800 @@ -304,7 +304,7 @@ struct net_device * __init mac8390_probe if (!MACH_IS_MAC) return ERR_PTR(-ENODEV); - dev = ____alloc_ei_netdev(0); + dev = alloc_ei_netdev(); if (!dev) return ERR_PTR(-ENOMEM); @@ -478,6 +478,20 @@ void cleanup_module(void) #endif /* MODULE */ +static const struct net_device_ops mac8390_netdev_ops = { + .ndo_open = mac8390_open, + .ndo_stop = mac8390_close, + .ndo_start_xmit = ei_start_xmit, + .ndo_tx_timeout = ei_tx_timeout, + .ndo_get_stats = ei_get_stats, + .ndo_set_multicast_list = ei_set_multicast_list, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = ei_poll, +#endif +}; + static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * ndev, enum mac8390_type type) { @@ -503,11 +517,7 @@ static int __init mac8390_initdev(struct int access_bitmode = 0; /* Now fill in our stuff */ - dev->open = &mac8390_open; - dev->stop = &mac8390_close; -#ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = __ei_poll; -#endif + dev->netdev_ops = &mac8390_netdev_ops; /* GAR, ei_status is actually a macro even though it looks global */ ei_status.name = cardname[type];