]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: phylink: simplify phylink_parse_fixedlink()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 22 Oct 2024 14:17:07 +0000 (15:17 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 29 Oct 2024 18:56:23 +0000 (11:56 -0700)
commite0e918494c3cfdc589c9ede49183046a42cdff39
tree5386ceae6aed81882e3acdb41995e7a186708799
parent6c9c579166b7edd4c97a5d8d0059d7299d3d661a
net: phylink: simplify phylink_parse_fixedlink()

phylink_parse_fixedlink() wants to preserve the pause, asym_pause and
autoneg bits in pl->supported. Rather than reading the bits into
separate bools, zeroing pl->supported, and then setting them if they
were previously set, use a mask and linkmode_and() to achieve the same
result.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/E1t3Fh5-000aQi-Nk@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phylink.c