I can't say that I'm familiar with that router, however the steps I recommended for the WBR-2310 generally apply to any wireless router. The possible problem, in your case, is that you need that LAN-port to LAN-port connection from the WHR-G54S on the second floor back to the DSL-2540B modem on the first floor.
The WHR-G54S probably does not support a "wireless repeater" mode on its own, but if it does, that is another configuration option. If it does not, you may be able to get "alternative" firmware that does support that mode. A good place to ask questions about this is the Buffalo foru