Skip to content
Snippets Groups Projects
Commit 7fce2c8e authored by Anjan Chanda's avatar Anjan Chanda
Browse files

query STA capabilities

parent 47ed9657
Branches
No related tags found
No related merge requests found
Pipeline #210136 passed
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment