free(ln);
}
+struct usteer_local_node *usteer_local_node_by_bssid(uint8_t *bssid) {
+ struct usteer_local_node *ln;
+ struct usteer_node *n;
+
+ for_each_local_node(n) {
+ ln = container_of(n, struct usteer_local_node, node);
+ if (!memcmp(n->bssid, bssid, 6))
+ return ln;
+ }
+
+ return NULL;
+}
+
static void
usteer_handle_remove(struct ubus_context *ctx, struct ubus_subscriber *s,
uint32_t id)
#include "node.h"
#include "usteer.h"
+struct usteer_remote_node *usteer_remote_node_by_bssid(uint8_t *bssid) {
+ struct usteer_remote_node *rn;
+
+ for_each_remote_node(rn) {
+ if (!memcmp(rn->node.bssid, bssid, 6))
+ return rn;
+ }
+
+ return NULL;
+}
+
+struct usteer_node *usteer_node_by_bssid(uint8_t *bssid) {
+ struct usteer_remote_node *rn;
+ struct usteer_local_node *ln;
+
+ rn = usteer_remote_node_by_bssid(bssid);
+ if (rn)
+ return &rn->node;
+
+ ln = usteer_local_node_by_bssid(bssid);
+ if (ln)
+ return &ln->node;
+
+ return NULL;
+}
+
void usteer_node_set_blob(struct blob_attr **dest, struct blob_attr *val)
{
int new_len;
}
void usteer_node_set_blob(struct blob_attr **dest, struct blob_attr *val);
+struct usteer_local_node *usteer_local_node_by_bssid(uint8_t *bssid);
+struct usteer_remote_node *usteer_remote_node_by_bssid(uint8_t *bssid);
+struct usteer_node *usteer_node_by_bssid(uint8_t *bssid);
+
struct usteer_node *usteer_node_get_next_neighbor(struct usteer_node *current_node, struct usteer_node *last);
bool usteer_check_request(struct sta_info *si, enum usteer_event_type type);