I was having issues with random loss of internet connection with my WRT54G2. Searching the internet found other people with similar problems but no definate solutions. I was somewhat resigned to buying a new router, but I decided as a last ditch effort to install DD-WRT. The instuctions on their wiki worked fine. The only hitch was turning off the Windows firewall was necessary for the tftp client to work. Once DD-WRT was installed my problems vanished, and I have some cool extra features.
Note: According to the instructions I followed this process is irreversible and can brick your router. So do this at your own risk.