We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 621ab56 commit aae3937Copy full SHA for aae3937
libraries/Ethernet/src/Ethernet.cpp
@@ -54,9 +54,9 @@ EthernetLinkStatus EthernetClass::linkStatus() {
54
EthernetHardwareStatus EthernetClass::hardwareStatus() {
55
const struct device *const dev = DEVICE_DT_GET(DT_COMPAT_GET_ANY_STATUS_OKAY(ethernet_phy));
56
if (device_is_ready(dev)) {
57
- for (int i = 1; i < 3; i++) {
+ for (int i = 1; i < 4; i++) {
58
auto _if = net_if_get_by_index(i);
59
- if (!net_eth_type_is_wifi(_if)) {
+ if (_if && !net_eth_type_is_wifi(_if)) {
60
netif = _if;
61
break;
62
}
0 commit comments