File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -5487,9 +5487,8 @@ static void notify_iface_down(struct net_if *iface)
54875487 }
54885488}
54895489
5490- static inline const char * net_if_oper_state2str (enum net_if_oper_state state )
5490+ const char * net_if_oper_state2str (enum net_if_oper_state state )
54915491{
5492- #if CONFIG_NET_IF_LOG_LEVEL >= LOG_LEVEL_DBG
54935492 switch (state ) {
54945493 case NET_IF_OPER_UNKNOWN :
54955494 return "UNKNOWN" ;
@@ -5510,11 +5509,6 @@ static inline const char *net_if_oper_state2str(enum net_if_oper_state state)
55105509 }
55115510
55125511 return "<invalid>" ;
5513- #else
5514- ARG_UNUSED (state );
5515-
5516- return "" ;
5517- #endif /* CONFIG_NET_IF_LOG_LEVEL >= LOG_LEVEL_DBG */
55185512}
55195513
55205514static void update_operational_state (struct net_if * iface )
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ extern void net_if_init(void);
5959extern void net_if_post_init (void );
6060extern void net_if_stats_reset (struct net_if * iface );
6161extern void net_if_stats_reset_all (void );
62+ extern const char * net_if_oper_state2str (enum net_if_oper_state state );
6263extern void net_process_rx_packet (struct net_pkt * pkt );
6364extern void net_process_tx_packet (struct net_pkt * pkt );
6465
Original file line number Diff line number Diff line change @@ -274,6 +274,11 @@ static void iface_cb(struct net_if *iface, void *user_data)
274274 net_if_get_device (iface ) ? net_if_get_device (iface )-> name : "<?>" ,
275275 net_if_get_device (iface ));
276276
277+ PR ("Status : oper=%s, admin=%s, carrier=%s\n" ,
278+ net_if_oper_state2str (net_if_oper_state (iface )),
279+ net_if_is_admin_up (iface ) ? "UP" : "DOWN" ,
280+ net_if_is_carrier_ok (iface ) ? "ON" : "OFF" );
281+
277282#if defined(CONFIG_NET_L2_ETHERNET_MGMT )
278283 if (net_if_l2 (iface ) == & NET_L2_GET_NAME (ETHERNET )) {
279284 count = 0 ;
You can’t perform that action at this time.
0 commit comments