From 7fce2c8e659e49b92cce58ea495ab2f64cc55a88 Mon Sep 17 00:00:00 2001 From: Anjan Chanda <anjan.chanda@genexis.eu> Date: Wed, 4 Jun 2025 11:33:26 +0200 Subject: [PATCH] query STA capabilities --- src/cntlr_map.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/cntlr_map.c b/src/cntlr_map.c index ee672b03..4a537ddb 100644 --- a/src/cntlr_map.c +++ b/src/cntlr_map.c @@ -235,6 +235,8 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, struct node *old_n = NULL; if (!s) { + struct cmdu_buff *txcmdu; + s = cntlr_add_sta(c, c->sta_table, ev->macaddr); if (!s) { cntlr_dbg(LOG_STA, "%s: failed to add STA " MACFMT "\n", @@ -247,6 +249,12 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, memcpy(s->bssid, ev->bssid, 6); node_add_sta(n, s); + txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid); + if (txcmdu) { + send_cmdu(c, txcmdu); + cmdu_free(txcmdu); + } + goto inform_steer_plugins; } @@ -261,10 +269,18 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, } if (!node_find_sta(n, ev->macaddr)) { + struct cmdu_buff *txcmdu; + time(&s->assoc_time); s->state = STA_ASSOCIATED; memcpy(s->bssid, ev->bssid, 6); node_add_sta(n, s); + + txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid); + if (txcmdu) { + send_cmdu(c, txcmdu); + cmdu_free(txcmdu); + } } } else { if (!s) { @@ -618,8 +634,18 @@ int handle_topology_response(void *cntlr, struct cmdu_buff *cmdu, struct node *n s->de_sta->conn_time = conntime; s->state = conntime != 0 ? STA_ASSOCIATED : STA_DISCONNECTED; if (old_state != STA_ASSOCIATED && s->state == STA_ASSOCIATED) { + struct cmdu_buff *txcmdu; + node_add_sta(n, s); time(&s->assoc_time); + txcmdu = cntlr_gen_client_caps_query(c, + c->almacaddr, + s->macaddr, + s->bssid); + if (txcmdu) { + send_cmdu(c, txcmdu); + cmdu_free(txcmdu); + } } else if (old_state != STA_DISCONNECTED && s->state == STA_DISCONNECTED) { node_del_sta(n, s); time(&s->disassoc_time); -- GitLab