File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,12 @@ class EthernetClass: public NetworkInterface
45
45
46
46
EthernetHardwareStatus hardwareStatus () {
47
47
const struct device *const dev = DEVICE_DT_GET (DT_COMPAT_GET_ANY_STATUS_OKAY (ethernet_phy));
48
+ int if_count;
49
+ NET_IFACE_COUNT (&if_count);
48
50
if (device_is_ready (dev)) {
49
- for (int i = 1 ; i <= 3 ; i++) {
51
+ for (int i = 1 ; i <= if_count ; i++) {
50
52
auto _if = net_if_get_by_index (i);
51
- if ((_if != nullptr ) && !net_eth_type_is_wifi (_if)) {
53
+ if (!net_eth_type_is_wifi (_if)) {
52
54
netif = _if;
53
55
break ;
54
56
}
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ FORCE_EXPORT_SYM(net_if_ipv4_set_gw);
76
76
FORCE_EXPORT_SYM (net_if_ipv4_addr_add );
77
77
FORCE_EXPORT_SYM (net_if_ipv4_set_netmask_by_addr );
78
78
FORCE_EXPORT_SYM (net_if_lookup_by_dev );
79
+ FORCE_EXPORT_SYM (_net_if_list_start );
80
+ FORCE_EXPORT_SYM (_net_if_list_end );
79
81
#endif
80
82
81
83
#if defined(CONFIG_NET_L2_ETHERNET )
You can’t perform that action at this time.
0 commit comments