So, the problem is not wifi related.
Make sure all your network settings are set to automatical and not specified anyhow (IP, Routers-IP, subnet...). Test if you loose your connection to the wan (internet) or to the router. How to do that? Open the routers interface over your web browser (this...