Skip to main content
Sign in
Snippets Groups Projects
Commit db314c0f authored by Anjan Chanda's avatar Anjan Chanda
Browse files

wifi_dataelements.h: store bssid and ruid for quick lookup

parent 6ff3bb4b
Branches
No related tags found
No related merge requests found
Pipeline #220861 failed
...@@ -246,6 +246,7 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, ...@@ -246,6 +246,7 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu,
node_del_sta(old_n, s); node_del_sta(old_n, s);
} }
memcpy(s->de_sta->bssid, ev->bssid, 6);
node_add_sta(n, s); node_add_sta(n, s);
txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid); txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid);
...@@ -278,6 +279,7 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu, ...@@ -278,6 +279,7 @@ int handle_topology_notification(void *cntlr, struct cmdu_buff *cmdu,
memcpy(s->bssid, ev->bssid, 6); memcpy(s->bssid, ev->bssid, 6);
s->state = STA_CONNECTED; s->state = STA_CONNECTED;
memcpy(s->de_sta->bssid, ev->bssid, 6);
node_add_sta(n, s); node_add_sta(n, s);
txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid); txcmdu = cntlr_gen_client_caps_query(c, c->almacaddr, s->macaddr, s->bssid);
...@@ -631,6 +633,7 @@ int handle_topology_response(void *cntlr, struct cmdu_buff *cmdu, struct node *n ...@@ -631,6 +633,7 @@ int handle_topology_response(void *cntlr, struct cmdu_buff *cmdu, struct node *n
s->de_sta->conn_time = conntime; s->de_sta->conn_time = conntime;
s->assoc_time = time(NULL) - conntime; s->assoc_time = time(NULL) - conntime;
memcpy(s->de_sta->bssid, bssid, 6);
node_add_sta(n, s); node_add_sta(n, s);
cntlr_dbg(LOG_STA, "%s: STA " MACFMT " connected to Node " MACFMT "\n", cntlr_dbg(LOG_STA, "%s: STA " MACFMT " connected to Node " MACFMT "\n",
__func__, MAC2STR(s->macaddr), MAC2STR(n->almacaddr)); __func__, MAC2STR(s->macaddr), MAC2STR(n->almacaddr));
... ...
......
...@@ -292,6 +292,7 @@ struct wifi_sta_element { ...@@ -292,6 +292,7 @@ struct wifi_sta_element {
time_t tsp; /* when the last STA-Link metrics response received */ time_t tsp; /* when the last STA-Link metrics response received */
uint32_t time_delta; /* tsp - time_delta (in ms) = when STA's metrics actually collected */ uint32_t time_delta; /* tsp - time_delta (in ms) = when STA's metrics actually collected */
uint8_t macaddr[6]; uint8_t macaddr[6];
uint8_t bssid[6];
struct wifi_caps_element caps; struct wifi_caps_element caps;
struct wifi_wifi6_capabilities wifi6caps; struct wifi_wifi6_capabilities wifi6caps;
uint32_t dl_rate; /* latest data rate in Kbps: ap -> sta */ uint32_t dl_rate; /* latest data rate in Kbps: ap -> sta */
...@@ -360,6 +361,7 @@ struct wifi_bss_element { ...@@ -360,6 +361,7 @@ struct wifi_bss_element {
int invalidate; int invalidate;
time_t tsp; time_t tsp;
uint8_t bssid[6]; uint8_t bssid[6];
uint8_t ruid[6];
uint8_t ssidlen; uint8_t ssidlen;
char ssid[33]; char ssid[33];
bool enabled; bool enabled;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment