More on newapi

Jean Tourrilhes jt at
Tue Dec 18 12:11:41 EST 2001

On Tue, Dec 18, 2001 at 11:56:50AM +1100, David Gibson wrote:
> > 
> > 	It was at the front of my mind all along. That was one reason
> > of factoring all the copy_{to,from}_user() in a single place in the
> > kernel and removing them for the driver, so that when come the need
> > you can fix it once and for good.
> > 	The new API doesn't fix it, but make it much easier to fix it
> > (and yes, also for private ioctl).
> It's still very difficult: the translation layer has to determine that
> the fd is associated with a device supporting wireless extensions,
> then parse the iw_handler tables to determine the type.

	I don't expect miracle. I didn't say the problem was solved, I
just said that it was a step in the right direction.
	First, the structure "iw_ioctl_description" is now available
in the kernel, which *at least* give you a clue of what's happening
(and it's an array, so you don't need to parse too much). We can add
other information as needed in this structure for the job. Before, we
just had nothing at all.
	Second, the actual copy is done in a single place. So, we
could also directly add special translation code in the
ioctl_standard_call() function that work in combination with the
generic translation layer to do the proper job. In other words, the
translation layer doesn't need to be fully transparent and can put
hooks in here.
	Hopefully, when it will be the case we will have moved to
another user space API than ioctl (but that's still on my todo list).

	Have fun...


More information about the wireless mailing list