I'm not sure for the iPhone 3G but on the original iPhone, the celluar radio part was also responsible for WiFi operation. I assume they're similarly linked in the 3G which is why you had issues with both.