You'll have to download a 5.1.1. custom firmware.
Then go into Redsn0w and select 'enter pwned DFU mode'
After it's in DFU mode go into iTunes and restore with the custom firmware file
If you restore with the stock Apple firmware it will put your device in recovery mode and be stuck with error 1015 restore error.