Lines Matching refs:lwip_prot
58 struct lwip_prot_des *lwip_prot = (struct lwip_prot_des *)wlan->prot; in netif_is_ready() local
65 if (lwip_prot == RT_NULL) in netif_is_ready()
68 eth_dev = &lwip_prot->eth; in netif_is_ready()
69 rt_timer_stop(&lwip_prot->timer); in netif_is_ready()
72 rt_timer_start(&lwip_prot->timer); in netif_is_ready()
106 rt_timer_start(&lwip_prot->timer); in netif_is_ready()
128 struct lwip_prot_des *lwip_prot = (struct lwip_prot_des *)wlan->prot; in timer_callback() local
132 if (lwip_prot == RT_NULL) in timer_callback()
135 work = &lwip_prot->work; in timer_callback()
158 struct lwip_prot_des *lwip_prot = wlan->prot; in netif_set_connected() local
161 if (lwip_prot == RT_NULL) in netif_set_connected()
164 eth_dev = &lwip_prot->eth; in netif_set_connected()
166 if (lwip_prot->connected_flag) in netif_set_connected()
175 rt_timer_start(&lwip_prot->timer); in netif_set_connected()
197 rt_timer_stop(&lwip_prot->timer); in netif_set_connected()
209 rt_memcpy(netif_name, lwip_prot->eth.netif->name, sizeof(lwip_prot->eth.netif->name)); in netif_set_connected()
218 struct lwip_prot_des *lwip_prot = (struct lwip_prot_des *)wlan->prot; in rt_wlan_lwip_event_handle() local
221 if (lwip_prot == RT_NULL) in rt_wlan_lwip_event_handle()
224 flag_old = lwip_prot->connected_flag; in rt_wlan_lwip_event_handle()
231 lwip_prot->connected_flag = RT_TRUE; in rt_wlan_lwip_event_handle()
237 lwip_prot->connected_flag = RT_FALSE; in rt_wlan_lwip_event_handle()
243 lwip_prot->connected_flag = RT_TRUE; in rt_wlan_lwip_event_handle()
249 lwip_prot->connected_flag = RT_FALSE; in rt_wlan_lwip_event_handle()
268 if (flag_old != lwip_prot->connected_flag) in rt_wlan_lwip_event_handle()
423 struct lwip_prot_des *lwip_prot; in rt_wlan_lwip_protocol_register() local
452 lwip_prot = rt_malloc(sizeof(struct lwip_prot_des)); in rt_wlan_lwip_protocol_register()
453 if (lwip_prot == RT_NULL) in rt_wlan_lwip_protocol_register()
459 rt_memset(lwip_prot, 0, sizeof(struct lwip_prot_des)); in rt_wlan_lwip_protocol_register()
461 eth = &lwip_prot->eth; in rt_wlan_lwip_protocol_register()
483 rt_free(lwip_prot); in rt_wlan_lwip_protocol_register()
486 rt_memcpy(&lwip_prot->prot, prot, sizeof(struct rt_wlan_prot)); in rt_wlan_lwip_protocol_register()
488 … rt_timer_init(&lwip_prot->timer, timer_name, timer_callback, wlan, rt_tick_from_millisecond(1000), in rt_wlan_lwip_protocol_register()
495 return &lwip_prot->prot; in rt_wlan_lwip_protocol_register()
500 struct lwip_prot_des *lwip_prot = (struct lwip_prot_des *)prot; in rt_wlan_lwip_protocol_unregister() local
505 if (lwip_prot == RT_NULL) in rt_wlan_lwip_protocol_unregister()
514 rt_memcpy(netif_name, lwip_prot->eth.netif->name, sizeof(lwip_prot->eth.netif->name)); in rt_wlan_lwip_protocol_unregister()
518 eth_device_deinit(&lwip_prot->eth); in rt_wlan_lwip_protocol_unregister()
520 rt_timer_detach(&lwip_prot->timer); in rt_wlan_lwip_protocol_unregister()
522 rt_free(lwip_prot); in rt_wlan_lwip_protocol_unregister()