Your question is about the wireless connection to your laptop. Is that correct? And when you use a direct connection with a cable from your computer to the router or modem, it works fine. Is that right?
So then, you want to know if there's a way to reduce wireless failures . In general, wireless failures are caused by interference from other devices, such as a microwave oven or some other home appliances that generates quite a bit of radio noise. Also, your neighbors may have wireless devices using the same channel number as yhou. The remedy is to move off of that channel. By at least two to reduce interference. For example, if you neighbors on channel 7, you would like to use channel 10. So there would be two channels and between. If you are in a very crowded urban area that may not be possible.
Also, how far the wireless radio signal has to travel through walls, furniture and appliances can make a difference. Bear in mind that some of wireless devices cause mutual interference. For example, to laptops, side-by-side may interfere with each other's ability to connect to the router. Separating the two computers by about 2 m or 6 feet should be enough to cut down on mutual interference.
Yet another problem is not really the wireless connection itself. The interruption is the modem having a bad connection with the remote server. If that is the case, no adjustments to the wireless settings will resolve the issue.
Here on this forum. There is a search option on the upper right area of your screen. You then enter a topic. There and find lots of related articles and posts that the form has collected. You might try using the search term "wireless dropout."
Hope you find this helpful.
EDIT:If none of this helps, here is another thing to read:
Improve Your Wireless Connection Use P2P Software Responsibly
Performance tests on the residential wireless network indicate that certain programs, mainly peer-to-peer (P2P) file-sharing applications consume an excessive amount of network resources, resulting in overall loss of speed and reliability.