commit f557c7e6cdf8267926d591f2116cf8d07cf550b2
parent 7f0b169e71593173fa4524491ad5e31b98b3848e
Author: Denis Kenzior <denkenz@gmail.com>
Date: Mon, 15 Jul 2019 14:04:43 -0500
treewide: Use nl80211cmd_to_string
Using integer ids for event notifications received was hard to debug.
Use the nl80211cmd_to_string function to prettify these.
Diffstat:
4 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/anqp.c b/src/anqp.c
@@ -33,6 +33,7 @@
#include "src/eap-private.h"
#include "src/ie.h"
#include "src/nl80211util.h"
+#include "src/nl80211cmd.h"
#include "src/scan.h"
#include "src/netdev.h"
#include "src/iwd.h"
@@ -644,7 +645,7 @@ static void anqp_mlme_notify(struct l_genl_msg *msg, void *user_data)
cmd = l_genl_msg_get_command(msg);
- l_debug("MLME notification %u", cmd);
+ l_debug("MLME notification %s(%u)", nl80211cmd_to_string(cmd), cmd);
if (!l_genl_attr_init(&attr, msg))
return;
diff --git a/src/manager.c b/src/manager.c
@@ -39,6 +39,7 @@
#include "src/wiphy.h"
#include "src/util.h"
#include "src/common.h"
+#include "src/nl80211cmd.h"
static struct l_genl_family *nl80211 = NULL;
static char **whitelist_filter;
@@ -601,7 +602,8 @@ static void manager_config_notify(struct l_genl_msg *msg, void *user_data)
cmd = l_genl_msg_get_command(msg);
- l_debug("Notification of command %u", cmd);
+ l_debug("Notification of command %s(%u)",
+ nl80211cmd_to_string(cmd), cmd);
switch (cmd) {
case NL80211_CMD_NEW_WIPHY:
diff --git a/src/netdev.c b/src/netdev.c
@@ -57,6 +57,7 @@
#include "src/watchlist.h"
#include "src/sae.h"
#include "src/nl80211util.h"
+#include "src/nl80211cmd.h"
#include "src/owe.h"
#include "src/fils.h"
#include "src/auth-proto.h"
@@ -3332,7 +3333,7 @@ static void netdev_mlme_notify(struct l_genl_msg *msg, void *user_data)
cmd = l_genl_msg_get_command(msg);
- l_debug("MLME notification %u", cmd);
+ l_debug("MLME notification %s(%u)", nl80211cmd_to_string(cmd), cmd);
if (!l_genl_attr_init(&attr, msg))
return;
diff --git a/src/scan.c b/src/scan.c
@@ -42,6 +42,7 @@
#include "src/common.h"
#include "src/network.h"
#include "src/knownnetworks.h"
+#include "src/nl80211cmd.h"
#include "src/util.h"
#include "src/scan.h"
@@ -1326,7 +1327,7 @@ static void scan_notify(struct l_genl_msg *msg, void *user_data)
cmd = l_genl_msg_get_command(msg);
- l_debug("Scan notification %u", cmd);
+ l_debug("Scan notification %s(%u)", nl80211cmd_to_string(cmd), cmd);
if (!l_genl_attr_init(&attr, msg))
return;