I have a Samsung Galaxy S II 9100. I had no problem connecting to wifi while it was running 2.3.4 or 2.3.6 official firmware. 2 days ago I upgraded to official 4.0.3 and now it connects to all other wifi networks except my home wireless. I did a clean flash, wiped data, cache, dalvik cache etc. I'm using a Linksys WRT300N wireless-N router and all other devices are able to connect (my laptop, other Android phones). Also, before I installed ICS I tried MIUI 2.3.16 which is based on Android 4.0.3 and had the same problem. Can anybody help me?
I was having the same problem with this router + phone + firmware combo, I found that setting up a DHCP Reservation (using the mac address of your phone) on the router (Setup/Basic Setup/DHCP Server/DHCP Reservation) allowed my phone to connect successfully.
Try reloading the wifi driver dial
*#*#526#*#* (or) install the "wifi-fixer" app from the market.
Here's an issue I had forever!
I fixed it by adjusting the router to use WPA2 only instead of WPA/WPA2. Now all my Android devices connect without problems.