netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Pavel Roskin <proski@gnu.org>
Cc: netdev@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: Can we have GET_NETDEV_DEV?
Date: Tue, 25 Jul 2006 14:26:06 -0700	[thread overview]
Message-ID: <20060725142606.0a44d258@localhost.localdomain> (raw)
In-Reply-To: <1153861691.2288.14.camel@dv>

On Tue, 25 Jul 2006 17:08:11 -0400
Pavel Roskin <proski@gnu.org> wrote:

> Hello, Stephen!
> 
> On Tue, 2006-07-25 at 10:20 -0700, Stephen Hemminger wrote:
> 
> > So how about these wrappers.
> 
> > +static inline void netdev_set_pdev(struct net_device *dev, struct device *pdev)
> > +{
> > +	dev->class_dev.dev = pdev;
> > +}
> > +
> > +static inline struct device *netdev_get_pdev(struct net_device *dev)
> > +{
> > +	return dev->class_dev.dev;
> > +}
> 
> The positive effect of a macro is that if would allow MadWifi to prepare
> in advance by testing if GET_NETDEV_DEV is defined.
> 
> The functions may or may not be useful for the code in the kernel, but
> I'll not be able to prepare MadWifi unless I know the kernel version in
> which they will appear.
> 
> Considering the drivers that are already in the kernel, you may prefer
> to have a more high-level function that would clone the network device
> by copying most of the net_device structure.  I think netdev_get_pdev()
> would be mostly used for such cloning if implemented.
> 

What is the wireless tree using for this?

  reply	other threads:[~2006-07-25 21:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-25  4:52 Can we have GET_NETDEV_DEV? Pavel Roskin
2006-07-25 17:20 ` Stephen Hemminger
2006-07-25 21:08   ` Pavel Roskin
2006-07-25 21:26     ` Stephen Hemminger [this message]
2006-07-25 22:02       ` Pavel Roskin
2006-07-25 21:31   ` Greg KH

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=20060725142606.0a44d258@localhost.localdomain \
    --to=shemminger@osdl.org \
    --cc=gregkh@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=proski@gnu.org \
    /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).