Rex Ryan reportedly has been replaced in Buffalo

According to a report from Vic Carucci of the Buffalo News, the team is zeroing in on the Carolina Panthers' defensive coordinator, and could have an agreement finalized in the coming days.

McDermott has spent the past six seasons as the defensive coordinator for the Carolina Panthers, leading a unit that had an impressive turnaround and has had a lot of success. Ryan was notably fired before the end of his second season along the sideline for the Bills.

Ryan was sacked with one game left in the 2016 season.

More news: Aaron Rodgers explains how he throws the flawless Hail Mary

It appears the Bills are still focused on finding a defense-first path to success. The Niners have already interviewed Buffalo's Anthony Lynn, Atlanta's Kyle Shanahan, New England's Josh McDaniels and Washington's Sean McVay for the coaching job.

The Bills restructured the quarterback's contract in August, giving him a five-year extension while retaining the right to opt out of the deal by March. He led them to the Super Bowl a year ago. The Bills went 8-8 in his first season, marking just their fifth non-losing campaign during the recent stretch.

Carolina finished 21st in yards allowed, giving up 500-plus yards three times. The Bills also interviewed Arizona Cardinals offensive coordinator Harold Goodwin and Seattle Seahawks defensive coordinator Kris Richard. Under McCoy as head coach, the Chargers were top 10 in total offensive yards twice in his four years. He held stints as a defensive coordinator, defensive line coach, defensive backs coach, and linebackers coach, and also coordinated special teams for six seasons. Buffalo would need to make changes up front after playing a 3-4 scheme under Ryan, and could make several roster moves to compensate for McDermott's philosophies.