I assume you have a done a factory reset. Consumer grade gateways with routing functions are generally shit, but if you used a different router with the same results, it isn't likely the router.
Isolate the to problem to layer-2 or layer-3. Disconnect the router from your WAN modem or whatever the ISP provides. You should be able to plug all computers into the switchports and be able to ping everything on the same subnet as that does not require any routing (layer-3). What model Linksys is it? You may be better off using that with DD-WRT. Make sure there isn't anything on the network with a duplicate IP causing a conflict. The list is exhaustive, need to know a bit more to isolate the issue. If there are separate subnets for wired and wireless, there could be bridging issues.