Add implementation for configuring switch driver.

This version now incorporates the changes suggested in the review comments
for the last commit: 797143e8efcc7edce0478f17879f8d494a177d0e.