I found out that the problem was with the firewall in modem, and now its working fine. thanks for helping!
the message i see while running connection diagnostics my laptop connects to local network but not internet  Gateway IP ping test                        failed  The wireless router/AP for your network is either unavailable, not working, or is disconnected. You will not be able to connect to the Internet, although you might be able to connect to your local network. Contact your network administrator or wireless router/AP installer for assistance. The gateway IP ping test determines if the wireless router/AP for the network is available and working.  Info dell inspiron 1440 32 bit  ms-vista dell wireless 1397 wlan mini card 
MyLaptop doesn't connect to my wifi network but other devices such as phones do