In my Ubuntu 12.04 sony vaio when trying to download packages from Ubuntu repositories wifi speed is very slow. Internet works fine for other downloads/browsing. I tried with changing the download server but no change. Getting a download speed <1kbps.
What worked for me is running the commands below in sequence:
Basically, it turns of the power management system to mess with the wifi adapter. You may try other Ubuntu wireless problem fixes listed in this page. For me they did not work.