mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-25 21:48:54 +00:00
v1.2.1
This commit is contained in:
@@ -141,12 +141,13 @@ int net_if_get_ip(net_if_t *net_if, uint32_t *ip, uint32_t *mask, uint32_t *gw)
|
||||
}
|
||||
#endif
|
||||
|
||||
int net_if_add(net_if_t *net_if, const uint32_t *ipaddr, const uint32_t *netmask, const uint32_t *gw)
|
||||
int net_if_add(net_if_t *net_if, const uint32_t *ipaddr, const uint32_t *netmask, const uint32_t *gw, void *state_vif)
|
||||
{
|
||||
err_t status = ERR_OK;
|
||||
|
||||
aic_dbg("net_if_add %s return %d\n", net_if->name, status);
|
||||
net_if->num = netif_dev.netif_num++;
|
||||
net_if->state = state_vif;
|
||||
|
||||
return (status == ERR_OK ? 0 : -1);
|
||||
}
|
||||
@@ -192,7 +193,7 @@ int net_init(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RX_WAIT_LWIP
|
||||
if (rtos_semaphore_create(&netifdev->fhost_rx_lwip_sema, "fhost_rx_lwip_sema", NET_RX_LWIP_CNT, 0)) {
|
||||
if (rtos_semaphore_create(&netifdev->fhost_rx_lwip_sema, "FhostRxLwipSema", NET_RX_LWIP_CNT, 0)) {
|
||||
AIC_ASSERT_ERR(0);
|
||||
}
|
||||
#endif /* CONFIG_RX_WAIT_LWIP */
|
||||
|
||||
@@ -35,7 +35,7 @@ void platform_net_buf_rx_free(void *ref);
|
||||
// Driver netif base API define
|
||||
//-------------------------------------------------------------------
|
||||
int net_if_add(net_if_t *net_if, const uint32_t *ipaddr,
|
||||
const uint32_t *netmask, const uint32_t *gw);
|
||||
const uint32_t *netmask, const uint32_t *gw, void *state_vif);
|
||||
int net_if_get_name(net_if_t *net_if, char *buf, int len);
|
||||
int net_if_get_wifi_idx(net_if_t *net_if);
|
||||
void net_if_up(net_if_t *net_if);
|
||||
|
||||
Reference in New Issue
Block a user