WRT54GL: 16% packet loss, upload not possible.

a few days ago i've noticed that some websites began loading very slow, then next morning ALL websited slowed down to a crawl. tried uploading something through ftp - no luck, after ~100KB transfer everything stops... so i replace WRT54GL v1.0 with my old dlink router, connection problems disappeared. of course different problems started but thats just because that dlink is too old too slow...

Sorry, no idea in that case...
IHMO your approach to try another router is correct as it shows that it's not the Linux box and not your PC either (because with another router the effect would also have shown).
Perhaps it's a routing issue on the WRT? I don't know enough about how ICMP and routing interact to answer that...

Well, I can't give you a firm answer on this, but here's my observation. The fact that your pings respond the way they do kind of makes me suspect a software problem rather than hardware. How do we find out for sure? Well, if I was in your position, here is how I would proceed.

First, do an erase all data in NVRAM (thorough).

Next upgrade the firmware, you could even just reload what you've got now, but choose upgrade and let it override what is currently in there.

Now do another thorough erase of the NVRAM.

Okay, at this point, everything that had been stored in the NVRAM has been pretty well removed, and you now have a very clean installation with all default values. The next step would be to configure the router as little as possible so that you can do the ping test between the two computers again. When I say as little as possible, I mean just basically setting the router's IP address and a single port forward, if need be. Don't make any changes at this point you don't absolutely have to, regardless of how innocent they may seem.

At this point, one of two things is going to occur. Either the pings between the two computers will be perfect now, or it will still show trouble. If everything is perfect now, reconfigure the router and put back in service. If you still have trouble, I think that pretty much pegs it as a definite hardware failure. I don't know if a noisy power supply could cause the router to malfunction in this way, I highly doubt it, but hooking up a known good power supply would not be a bad thing to try. If you are still having trouble after this, I don't think it would be reasonable to try anything further. Just chuck the router in a trashcan and buy a new one, you can probably get it in your hand for under $60.

Why do you need to ping for an hour?
Do you not get reproducible results from 100 pings?
Why do you not measure the RTT frequency distribution?
Why not run ping tests from the Unix system?
Why do you put any trust in any software that runs on a PC?
Why not simply test between the two unix systems -- once on the LAN interface, and once on the WAN interface of the router?

If there is no problem, you know that the problem is with the PC.

Why not use shh to transfer files betwen router and other unix system and watch the transfer rate?

i did pretty much everything you all suggested 3 times over (lol), but that didnt solve the problem, or so i thought... just before i was about to give up i for no reason ran a network stress test. packet loss and VERY unstable transfer speeds as before (50Kbps at peaks, otherwise jumpy 0 to 5Kbps). i didnt bother turning off the stress test and went to bed. to my surprise when i got up transfer speeds were perfectly stable! i have no idea what happened but now packet losses are gone and i get stable connections both ways, LAN->WAN / WAN->LAN.

PS: i did replace the 12V/1A power supply with 12V/.5Amp one as suggested by the WRT54GL manual, and also switched Cat5 with brand new Cat6 cables. also soldered on and used JTAG connection. these might have played a part in the process...