That didn't solve my problem on Ubuntu 16.04 and RT2561/RT61 802.11g PCI, with rt61pc driver.
What solved was:
Make sure that power management is turned off.
iwconfig wlan0
Should display a line with Power Management: Off. If it says On, you have to run:
sudo iwconfig wlan0 power off
To make it permanent, run command as follows:
sudo gedit /etc/rc.local
And copy this before exit 0
sleep 30
iwconfig wlan0 power off
Note that instead of wlan0 it can be wlan1 or so for you depending on the situation.
Source here.