|If you're able to ping the router, you're lucky, because it seems not to be bricked completely.|
In that case, unplug the power cable of the router.
Make sure, that your computers ip settings are set manually to :
ip address: 192.168.1.x (where x is 2 to 254)
subnet mask: 255.255.255.0
gateway: 192.168.1.1 (should be your routers ip address)
You will need a tool named tftp and the correct firmware for your router.
Open command prompt.
tftp -i 192.168.1.1 put your_firmware_file.bin
Now connect the power plug to the router.
The firmware should be uploaded automatically.
During firmware upload to the router, don't touch anything. The router should restart automatically, when finished and everything should work again.