[PATCH] Compile problem with WE 14

Jouni Malinen jkmaline at cc.hut.fi
Mon Dec 9 23:22:43 EST 2002


On Mon, Dec 09, 2002 at 07:47:10PM -0800, Jean Tourrilhes wrote:

> 	Note that there is another way to fix this one :
> #ifndef IWEVCUSTOM
> #define IWEVCUSTOM	0x8C02		/* Driver specific ascii string */
> #endif

Thanks, that is actually lot nicer since it can be hidden in some
compatibility header file..

> 	Remember that some of those feature I'm adding to Wireless
> Extension are stuff you guys are asking for. And I try to make sure
> that new feature that you don't need or don't like don't get in your
> way.

Yes and I appreciate this a lot.

> 	There is a few options :
> 	1) Don't use W-Ext at all, and have your own set of tools
> strongly linked with the driver, like linux-wlan-ng, or use a /proc
> interface, like airo.c.

I don't even consider that to be an option ;-). Having a common user
space API for most drivers is certainly very useful. I have to admit
that hostapd is using couple of own ioctl()'s and so is individual
WEP key configuration, but these are (at least for now) specific to
Host AP driver.

> 	2) Assume only a baseline WE (like WE-9), and ignore all
> functionality added after that. Refer to #1 for additional config.
> 	3) Assume the lastest WE, and generate a compilation error for
> earlier WE, point to my web pages for necessary WE patches.
> 	4) #if WIRELESS_EXT of all the features needed, which is the
> current solution.
> 	5) Mix 2/3/4 too make the conditional blocks less
> granular. For example, you could decide to use scanning only after
> WE-15 (and not on WE-14), or not use IWEVCUSTOM at all.

I don't wish to break compilation or ignore all new WE features. Some
sort of mix is probably the way to go with Host AP driver, but I might
change the support to be a bit less generic. I have already dropped
done some limitations (like requiring WE 9 for some code that would
actually work even with WE 8). Maybe a good selection would be to
support latest 2.2 kernel, latest two version from 2.4 (i.e., current
stable kernel), and latest version of 2.5 (i.e., current devel kernel).
This would at least limit the number of different versions to 4 (9, 13,
14, and 15 at the moment).

> 	6) Include driver in the kernel, and use whatever WE version
> is in that kernel.

That would make the code more readable, but I would prefer to maintain
one version of the driver, that would work at least with two latest
stable kernel trees (2.2 and 2.4) and latest devel tree (2.5)..

> 	Also, in most case you may migrate the "conditionality" to the
> header file (the solution above), but this will result in bloat in the
> driver.

This makes it easier to maintain the code, so I would prefer to do this.
In some cases it has just been easier to add new ifdef block, but I
should probably go through these once and check what could be removed.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the HostAP mailing list