mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
29 lines
914 B
Diff
29 lines
914 B
Diff
|
From 1ee0591a1093c2448642c33433483e9260275f7b Mon Sep 17 00:00:00 2001
|
||
|
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||
|
Date: Fri, 14 May 2021 23:00:05 +0200
|
||
|
Subject: [PATCH] net: dsa: qca8k: add ethernet-ports fallback to
|
||
|
setup_mdio_bus
|
||
|
|
||
|
Dsa now also supports ethernet-ports. Add this new binding as a fallback
|
||
|
if the ports node can't be found.
|
||
|
|
||
|
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||
|
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||
|
---
|
||
|
drivers/net/dsa/qca8k.c | 3 +++
|
||
|
1 file changed, 3 insertions(+)
|
||
|
|
||
|
--- a/drivers/net/dsa/qca8k.c
|
||
|
+++ b/drivers/net/dsa/qca8k.c
|
||
|
@@ -719,6 +719,9 @@ qca8k_setup_mdio_bus(struct qca8k_priv *
|
||
|
|
||
|
ports = of_get_child_by_name(priv->dev->of_node, "ports");
|
||
|
if (!ports)
|
||
|
+ ports = of_get_child_by_name(priv->dev->of_node, "ethernet-ports");
|
||
|
+
|
||
|
+ if (!ports)
|
||
|
return -EINVAL;
|
||
|
|
||
|
for_each_available_child_of_node(ports, port) {
|