"DD-WRT is a Linux based alternative OpenSource firmware suitable for a great variety of WLAN routers and embedded systems. The main emphasis lies on providing the easiest possible handling while at the same time supporting a great number of functionalities within the framework of the respective hardware platform used."
https://www.dd-wrt.com/site/index
There is a list of supported routers, along with hardware revisions. I have a d link 615 and it works very well. lot's of stuff to play with. They do advise a reset before and after installation.
No guarantees though, if it "bricks" your router don't blame me
