Five players have already qualified for Shanghai: Federer, Rafael Nadal, Novak Djokovic, Nikolay Davydenko and Andy Roddick.
Two other players who are competing for spots at the Masters Cup also advanced at the Swiss Indoors. Fifth-seeded Tomas Berdych beat Feliciano Lopez 7-6 (4), 3-6, 6-3, and Guillermo Canas defeated Jose Acasuso 6-4, 6-3.
Also, qualifier Andrey Golubev upset Amer Delic 6-4, 6-3 and Juan Martin Del Potro advanced when Michael Russell retired with an upset stomach while trailing 5-2.
Del Potro next faces Federer, who needed three sets to beat Michael Berrer on Tuesday.
Top-seeded Anna Chakvetadze needed just 47 minutes to defeat Francesca Schiavone 6-0, 6-2 Wednesday to reach the quarter-finals of the Generali Ladies.
The seventh-ranked Russian was in control of the match throughout, as Schiavone double-faulted 10 times and won only eight points on her own serve in the opening set.
Chakvetadze, who became the top seed after defending champion Maria Sharapova and Nadia Petrova pulled out with injuries, will play either sixth-seeded Patty Schnyder or Alicia Molik in the quarterfinals.
Earlier on Wednesday, Dinara Safina beat Karin Knapp 6-2, 6-2.
The fourth-seeded Russian hit 17 winners from the baseline and broke the Italian twice in each set.
"From the start, I put a lot of pressure on Karin so she could not find to her normal game," Safina said.
During the first round, seventh-seeded Tatiana Golovin trailed Eleni Daniilidou of Greece 6-4, 0-1 when she retired with an injured right knee.
Golovin, who reached the final of the Zurich Open last Sunday, lost her serve three times in the first set.
Nicole Vaidisova rallied to beat Flavia Pennetta 4-6, 6-3, 7-6 (4). The fifth-seeded Czech had 47 unforced errors and converted three of 16 break points.
"Flavia is hard to beat so I am proud that I won," Vaidisova said. "I'd never played before in this arena and had troubles adapting to the circumstances."
A break in the opening game was enough for Pennetta to win the first set. Vaidisova, who also defeated the Italian at this year's US Open, had two breaks in the second to pull even.
The 14th-ranked Czech didn't score a point while serving for the match at 5-4, but wrapped up the victory in the tiebreaker.
Tamira Paszek also advanced, beating Anabel Medina Garrigues of Spain 6-3, 7-5. The 16-years-old Austrian plays third-seeded Marion Bartoli of France in the second round.



