The current version of iwlwifi that I got with Ubuntu updates is not letting me connect to WEP networks. It keeps on getting timed out or deauthenticated.
Unfortunately, I do not see iwlwifi in any version of Ubuntu that I'm using (maybe you could clarify which brand of Ubuntu you are using, which package versions you have installed, where did you get them from), therefore my answer will be generic.
In general, you can force the installation of a particular version like that:
You can find what versions are available by
Also, you can locate the particular deb package you need, download it and downgrade it manually:
You can then make sure that the package will not be upgraded by pinning it, either in the GUI of the synaptic package manager, or through command line:
Unfortunately, if the package is not available in a particular version, you need to install it from sources, following the instructions on the website of the package originator.