lkml.org 
[lkml]   [2004]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [Announce] Intel PRO/Wireless 2100 802.11b driver
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.112 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site