If you have DD-WRT you can directly revert back to your manufacturer’s firmware using DD-WRT’s web interface. If you are using OpenWRT, first you need to change to DD-WRT to be able to revert it to original firmware.
If you have DD-WRT on your router you have to do the following:
Download the proper firmware from your manufacturer’s website.
Do a hard reset on the router (hold the reset button for 30 seconds, OR from the GUI, do a reset to factory defaults.
Flash the Linksys firmware in via the GUI taking care not to lose power, reset or otherwise disturb the router during flashing and for 10 MINUTES after it says it’s complete….leave it alone.
After 10 minutes, do another hard reset. This time it’s best to hold the reset button for 30 seconds.
After it boots, open a browswer and browse back to the GUI. In case of a Linksys router, you should see the Linksys firmware page, and your user name and password will have changed to: username = blank, password = admin or username=root, password=admin. You’re done.