WiFi stopped working (dhcpd times out) after enabling device encryption
Might be some  interoperability issue with particular hotspot.If it is a DHCP time out you can try assigning a manual ip address to the particular network.
Or if It is rooted device you can try below command inside adb shell.

dhcpcd wlan0