diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-05-24 22:04:13 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-09-29 10:14:45 +0100 |
commit | 8e2b4782cf6b1c7ff8cd9eb573004dd93c3e23a9 (patch) | |
tree | a2b3623514aeed41cae4da2c007f91ef93fe9f1f /net/dsa/dsa.c | |
parent | b9177c91a383b020151cb5e27c0806379addece5 (diff) |
net: dsa: remove obsolete phylink dsa_switch operations
No driver now uses the DSA switch phylink members, so we can now remove
the shim functions and method pointers. Arrange to print an error
message and fail registration if a DSA driver does not provide the
phylink MAC operations structure.
Signed-off-by: Russell King (oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 5b01a0e43ebe..534336a60613 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -1544,6 +1544,11 @@ static int dsa_switch_probe(struct dsa_switch *ds) if (!ds->num_ports) return -EINVAL; + if (!ds->phylink_mac_ops) { + dev_err(ds->dev, "DSA switch driver does not provide phylink MAC operations"); + return -EINVAL; + } + if (np) { err = dsa_switch_parse_of(ds, np); if (err) |