How to fix a NETGEAR WN802Tv2 after firmware upgrade

For me, updating to the latest 3.1.3 firmware for the NETGEAR WN802Tv2 access point had an unfortunate side effect: the access point refused to accept any password for logging in…
Resetting to factory defaults did not work.  There are a few threads on the NETGEAR forums about this as well, but the only resolution seemed to be to send the unit to NETGEAR.
However – after two days of hacking I have found a do-it-yourself solution:
1. Make sure you can connect to the web interface safely
This means resetting to factory defaults, use a cable directly between your computer and the access point, and set a static IP address for your computer in the 192.168.0.x range.  NETGEAR supports recommends using the address for reasons that I don’t know..
2. Go to the address
The real purpose of this file is not known, but it has an interesting side effect:  When you go to the access point home page afterwards, you get access to a partly functional interface.  A lot of things don’t work, but one important piece did work for me: the firmware upgrade
3. Upload the 3.1.1 firmware image
If you don’t have the firmware image here you can get it from NETGEAR support at http://kb.netgear.com/app/answers/detail/a_id/12197
4. Restore config
If you have a backed up config file, you can upload it.  Otherwise, just configure settings as normal.