File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,10 @@ class EthernetClass: public NetworkInterface
4545
4646 EthernetHardwareStatus hardwareStatus () {
4747 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);
4850 if (device_is_ready (dev)) {
49- for (int i = 1 ; i <= 3 ; i++) {
51+ for (int i = 1 ; i <= if_count ; i++) {
5052 auto _if = net_if_get_by_index (i);
5153 if ((_if != nullptr ) && !net_eth_type_is_wifi (_if)) {
5254 netif = _if;
Original file line number Diff line number Diff line change @@ -76,6 +76,8 @@ FORCE_EXPORT_SYM(net_if_ipv4_set_gw);
7676FORCE_EXPORT_SYM (net_if_ipv4_addr_add );
7777FORCE_EXPORT_SYM (net_if_ipv4_set_netmask_by_addr );
7878FORCE_EXPORT_SYM (net_if_lookup_by_dev );
79+ FORCE_EXPORT_SYM (_net_if_list_start );
80+ FORCE_EXPORT_SYM (_net_if_list_end );
7981#endif
8082
8183#if defined(CONFIG_NET_L2_ETHERNET )
You can’t perform that action at this time.
0 commit comments