[Prism54-devel] Re: iwspy - latest CVS

Margit Schubert-While margitsw@t-online.de
Fri, 19 Mar 2004 09:09:55 +0100


Aurelien scribe :
 >> version pre27 seems to support at least 512.

You sure ?; Here's a snip from wireless.h (same in kernel and
wireless tools) :

----------------- snip --------------------
/* -------------------- DEV PRIVATE IOCTL LIST -------------------- */

/* These 16 ioctl are wireless device private.
  * Each driver is free to use them for whatever purpose it chooses,
  * however the driver *must* export the description of those ioctls
  * with SIOCGIWPRIV and *must* use arguments as defined below.
  * If you don't follow those rules, DaveM is going to hate you (reason :
  * it make mixed 32/64bit operation impossible).
  */
#define SIOCIWFIRSTPRIV 0x8BE0
#define SIOCIWLASTPRIV  0x8BFF
/* Previously, we were using SIOCDEVPRIVATE, but we now have our
  * separate range because of collisions with other tools such as
  * 'mii-tool'.
  * We now have 32 commands, so a bit more space ;-).
  * Also, all 'odd' commands are only usable by root and don't return the
  * content of ifr/iwr to user (but you are not obliged to use the set/get
  * convention, just use every other two command).
  * And I repeat : you are not obliged to use them with iwspy, but you
  * must be compliant with it.
  */
------------------ end snip ----------------------------------

Aurelien also scribeth :
 > are probably debugging stuff. The iwpriv system should work.

Err, No, here's the code in net/core/wireless.c

/* Check if there is enough buffer up there */
if(iwr->u.data.length < dev->wireless_handlers->num_private_args) {
    printk(KERN_ERR "%s (WE) : Buffer for request SIOCGIWPRIV too small 
(%d<%d)\n",
   dev->name, iwr->u.data.length, dev->wireless_handlers->num_private_args);
                 return -E2BIG;
}



Margit