It was working fine. Just suddenly can't adjust the aperture or the f stop using the adjustment wheel while in M or A mode. In fact, the adjustment wheel doesn't work for any purpose. Basically the camera won't take a decent picture unless it's in auto.
Other things to try:
Remove battery, wait, put it back
Reset to factory settings by pressing the two buttons with a green dot for 2 seconds (see here. The location of the buttons is a bit different on the D5100 but they are there too).
But most likely yes, it's going to the shop.