#include "usteer.h"
#include "node.h"
+#include "event.h"
static struct blob_buf b;
_cfg(U32, load_kick_min_clients), \
_cfg(U32, load_kick_reason_code), \
_cfg(ARRAY_CB, interfaces), \
- _cfg(STRING_CB, node_up_script)
+ _cfg(STRING_CB, node_up_script), \
+ _cfg(ARRAY_CB, event_log_types)
enum cfg_items {
#define _cfg(_type, _name) CFG_##_name
blobmsg_parse(config_policy, __CFG_MAX, tb, blob_data(msg), blob_len(msg));
for (i = 0; i < __CFG_MAX; i++) {
- if (!tb[i])
- continue;
-
switch(config_data[i].type) {
case CFG_BOOL:
+ if (!tb[i])
+ continue;
+
*config_data[i].ptr.BOOL = blobmsg_get_u8(tb[i]);
break;
case CFG_I32:
case CFG_U32:
+ if (!tb[i])
+ continue;
+
*config_data[i].ptr.U32 = blobmsg_get_u32(tb[i]);
break;
case CFG_ARRAY_CB:
static struct ubus_object_type usteer_obj_type =
UBUS_OBJECT_TYPE("usteer", usteer_methods);
-static struct ubus_object usteer_obj = {
+struct ubus_object usteer_obj = {
.name = "usteer",
.type = &usteer_obj_type,
.methods = usteer_methods,
si->scan_band = !si->scan_band;
- MSG_T_STA("load_kick_reason_code", si->sta->addr,
- "tell hostapd to issue a client beacon request (5ghz: %d)\n",
- si->scan_band);
-
blob_buf_init(&b, 0);
blobmsg_printf(&b, "addr", MAC_ADDR_FMT, MAC_ADDR_DATA(si->sta->addr));
blobmsg_add_u32(&b, "mode", 1);
{
struct usteer_local_node *ln = container_of(si->node, struct usteer_local_node, node);
- MSG_T_STA("load_kick_reason_code", si->sta->addr,
- "tell hostapd to kick client with reason code %u\n",
- config.load_kick_reason_code);
-
blob_buf_init(&b, 0);
blobmsg_printf(&b, "addr", MAC_ADDR_FMT, MAC_ADDR_DATA(si->sta->addr));
blobmsg_add_u32(&b, "reason", config.load_kick_reason_code);