提交 f990385a 编写于 作者: Huge_HW's avatar Huge_HW

lowpower fit LOSCFG_NET_CONTAINER

Signed-off-by: Huge_HW's avatarHuge_Dream <534463586@qq.com>
Change-Id: I087df48850ba2d37cbbb93ed6a30c313586d233f
上级 c26d3ccd
......@@ -365,10 +365,9 @@ autoip_stop(struct netif *netif)
u32_t
autoip_tmr_tick(void)
{
struct netif *netif = netif_list;
struct netif *netif = NULL;
u32_t tick = 0;
while (netif != NULL) {
NETIF_FOREACH(netif) {
struct autoip *autoip = netif_autoip_data(netif);
if ((autoip != NULL) && (autoip->ttw > 0)) {
if ((autoip->state == AUTOIP_STATE_PROBING) ||
......@@ -376,7 +375,6 @@ autoip_tmr_tick(void)
SET_TMR_TICK(tick, autoip->ttw);
}
}
netif = netif->next;
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", __func__, tick));
......
......@@ -673,10 +673,14 @@ igmp_tmr(void)
u32_t
igmp_tmr_tick(void)
{
struct netif *netif;
struct netif *netif = NULL;
u32_t tick = 0;
NETIF_FOREACH(netif) {
#ifdef LOSCFG_NET_CONTAINER
NETIF_FOREACH(netif, get_root_net_group())
#else
NETIF_FOREACH(netif)
#endif
{
struct igmp_group *group = netif_igmp_data(netif);
while (group != NULL) {
if (group->timer > 0) {
......@@ -685,7 +689,6 @@ igmp_tmr_tick(void)
group = group->next;
}
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", __func__, tick));
return tick;
}
......
......@@ -830,7 +830,12 @@ dhcp6_tmr_tick()
struct netif *netif = NULL;
u32_t tick = 0;
/* loop through netif's */
NETIF_FOREACH(netif) {
#ifdef LOSCFG_NET_CONTAINER
NETIF_FOREACH(netif, get_root_net_group())
#else
NETIF_FOREACH(netif)
#endif
{
struct dhcp6 *dhcp6 = netif_dhcp6_data(netif);
/* only act on DHCPv6 configured interfaces */
if ((dhcp6 != NULL) && (dhcp6->request_timeout > 0)) {
......
......@@ -535,10 +535,15 @@ mld6_tmr(void)
u32_t
mld6_tmr_tick(void)
{
struct netif *netif = netif_list;
struct netif *netif = NULL;
u32_t tick = 0;
while (netif != NULL) {
#ifdef LOSCFG_NET_CONTAINER
NETIF_FOREACH(netif, get_root_net_group())
#else
NETIF_FOREACH(netif)
#endif
{
struct mld_group *group = netif_mld6_data(netif);
while (group != NULL) {
if (group->timer > 0) {
......@@ -546,7 +551,6 @@ mld6_tmr_tick(void)
}
group = group->next;
}
netif = netif->next;
}
LOWPOWER_DEBUG(("%s tmr tick: %u\n", __func__, tick));
......
......@@ -1219,7 +1219,12 @@ nd6_tmr_tick(void)
}
/* Process our own addresses, updating address lifetimes and/or DAD state. */
NETIF_FOREACH(netif) {
#ifdef LOSCFG_NET_CONTAINER
NETIF_FOREACH(netif, get_root_net_group())
#else
NETIF_FOREACH(netif)
#endif
{
for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) {
u8_t addr_state;
#if LWIP_IPV6_ADDRESS_LIFETIMES
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册