From: Krzysztof Halasa <khc@pm.waw.pl>
To: Yoann Padioleau <padator@wanadoo.fr>
Cc: Jeff Garzik <jeff@garzik.org>,
kernel-janitors@vger.kernel.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: dev->priv to netdev_priv(dev)
Date: Sat, 04 Aug 2007 01:42:38 +0200 [thread overview]
Message-ID: <m3lkcskwwh.fsf@maximus.localdomain> (raw)
In-Reply-To: <87myx8338m.fsf_-_@wanadoo.fr> (Yoann Padioleau's message of "Fri, 03 Aug 2007 20:03:05 +0200")
Yoann Padioleau <padator@wanadoo.fr> writes:
> drivers/net/wan/hdlc_fr.c
hdlc_fr (PVC device) uses dev->priv for N:1 mappings (a single pvc
structure may be referenced as dev->priv by multiple (up to 2
currently) PVC devs).
> drivers/net/wan/hdlc_ppp.c
hdlc_ppp obviously has to do some tricks to use syncppp:
static int ppp_open(struct net_device *dev)
{
hdlc_device *hdlc = dev_to_hdlc(dev);
void *old_ioctl;
int result;
dev->priv = &state(hdlc)->syncppp_ptr;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
state(hdlc)->syncppp_ptr = &state(hdlc)->pppdev;
state(hdlc)->pppdev.dev = dev;
old_ioctl = dev->do_ioctl;
state(hdlc)->old_change_mtu = dev->change_mtu;
sppp_attach(&state(hdlc)->pppdev);
Perhaps I should remove that and make a sane interface in syncppp.
--
Krzysztof Halasa
prev parent reply other threads:[~2007-08-03 23:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 13:18 [PATCH] dev->priv to netdev_priv(dev), drivers/net/tokenring/ Yoann Padioleau
2007-07-23 15:13 ` Jan Engelhardt
2007-07-23 15:38 ` Yoann Padioleau
2007-07-30 20:03 ` Jeff Garzik
2007-08-03 18:03 ` dev->priv to netdev_priv(dev) Yoann Padioleau
2007-08-03 23:42 ` Krzysztof Halasa [this message]
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=m3lkcskwwh.fsf@maximus.localdomain \
--to=khc@pm.waw.pl \
--cc=akpm@linux-foundation.org \
--cc=jeff@garzik.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=padator@wanadoo.fr \
/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
all inboxes | Powered by JetHome®