[config] remove CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT (#10915)

This commit removes the `CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT`
configuration option.

The related behavior is now always enabled, meaning a device will
always send a Link Request when the advertisement timeout is reached
and the neighbor age threshold is met for a neighboring router.
This commit is contained in:
Abtin Keshavarzian
2024-11-12 13:20:54 -08:00
committed by GitHub
parent c13fcc62c8
commit 79572ec965
3 changed files with 4 additions and 11 deletions
-9
View File
@@ -204,15 +204,6 @@
#define OPENTHREAD_CONFIG_MLE_ATTACH_BACKOFF_DELAY_TO_RESET_BACKOFF_INTERVAL 20000
#endif
/**
* @def OPENTHREAD_CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT
*
* Define to 1 to send an MLE Link Request when MAX_NEIGHBOR_AGE is reached for a neighboring router.
*/
#ifndef OPENTHREAD_CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT
#define OPENTHREAD_CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT 1
#endif
/**
* @def OPENTHREAD_CONFIG_MLE_LINK_REQUEST_MARGIN_MIN
*
@@ -690,4 +690,8 @@
#error "OPENTHREAD_CONFIG_BORDER_ROUTING_STUB_ROUTER_FLAG_IN_EMITTED_RA_ENABLE is removed"
#endif
#ifdef OPENTHREAD_CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT
#error "OPENTHREAD_CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT is removed, behavior is always applied"
#endif
#endif // OPENTHREAD_CORE_CONFIG_CHECK_H_
-2
View File
@@ -1653,14 +1653,12 @@ void MleRouter::HandleTimeTick(void)
if (router.IsStateValid() && (age >= kMaxNeighborAge))
{
#if OPENTHREAD_CONFIG_MLE_SEND_LINK_REQUEST_ON_ADV_TIMEOUT
if (age < kMaxNeighborAge + kMaxTxCount * kUnicastRetxDelay)
{
LogInfo("No Adv from router 0x%04x - sending Link Request", router.GetRloc16());
IgnoreError(SendLinkRequest(&router));
}
else
#endif
{
LogInfo("Router 0x%04x timeout expired", router.GetRloc16());
RemoveNeighbor(router);