net: phylink: cleanup ksettings_set
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 20 Jul 2021 11:15:26 +0000 (12:15 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Jul 2021 14:52:15 +0000 (07:52 -0700)
commit7cefb0b0e91191185ddd26912cc52d589218fa47
tree5073d4a1d0b5c6f2e2ed1ebba7a2b8cb43392ebf
parent3389d3027fec5ec8f687fb07fd8e6c1bd102b451
net: phylink: cleanup ksettings_set

We only need to fiddle about with the supported mask after we have
validated the user's requested parameters. Simplify and streamline the
code by moving the linkmode copy and update of the autoneg bit after
validating the user's request.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c