(Updates with Federer win)
Oct 11 (Reuters) - Second seed Novak Djokovic served well and barely broke a sweat as he marched past Spaniard Feliciano Lopez 6-3 6-3 to reach the quarter-finals of the Shanghai Masters tennis on Thursday.
An error-prone Roger Federer recovered in time to beat compatriot Stanislas Wawrinka 4-6 7-6 6-0 to guarantee his 300th week at the top of the world rankings.
The top seed and world number one Swiss will play Marin Cilic from Croatia, who defeated Spaniard Fernando Verdasco 4-6 6-1 6-4, for a place in the semi-finals.
Serbian world number two Djokovic, who last week won the China Open in Beijing, served 12 aces and lost seven points on his serve to continue his rich vein of form.
"I'm trying to enjoy the efficiency of my serve," Djokovic told reporters.
"I'm not very well known around the tour for big serving. But so far in this tournament, and also in Beijing, it has been working very well for me.
"It has been giving me a lot of free points, a lot of confidence in the matches."
Defending champion Andy Murray, who had a bye in the first round and a walkover in the second, had an easy outing against Ukraine's Alexandr Dolgopolov.
Murray, chasing his third successive title in Shanghai, converted five of his six break-point chances to win 6-2 6-2 in under an hour.
"I think I did a decent job," Murray, who lost to Milos Raonic in the Japan Open semi-finals last week, said.
"It's very, very different conditions to last week. I just tried to stay solid and not go for the lines too much early on."
Big-serving American John Isner, seeded number eight, hit 17 aces to Radek Stepanek's four but the Czech still managed to eke out a 6-4 6-7 6-3 victory to set up a quarter-final date with third seed Murray.
Fourth seed Tomas Berdych battled past American Sam Querrey 6-2 6-7 6-4 in two hours 13 minutes to keep alive his hopes of qualifying for November's season-ending World Tour finals in London.
Jo-Wilfried Tsonga, seeded fifth, also remained on course for London by defeating Marcos Baghdatis of Cyprus 6-2 7-6.
"I feel like I (am) playing (a) really good level," Tsonga said. "I played great. I think I (have) improved my game a bit these last couple of months.