This isn't really a content-full post, but if any of you are trying to install linux on a new computer and are finding that your internet connection drops after a couple minutes and a bit of traffic, it was a really annoying problem for me that existed for essentially the entire life I've had this computer. I only found the solution a couple days ago.
Right now, the iwlagn driver does not have full support for 802.11n. In fact, having 802.11n enabled will oftentimes screw up your internet connection in a very strange way. You retain your IP address, everything says you're still connected, but no transmission is really happening. You might notice a drop in bitrate from the output of iwconfig, but setting it to be higher again doesn't fix the issue. The issue is 802.11n.
The fix is to initiate the module with the option 11n_disable=1 or 11n_disable50=1. I had to use the latter. I am not sure, but I think it depends on which version of the driver you have (iwl4965 vs iwl5000). So make sure that you are compiling the driver as a module (do not build it into the kernel) and the fix is below.
If you have already booted and want to fix the issue, run the following commands as root
modprobe iwlagn 11n_disable=1
(or modprobe iwlagn 11n_disable50=1)
If you want the module to be loaded properly on boot, edit the file /etc/modprobe.conf (on gentoo; on other distributions this file might be somewhere else) and append the following line:
options iwlagn 11n_disable=1
(or options iwlagn 11n_disable50=1)
You might also have to use both options. I had to use 11n_disable50 and not 11n_disable. Regardless, one of these two should work and leave you with a perfectly reliable wireless card (without n mode, though).
Hopefully I helped someone with this post! This is a really really difficult bug to google.