]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: dsa: sja1105: simplify static configuration reload
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 1 Oct 2024 16:04:36 +0000 (17:04 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Oct 2024 00:32:00 +0000 (17:32 -0700)
commita18891b55703a45b700618ef40edd5e9aaecc345
tree8d605e380ccbd53874810448c9d83bf63e93774f
parent155c499ffd1d0d49b6303736a8b42bb941ff1096
net: dsa: sja1105: simplify static configuration reload

The static configuration reload saves the port speed in the static
configuration tables by first converting it from the internal
respresentation to the SPEED_xxx ethtool representation, and then
converts it back to restore the setting. This is because
sja1105_adjust_port_config() takes the speed as SPEED_xxx.

However, this is unnecessarily complex. If we split
sja1105_adjust_port_config() up, we can simply save and restore the
mac[port].speed member in the static configuration tables.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1svfMa-005ZIX-If@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/sja1105/sja1105_main.c