Federer, the top seed, was an easy 6-3, 6-3 second-round winner over unseeded Andreas Seppi of Italy.
"I had to save break points today, which I didn't have to do in the first round, so I thought it was a bit tougher," Federer, who was once a ball boy in Basel, said in reference to a 6-3, 6-4 opening-round victory against Belgium's Olivier Rochus.
Federer is playing for the first time since losing 3-6, 7-6 (7-5), 4-6, 7-6 (7-4), 6-2 to Argentina's Juan Martin del Potro at the U.S. Open final in New York in September.
Also winning Wednesday were fifth-seeded Czech Radek Stepanek, sixth-seeded Stanislas Wawrinka of Switzerland, No. 4 seed Marin Cilic of Croatia, and Frenchmen Richard Gasquet and Jeremy Chardy.