How do I avoid random Wireless LAN disconnects?

Solution 1:

Here's what you can do check the frag and rts settings on your gateway. I believe the defaults are frag 2346 rts 2347 so do this command:

sudo iwconfig wlan0 
frag 2346 rts 2347

Hope this helps!