WRT54GL would be a better choice than the WRT54G - at least you aren't going to get a VXWorks lemon that way.
It would work as a switch and wireless AP, but you wouldn't be able to use it as a router (so you'd only be able to have one machine connected, it would get the public IP from the modem, you wouldn't be - trivially - able to see the router's web interface, you get the idea).