net: dsa: ocelot: populate supported_interfaces
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 25 Feb 2022 16:19:25 +0000 (16:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Feb 2022 12:44:28 +0000 (12:44 +0000)
commit79fda660bdbba839f434cf8674ff4a20d88fbeb2
tree046521b64ed941825932b4a36f40323ea47bc7a8
parent3e120e45801809ee25cab90690ea633bf20875ba
net: dsa: ocelot: populate supported_interfaces

Populate the supported interfaces bitmap for the Ocelot DSA switches.

Since all sub-drivers only support a single interface mode, defined by
ocelot_port->phy_mode, we can handle this in the main driver code
without reference to the sub-driver.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix.c