Commit 3f6413d8 authored by Yangbo Lu's avatar Yangbo Lu Committed by Benjamin Cabé
Browse files

samples: net: dsa: handle disabled slave ports



The multiple ports DSA device may have some ports disabled in
dts. This should be handled in the sample.

Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
parent 03c0d034
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -28,9 +28,9 @@ static void iface_cb(struct net_if *iface, void *user_data)
				struct net_if *slave = dsa_get_slave_port(iface, i);

				if (slave == NULL) {
					LOG_ERR("Slave interface %d not found.", i);
					break;
					continue;
				}
				LOG_INF("Slave interface %d found.", i);

				ifaces->lan[i] = slave;
			}