net: phylink: add support for PCS supported_interfaces bitmap
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 3 Jan 2025 11:16:31 +0000 (11:16 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 7 Jan 2025 00:26:12 +0000 (16:26 -0800)
commitfbb9a9d263a68f60a16c8ba5a51d6198d67171cd
tree69caabfb3a25b80137f5dcab6a0f34b3c27c4d63
parent4475d56145f368d065b05da3a5599d5620ca9408
net: phylink: add support for PCS supported_interfaces bitmap

Add support for the PCS to specify which interfaces it supports, which
can be used by MAC drivers to build the main supported_interfaces
bitmap. Phylink also validates that the PCS returned by the MAC driver
supports the interface that the MAC was asked for.

An empty supported_interfaces bitmap from the PCS indicates that it
does not provide this information, and we handle that appropriately.

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tTffL-007RoD-1Y@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phylink.c
include/linux/phylink.h