Please note that the Wireless Tools (starting with version 19) supports fully IEEE 802.11 parameters and devices, support older style of devices and most proprietary protocols, and are prepared to handle HiperLan as well. More recent versions of course adds more 802.11 support.
But, unfortunately not all drivers support all these features...
The Wireless Extensions and Wireless Tools version numbers will not match with each other. The Wireless Tools and the Wireless Extensions (the underlying API) evolve independantly of each other. The command iwconfig --version gives you the detail of your setup.
Compilation of the Wireless Tools used to be tricky, especially in the header area. I believe this has been fixed for good.
For kernels before 2.2.14/2.3.30, use Wireless Tools version 19.
For kernel after 2.2.14/2.3.30 use Wireless Tools version 20 or greater.
For kernel after 2.6.13 use Wireless Tools version 27 or greater
In the old time, you could upgrade Wireless Extensions by just changing wireless.h. Starting with Wireless Extensions v12, this is no longer true, you need to apply the full patch to the kernel.
For e.g. this is my output
iwconfig Wireless-Tools version 28
Compatible with Wireless Extension v11 to v19.
Kernel Currently compiled with Wireless Extension v19.
eth1 Recommend Wireless Extension v18 or later,
Currently compiled with Wireless Extension v19