File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -860,7 +860,6 @@ rt_err_t eth_device_linkchange(struct eth_device* dev, rt_bool_t up)
860860 enetif = (struct eth_device * )dev -> netif -> state ;
861861 rt_device_t device = (rt_device_t )(& (enetif -> parent ));
862862
863-
864863 level = rt_spin_lock_irqsave (& (dev -> spinlock ));
865864 dev -> link_changed = 0x01 ;
866865 if (up == RT_TRUE )
@@ -896,6 +895,10 @@ rt_err_t eth_device_linkchange(struct eth_device* dev, rt_bool_t up)
896895/* NOTE: please not use it in interrupt when no RxThread exist */
897896rt_err_t eth_device_linkchange (struct eth_device * dev , rt_bool_t up )
898897{
898+ struct eth_device * enetif ;
899+ enetif = (struct eth_device * )dev -> netif -> state ;
900+ rt_device_t device = (rt_device_t )(& (enetif -> parent ));
901+
899902 if (up == RT_TRUE )
900903 {
901904 /* @note Check whether the eth device was successfully initialized, otherwise re-initialize */
You can’t perform that action at this time.
0 commit comments