Download the latest version of RedSn0w from here and place it in a Pwnage folder on your Desktop.
Download the iOS 5.1 firmware for your device from here and place it in the same Pwnage folder.
Extract the RedSn0w archive then right click the RedSn0w executable (from within the extracted folder) and select Run as Administrator to launch the application.
Click Extras from the RedSn0w main menu.
Click Custom IPSW from the Extras menu.
Select your iOS 5.1 firmware from the Pwnage folder on your Desktop and click Open.
RedSn0w will now customize an IPSW file for you.
RedSn0w will inform you once your IPSW has been created successfully. Click the OK button.
Click Pwned DFU from the Extras menu.
Connect your device to the computer via USB and power it off. Then click the Next button to continue.
Hold down the Power button for 3 seconds.
Without releasing the Power button, also hold down the Home button for 10 seconds.
Without releasing the Home button, release the Power button BUT KEEP holding the Home button until your device is detect in DFU mode.
You device will now be exploited with LimeRa1n.
Once its done you will be in Pwned DFU mode.
Launch iTunes by clicking its icon in the dock.
Select your device from the list on the left, then hold down the Shift key and click Restore.
Select the NO_BB custom IPSW from the Pwnage folder on your desktop and click Open.
You iPhone will now be upgraded to iOS 5.1 without updating the baseband.