Some Linux systems have very poor WiFi performance after power cord detach. The reason is power management, which sets the WiFi card on powersave. Notably Broadcom cards behave very badly on powersave and under problematic reception conditions may break altogether. The best solution if to disable powersave if on battery.
You can do this temporaly with
iwconfig <wifiinterface> power off
A lasting solution is to add this empty file as su:
This file overrides the one in /usr/lib/pm-utils/power.d/wireless which sets power consumption when on battery to a lower level.