net: phylink: simplify ksettings_set() implementation
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 21 Jul 2020 11:04:16 +0000 (12:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 22:46:50 +0000 (15:46 -0700)
commitc8cab719cc64f8999503aff584a7bef7edb28e24
tree4f429f2ef771665567bdad70eb97764a7b059f0c
parent7cceb599d15d6639b1298ae400c26d822148e86f
net: phylink: simplify ksettings_set() implementation

Simplify the ksettings_set() implementation to look more like phylib's
implementation; use a switch() for validating the autoneg setting, and
use the linkmode_modify() helper to set the autoneg bit in the
advertisement mask.

Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c