Multiwavelength observations of the γ-ray-emitting narrow-line Seyfert 1 PMN J0948+0022 in 2011