net: dsa: populate supported_interfaces member
authorMarek Behún <kabel@kernel.org>
Thu, 28 Oct 2021 17:00:14 +0000 (18:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Nov 2021 13:06:32 +0000 (13:06 +0000)
commitc07c6e8eb4b38bae921f9e2f108d1e7f8e14226e
treeb940f9082437ae1816aeea075d1d5dd371235fc7
parentebed1cf5b8acbfc963a63a342a106700103e181b
net: dsa: populate supported_interfaces member

Add a new DSA switch operation, phylink_get_interfaces, which should
fill in which PHY_INTERFACE_MODE_* are supported by given port.

Use this before phylink_create() to fill phylinks supported_interfaces
member, allowing phylink to determine which PHY_INTERFACE_MODEs are
supported.

Signed-off-by: Marek Behún <kabel@kernel.org>
[tweaked patch and description to add more complete support -- rmk]
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/port.c
net/dsa/slave.c