Skip to content

Commit aae3937

Browse files
committed
ethernet: fix interface discovery on c33
1 parent 621ab56 commit aae3937

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/Ethernet/src/Ethernet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ EthernetLinkStatus EthernetClass::linkStatus() {
5454
EthernetHardwareStatus EthernetClass::hardwareStatus() {
5555
const struct device *const dev = DEVICE_DT_GET(DT_COMPAT_GET_ANY_STATUS_OKAY(ethernet_phy));
5656
if (device_is_ready(dev)) {
57-
for (int i = 1; i < 3; i++) {
57+
for (int i = 1; i < 4; i++) {
5858
auto _if = net_if_get_by_index(i);
59-
if (!net_eth_type_is_wifi(_if)) {
59+
if (_if && !net_eth_type_is_wifi(_if)) {
6060
netif = _if;
6161
break;
6262
}

0 commit comments

Comments
 (0)