I am using Ubuntu 14.04 LTS and recently I had problem with my wifi card RT3290 Wireless 802.11n 1T/1R PCIe. Then I found this answer which leads me to This second solution. The second solution solved my problem.
But after some time I find my wifi is getting disconnected automatically, and if I disable and then enable internet after some time from the menu bar it works again. Now it has become practically impossible to use internet via wifi in Ubuntu. I found This bug and this Post, but neither of them has an answer.