WRT54G's with version 5.1 of the firmware have a bug in them to do with the way the firmware was loaded at the factory. We had a few of theses in work to muck about with and they had similar problems!! What you need to do is download the latest firmware for it, and follow the instructions to the letter, resetting it as described in the right order!!!!
I did this one the ones in work and they are fine now!
Lee