The iPhone has a pretty nifty WiFi implementation. It worked great in my house with my cheap Belkin router for about 15 minutes, then never worked again. The iPhone thought it had a connection but nothing would load. Then I switched routers at home to the Netgear FWG114P and now the iPhone Wifi is fine.
Was the problem Apple's or Belkin's? Was it the ARP implementation, or the DHCP lease maintenance, or the WEP-128 implementation, or the 802.11g switching magic? How could I possibly know? Wifi is more voodoo than science and the complexity of Internet protocols is so high I'd never be able to figure out the specific problem. And if I did, I couldn't fix it anyway; all the firmware is closed. So I just keep going through routers until I find one that works.