Does it connect only when in close proximity to (but not wire-connected to) the router?
If that's the case, I'd say the problem is either with the transmitter, the receiver, or the environment.
Check that the transmitters antennae are fitting well and unobstructed.
Check the same on the receiving end, what do you have on the laptop BTW, built-in or other?
A simple way to check the transmission is to try with a different device, borrow one if you don't have one yourself (check that it works) if the other device works then likely your receiver is ill, otherwise likely your transmitter is the problem.
You can also test you laptops receiver on a public wifi.
If those checks turn out fine, the problem might be harder to fix.
Are you aware of anything that could be generating a lot of radio noise, something that's changed since the time when it worked?Have you changed any settings or firmware since the time it was working?
Etc. etc.