Bases on how u describe it would seems like it's hardware related. There is a thread where they discuss about placing foil to enhance the signal, some gave good review and some were skeptical and discourage it. U could try to experimental with it.
I did had wifi issue but the problem lies with the router. I am running a bridge repeater where I would loop on obtaining IP address, setting static ip solved it.
A few troubleshoot I would suggest, setting static IP or trying different rom(cm and sense).
But if it's hardware related then there isn't much u can do.