Skip to content

Commit cfb1e81

Browse files
author
Arto Kinnunen
authored
Thread tx failure handling update (#1620)
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.
1 parent 15846ed commit cfb1e81

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

source/6LoWPAN/Thread/thread_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,7 @@ static void thread_tx_failure_handler(int8_t nwk_id, uint8_t accumulated_failure
18381838
}
18391839

18401840
if (accumulated_failures >= THREAD_MAC_TRANSMISSIONS*THREAD_FAILED_CHILD_TRANSMISSIONS) {
1841-
thread_reset_neighbour_info(cur, neighbor);
1841+
mle_class_remove_entry(cur->id, neighbor);
18421842
}
18431843
}
18441844

source/6LoWPAN/Thread/thread_routing.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,8 @@ static void delete_link(thread_info_t *thread, thread_router_link_t *link)
768768
thread_router_id_t id = link->router_id;
769769
thread_routing_info_t *routing = &thread->routing;
770770

771+
tr_debug("delete_link: router: %x", thread_router_addr_from_id(link->router_id));
772+
771773
/* Remove entry from the link set */
772774
ns_list_remove(&routing->link_set, link);
773775
ns_dyn_mem_free(link);
@@ -779,7 +781,6 @@ static void delete_link(thread_info_t *thread, thread_router_link_t *link)
779781
ns_dyn_mem_free(route_entry);
780782
}
781783
}
782-
783784
thread_update_fast_route_table(thread);
784785
}
785786

source/6LoWPAN/adaptation_interface.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,12 @@ int8_t lowpan_adaptation_interface_tx_confirm(protocol_interface_info_entry_t *c
10141014
case MLME_TRANSACTION_EXPIRED:
10151015
default:
10161016
tr_error("MCPS Data fail by status %u", confirm->status);
1017+
if (buf->dst_sa.addr_type == ADDR_802_15_4_SHORT) {
1018+
tr_info("Dest addr: %x", common_read_16_bit(buf->dst_sa.address+2));
1019+
} else if (buf->dst_sa.addr_type == ADDR_802_15_4_LONG) {
1020+
tr_info("Dest addr: %s", trace_array(buf->dst_sa.address+2, 8));
1021+
}
1022+
10171023
#ifdef HAVE_RPL
10181024
if (confirm->status == MLME_TX_NO_ACK) {
10191025
if (buf->route && rpl_data_is_rpl_parent_route(buf->route->route_info.source)) {

0 commit comments

Comments
 (0)