San Francisco 49ers linebacker Patrick Willis underwent surgery recently to repair a fractured right hand, according to a source.

Willis is expected to return after about three weeks, giving him plenty of time to be ready for the Sept. 8 regular-season opener against the Green Bay Packers.

The 28-year-old Willis, a six-time Pro Bowl choice and six-time Associated Press All-Pro selection in his six NFL seasons, suffered the injury while working against fullback Bruce Miller in a one-on-one pass-rush drill.

He has played with a broken hand in the past. He played with a cast during his rookie season and late in the 2010 season. He also wore a cast on his hand during his second-to-last season at Mississippi.

Willis has recorded more than 100 tackles in five of his six seasons, including 120 in 2012.

Information from The Associated Press was used in this report.