Where in /proc or /sys can I find the current bit rate?

Dan Williams dcbw at redhat.com
Sun Nov 12 08:37:02 EST 2006


On Sun, 2006-11-12 at 10:35 +0000, David Goodenough wrote:
> On Saturday 11 November 2006 22:59, Sam Schinke wrote:
> > On Tuesday 07 November 2006 01:53, David Goodenough wrote:
> > > I know that I can get the rate using iwconfig, but that involves parsing
> > > the response and I would rather not do that if I can avoid it.  But it
> > > occurred to me that most of the other values available through iwconfig
> > > were available in either /proc or /sys, so I hoped that I could find the
> > > current bit rate there too, but as yet I have not found it.  Anyone got
> > > any idea where it might be?
> >
> > This would appear to be driver independent.
> >
> > I find the following on my laptop:
> >
> > laptop ~ # cat /proc/net/ndiswrapper/wlan0/hw | grep bit_rate
> > bit_rate=48000 kBps
> That is not much good to me as I am using a native driver not an 
> ndiswrapper one.
> 
> It really would be useful if this could be added to the native driver
> and other drivers encouraged to use the same naming.

Just use iwconfig, of call the ioctl() yourself!  Adding yet more fields
to /sys/class/net/<dev>/ is probably a lost cause, let alone getting all
drivers to do it.  BTW, proc is the _wrong_ place for this stuff, and
ndiswrapper shouldn't be putting its rate information there either.  In
the above example ndiswrapper should be adding fields to its sysfs
directory for the specific device; that's what sysfs is for.  What's the
rate for?  If you're doing a stats display tool or something like that
chances are you need more than rate already.  It's pretty easy to do the
required ioctls in c, C++, or python.

Dan

> 
> David
> >
> > Regards,
> > Sam
> > _______________________________________________
> > HostAP mailing list
> > HostAP at shmoo.com
> > http://lists.shmoo.com/mailman/listinfo/hostap
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap




More information about the HostAP mailing list