In my new Galaxy GT-I9100 Android version 4.0.3 everything expect WI-Fi is working fine. When I am connecting my wireless it's getting connected, but not able to browse the internet. I tried changing from DHCP to Static IP Address, restarted mobile/Wi-Fi router, removed the battery and checked, it's working for only a few minutes and again the same issue.
Have you enabled the MAC Filter on your Router?
If you've then you should disable it or enter the MAC Adress of your S2 in the Routerconfig.