[PATCH]: use of IEEE80211_IOCTL_FILTERFRAME

Ted Merrill ted
Wed Oct 31 12:05:36 PDT 2007


I understand now what you are talking about in net/core/wireless.c .
There is the SIOCGIWPRIV iocl call which allows fetching the list of the 
available ioctls along with some somewhat convoluted size information.
There is code that in the kernel searches through the same list to figure
out how to handle each ioctl... hardly efficient, but i suppose that doesn't 
matter.
One can hope that the algorithm used to compute the transport method will be 
stable; probably it will be with respect to existing ioctls anyway; new 
IW_PRIV_TYPE_* types would be one possible area of breakage.
Clearly a user-space library to encapsulate these details would have been a 
really nice thing to have (or by some chance it exists?).
Anyway, i reluctantly agree, we should talk to the kernel code the way that 
the author of the kernel code wants us to talk, as best we can.

To recap, this regards the implementation of the set80211priv() function in 
hostapd/driver_madwifi.c .
I'd be happy if Jouni would accept my patch as is (perhaps adding a TODO 
comment about the correct implementation) and i or someone could provide a 
more correct fix later.

-Ted Merrill
Atheros Communications





On Monday 15 October 2007 16:24:56 Matthew 'mentor' Bell wrote:
> On Mon, 2007-10-15 at 13:59 -0700, Ted Merrill wrote:
> > It would seem the only "correct" fix would be to list every possible
> > ioctl. But i think that sticking with the current-size based test, plus
> > exceptions for those that don't follow it, should be a good enough hack.
> > Most ioctls have fixed data sizes and are set up to be inline if it fits;
> > there would be few exceptions... this appears to be the only exception
> > so far in this realm.
>
> OK, so it looks to me like data is always passed out of band, unless it
> is a fixed IOCTL and the data is smaller than IFNAMSIZ. So, we have to
> test whether an IOCTL is fixed size and what that size is; both of these
> bits of information are exported from the kernel. This does not require
> the creation of another list of every IOCTL, only the retrieval of the
> one from the kernel. This is not even hard to do, so (IMO) no hack is
> good enough. Just do it right.
>
> <snip>
>
> Matthew W. S. Bell
>
> > > [1] linux-2.6.21/driver/core/wireles.c:963 onwards
> > > (ioctl_private_call()).
>
> Apologies here, I appear to have made this path up. net/wireless/wext.c
> maybe.






More information about the Hostap mailing list