aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorMarek BehĂșn <kabel@kernel.org>2021-10-28 18:00:14 +0100
committerDavid S. Miller <davem@davemloft.net>2021-11-01 13:06:32 +0000
commitc07c6e8eb4b38bae921f9e2f108d1e7f8e14226e (patch)
treeb940f9082437ae1816aeea075d1d5dd371235fc7 /include/net/dsa.h
parentMerge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue (diff)
downloadlinux-dev-c07c6e8eb4b38bae921f9e2f108d1e7f8e14226e.tar.xz
linux-dev-c07c6e8eb4b38bae921f9e2f108d1e7f8e14226e.zip
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>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r--include/net/dsa.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index badd214f7470..eff5c44ba377 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -645,6 +645,8 @@ struct dsa_switch_ops {
/*
* PHYLINK integration
*/
+ void (*phylink_get_interfaces)(struct dsa_switch *ds, int port,
+ unsigned long *supported_interfaces);
void (*phylink_validate)(struct dsa_switch *ds, int port,
unsigned long *supported,
struct phylink_link_state *state);