when you use static IP you will also need to add DNS server IPs to your PC's network setup. this is probably what is wrong. using the DHCP server one wrt54g and PC set to auto it will get DNS server IPs from DHCP Server(wrt54g)