How the rover can communicate through Mars-orbiting spacecraft
Not only does the rover send messages directly to the DSN stations, but it is also able to uplink information to other spacecraft orbiting Mars, utilizing mainly the Mars Reconnaissance Orbiter and Mars Odyssey (if necessary) spacecraft as messengers that pass along news to Earth for the rover. The respective spacecraft mainly "talk" via their UHF antennas. The Mars Reconnaissance Orbiter carries an Electra UHF payload with the capability of helping navigate the Mars Science Laboratory safely toward Mars. The Ka-Band package aboard the Mars Reconnaissance Orbiter can serve as another possible pipeline to "talk" to the Mars Science Laboratory (read more about the Mars Reconnaissance Orbiter Engineering Instruments).
The benefits of using the orbiting spacecraft are that the orbiters are closer to the rover than the DSN antennas on Earth and the orbiters have Earth in their field of view for much longer time periods than the rover on the ground.
Because the orbiters are only between 160 and 250 miles (257 and 400 kilometers) above the surface of Mars, the rover doesn’t have to "yell" as loudly (or use as much energy to send a message) to the orbiters as it does to the antennas on Earth.
Watch "Mars in a Minute": Phoning Home: Communicating from Mars