(CNN) -- World No. 1 Roger Federer made a confident start in the defense of his ranking with a second round victory over Chinese Taipei's Yen-Hsun Lu in the Shanghai Masters Wednesday.
Federer took one hour 20 minutes for a 6-3 7-5 win and will now face fellow Swiss and doubles partner Stanislas Wawrinka.
Should Federer progress, it will guarantee he would have held the top ranking for 300 weeks in his glittering career.
Defeat, combined with Novak Djokovic taking the title come Sunday, would see the current No.2 on top of the world again.
Federer, who was the subject of a bizarre online death threat ahead of the tournament, was pleased with his performance after returning to competitive action for the first time in nearly a month.
"It's just about getting a sense of how to play the points again, " he told the official ATP Tour website.
"But my last matches were on clay (In a Davis Cup tie).
"You always wonder if you have lost something in the meantime."
Second seed Djokovic was untroubled as he won his opener against Grigor Dimitrov of Bulgaria 6-3 6-2 in just 54 minutes.
He is coming off his title win in Beijing where improvements to his service appeared to pay off.
"That's something that I've been working on, obviously. Relying on the serve in today's tennis is a big advantage. So I try to get as many free points as possible," he said.
Two-time defending champion and World No.3 Andy Murray had a walkover passage to the third round when his opponent Florian Mayer withdrew with a rib injury.
U.S. Open champion Murray will next play Alexandr Dolgopolov of the Ukraine.
Meanwhile on the WTA Tour, No.1 ranked Victoria Azarenka continued her recent impressive form.
The Belarus star won in Beijing at the weekend but the long return journey to Europe appeared not to hinder her as she beat Arantxa Rus of the Netherlands 6-0 6-2 in the first round of the tournament in Linz, Austria.
She is chasing her sixth title of 2012 at the hard court tournament.