#include "gateway_client.h"
#include "gateway_common.h"
#include "hard-interface.h"
+#include "log.h"
#include "multicast.h"
#include "originator.h"
#include "soft-interface.h"
[BATADV_ATTR_GW_MODE] = { .type = NLA_U8 },
[BATADV_ATTR_GW_SEL_CLASS] = { .type = NLA_U32 },
[BATADV_ATTR_HOP_PENALTY] = { .type = NLA_U8 },
+ [BATADV_ATTR_LOG_LEVEL] = { .type = NLA_U32 },
};
/**
atomic_read(&bat_priv->hop_penalty)))
goto nla_put_failure;
+#ifdef CONFIG_BATMAN_ADV_DEBUG
+ if (nla_put_u32(msg, BATADV_ATTR_LOG_LEVEL,
+ atomic_read(&bat_priv->log_level)))
+ goto nla_put_failure;
+#endif /* CONFIG_BATMAN_ADV_DEBUG */
+
if (primary_if)
batadv_hardif_put(primary_if);
atomic_set(&bat_priv->hop_penalty, nla_get_u8(attr));
}
+#ifdef CONFIG_BATMAN_ADV_DEBUG
+ if (info->attrs[BATADV_ATTR_LOG_LEVEL]) {
+ attr = info->attrs[BATADV_ATTR_LOG_LEVEL];
+
+ atomic_set(&bat_priv->log_level,
+ nla_get_u32(attr) & BATADV_DBG_ALL);
+ }
+#endif /* CONFIG_BATMAN_ADV_DEBUG */
+
batadv_netlink_notify_mesh(bat_priv);
return 0;