From ca695700c648c31c48df311a3665a9b542369527 Mon Sep 17 00:00:00 2001 From: Anjan Chanda <anjan.chanda@genexis.eu> Date: Thu, 5 Jun 2025 10:20:26 +0200 Subject: [PATCH] cntlr-apis: add cntlr_get_max_thput_estimate_for_node() --- src/cntlr_apis.c | 12 ++++++++++++ src/cntlr_apis.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/cntlr_apis.c b/src/cntlr_apis.c index e7213678..1279c586 100644 --- a/src/cntlr_apis.c +++ b/src/cntlr_apis.c @@ -81,3 +81,15 @@ uint32_t cntlr_estimate_max_thput_for_node(void *cntlr, uint8_t *node_almacaddr) return cntlr_estimate_max_throughput_for_node(c, node_almacaddr); } + +uint32_t cntlr_get_max_thput_estimate_for_node(void *cntlr, uint8_t *node_almacaddr) +{ + struct controller *c = (struct controller *)cntlr; + struct node *n; + + n = cntlr_find_node(c, node_almacaddr); + if (!n) + return 0; + + return n->est_thput_dl; +} diff --git a/src/cntlr_apis.h b/src/cntlr_apis.h index a285efa0..e8b721f9 100644 --- a/src/cntlr_apis.h +++ b/src/cntlr_apis.h @@ -25,5 +25,6 @@ struct wifi_sta_element *cntlr_get_sta_element(void *cntlr, uint8_t *macaddr); /* Estimate max-throughput achievable for an EasyMesh device */ uint32_t cntlr_estimate_max_thput_for_node(void *cntlr, uint8_t *node_almacaddr); +uint32_t cntlr_get_max_thput_estimate_for_node(void *cntlr, uint8_t *node_almacaddr); #endif /* CNTLR_APIS_H */ -- GitLab