netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@oss.sgi.com
Subject: Re: [PATCH] ethertap can use alloc_etherdev
Date: Tue, 11 Nov 2003 16:47:58 -0800	[thread overview]
Message-ID: <20031111164758.66298833.shemminger@osdl.org> (raw)
In-Reply-To: <3FB17650.2000408@pobox.com>

On Tue, 11 Nov 2003 18:52:48 -0500
Jeff Garzik <jgarzik@pobox.com> wrote:

> Stephen Hemminger wrote:
> > Can use alloc_etherdev, don't need to call ether_setup.
> > Found by viro.
> > 
> > diff -Nru a/drivers/net/ethertap.c b/drivers/net/ethertap.c
> > --- a/drivers/net/ethertap.c	Tue Nov 11 09:36:15 2003
> > +++ b/drivers/net/ethertap.c	Tue Nov 11 09:36:15 2003
> > @@ -72,8 +72,7 @@
> >  	struct net_device *dev;
> >  	int err = -ENOMEM;
> >  
> > -	dev = alloc_netdev(sizeof(struct net_local), "tap%d",
> > -			   ether_setup);
> > +	dev = alloc_etherdev(sizeof(struct net_local));
> 
> 
> Um?  This clearly changes the device's interface name, which 
> alloc_etherdev() not ether_setup() assigns.
> 

It forces it already several lines later and it hasn't registered yet.

	if (!dev)
		goto out;

	SET_MODULE_OWNER(dev);

	sprintf(dev->name, "tap%d", unit);
	dev->base_addr = unit + NETLINK_TAPBASE;


-- 
Stephen Hemminger <shemminger@osdl.org>
Open Source Development Lab	 http://developer.osdl.org

:-) Ignorance never settles a question

  reply	other threads:[~2003-11-12  0:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-11 22:45 [PATCH] ethertap can use alloc_etherdev Stephen Hemminger
2003-11-11 23:52 ` Jeff Garzik
2003-11-12  0:47   ` Stephen Hemminger [this message]
2003-11-12  0:50     ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031111164758.66298833.shemminger@osdl.org \
    --to=shemminger@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).