Skip to content

Commit

Permalink
Thread tx failure handling update (ARMmbed#1620)
Browse files Browse the repository at this point in the history
When TX failure threshold is reached Thread cleaup is called, device
information still remains in MLE layer causing routing problems later.

Update Thread TX failure handler to clean entry information from
MLE layer. MLE cleanup will trigger cleaning from MAC and Thread
layers.
  • Loading branch information
Arto Kinnunen authored Mar 14, 2018
1 parent 15846ed commit cfb1e81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/6LoWPAN/Thread/thread_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ static void thread_tx_failure_handler(int8_t nwk_id, uint8_t accumulated_failure
}

if (accumulated_failures >= THREAD_MAC_TRANSMISSIONS*THREAD_FAILED_CHILD_TRANSMISSIONS) {
thread_reset_neighbour_info(cur, neighbor);
mle_class_remove_entry(cur->id, neighbor);
}
}

Expand Down
3 changes: 2 additions & 1 deletion source/6LoWPAN/Thread/thread_routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,8 @@ static void delete_link(thread_info_t *thread, thread_router_link_t *link)
thread_router_id_t id = link->router_id;
thread_routing_info_t *routing = &thread->routing;

tr_debug("delete_link: router: %x", thread_router_addr_from_id(link->router_id));

/* Remove entry from the link set */
ns_list_remove(&routing->link_set, link);
ns_dyn_mem_free(link);
Expand All @@ -779,7 +781,6 @@ static void delete_link(thread_info_t *thread, thread_router_link_t *link)
ns_dyn_mem_free(route_entry);
}
}

thread_update_fast_route_table(thread);
}

Expand Down
6 changes: 6 additions & 0 deletions source/6LoWPAN/adaptation_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,12 @@ int8_t lowpan_adaptation_interface_tx_confirm(protocol_interface_info_entry_t *c
case MLME_TRANSACTION_EXPIRED:
default:
tr_error("MCPS Data fail by status %u", confirm->status);
if (buf->dst_sa.addr_type == ADDR_802_15_4_SHORT) {
tr_info("Dest addr: %x", common_read_16_bit(buf->dst_sa.address+2));
} else if (buf->dst_sa.addr_type == ADDR_802_15_4_LONG) {
tr_info("Dest addr: %s", trace_array(buf->dst_sa.address+2, 8));
}

#ifdef HAVE_RPL
if (confirm->status == MLME_TX_NO_ACK) {
if (buf->route && rpl_data_is_rpl_parent_route(buf->route->route_info.source)) {
Expand Down

0 comments on commit cfb1e81

Please sign in to comment.