Skip to content

Commit a57acc8

Browse files
author
Juha Heiskanen
committed
ETX update
Return configured MAX value if etx sampling is not ready but not received any ACK. Continue probing also after link TX failure.
1 parent 5373de2 commit a57acc8

File tree

1 file changed

+5
-4
lines changed
  • source/Service_Libs/etx

1 file changed

+5
-4
lines changed

source/Service_Libs/etx/etx.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,6 @@ void etx_transm_attempts_update(int8_t interface_id, uint8_t attempts, bool succ
269269
}
270270

271271
etx_calculation(entry, storage->attempts_count, storage->received_acks, &etx_neigh_info);
272-
273-
if (entry->etx_samples < 7 && !success) {
274-
entry->etx_samples = 7; //Stop Probing to failure
275-
}
276272
return;
277273
}
278274

@@ -443,6 +439,11 @@ uint16_t etx_local_etx_read(int8_t interface_id, uint8_t attribute_index)
443439
}
444440

445441
if (etx_info.cache_sample_requested && entry->etx_samples < etx_info.init_etx_sample_count) {
442+
etx_sample_storage_t *storage = etx_info.etx_cache_storage_list + attribute_index;
443+
if (storage->received_acks == 0 && storage->attempts_count) {
444+
//No ack so return max value
445+
return etx_info.max_etx;
446+
}
446447
//Not ready yet
447448
return 0;
448449
}

0 commit comments

Comments
 (0)