When this happened to me (connected but Limited), the network troubleshooter said it was unable to get an IP address.
To fix it, I temporarily turned of my Avast Internet Security firewall, reset the wireless adapter by putting it in and out of flight mode, ran the troubleshooter again and confirmed I could now get an IP address, and then re-enabled the firewall. I haven't had any problems since.