swconfig: add API for setting port link speed