From: Stephen Hemminger <shemminger@osdl.org>
To: James Ketrenos <jketreno@linux.co.intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Announce] Intel PRO/Wireless 2100 802.11b driver
Date: Thu, 11 Mar 2004 10:37:54 -0800 [thread overview]
Message-ID: <20040311103754.540d9ca5@dell_ss3.pdx.osdl.net> (raw)
In-Reply-To: <404E27E6.40200@linux.co.intel.com>
The whole /proc/ipw2100/xxx interface is ugly and a mess. It doesn't expose anything
really useful that can't be found other ways and it is buggy. It doesn't handle
more than one device; I know you don't make hardware with multiple chipsets now but
will that always be true? Also, it forgets to do properly set module owner.
If you really have to keep the interface could you consider putting it in sysfs.
Something like /sys/class/net/eth0/ipw2100/xxx with one value per file.
The way to do that is with attribute groups.
The following wrappers might help:
diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h
--- a/include/linux/netdevice.h Thu Mar 11 10:36:47 2004
+++ b/include/linux/netdevice.h Thu Mar 11 10:36:47 2004
@@ -489,6 +489,20 @@
*/
#define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev))
+
+static inline netdev_sysfs_add_group(struct net_device *dev,
+ const struct attribute_group *grp)
+{
+ return sysfs_create_group(&net->class_dev.kobj, grp);
+}
+
+static inline netdev_sysfs_remove_group(struct net_device *dev,
+ const struct attribute_group *grp)
+{
+ sysfs_remove_group(&net->class_dev.kobj, grp);
+}
+
+
struct packet_type {
unsigned short type; /* This is really htons(ether_type). */
struct net_device *dev; /* NULL is wildcarded here */
--
Stephen Hemminger mailto:shemminger@osdl.org
Open Source Development Lab http://developer.osdl.org/shemminger
next prev parent reply other threads:[~2004-03-11 18:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-09 20:24 James Ketrenos
2004-03-09 20:57 ` Arjan van de Ven
2004-03-09 22:01 ` James Ketrenos
2004-03-09 23:48 ` Marcel Holtmann
2004-03-09 21:05 ` Timothy Miller
2004-03-09 21:12 ` Dax Kelson
2004-03-10 2:46 ` James Ketrenos
2004-03-10 8:15 ` vda
2004-03-10 8:38 ` Jeff Garzik
2004-03-10 17:31 ` Timothy Miller
2004-03-10 17:26 ` Jeff Garzik
2004-03-12 0:32 ` Lincoln Dale
2004-03-11 1:07 ` Joel Jaeggli
2004-03-10 12:35 ` bert hubert
2004-03-10 18:06 ` Disconnect
2004-03-11 22:45 ` Bill Davidsen
2004-03-10 7:52 ` Jan De Luyck
2004-03-11 6:23 ` Jan De Luyck
2004-03-11 7:48 ` James Ketrenos
2004-03-11 8:05 ` Jan De Luyck
2004-03-11 18:37 ` Stephen Hemminger [this message]
2004-03-11 22:14 ` James Ketrenos
2004-03-11 22:27 ` Bill Davidsen
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=20040311103754.540d9ca5@dell_ss3.pdx.osdl.net \
--to=shemminger@osdl.org \
--cc=jketreno@linux.co.intel.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®