]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Print kernel version in debug output
authorJouni Malinen <j@w1.fi>
Sun, 14 Jan 2024 15:18:57 +0000 (17:18 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Jan 2024 15:18:57 +0000 (17:18 +0200)
This can be helpful in debugging some kernel specific issues.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c

index 4167b707ba7a3bc9beada05c71d28c9ff0c821dd..a3147bc7c4d2e66431adcb0fc2eb81dd6c7702c1 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "includes.h"
 #include <sys/types.h>
+#include <sys/utsname.h>
 #include <fcntl.h>
 #include <net/if.h>
 #include <netlink/genl/genl.h>
@@ -9888,6 +9889,13 @@ static void * nl80211_global_init(void *ctx)
 {
        struct nl80211_global *global;
        struct netlink_config *cfg;
+       struct utsname name;
+
+       if (uname(&name) == 0) {
+               wpa_printf(MSG_DEBUG, "nl80211: Kernel version: %s %s (%s; %s)",
+                          name.sysname, name.release,
+                          name.version, name.machine);
+       }
 
        global = os_zalloc(sizeof(*global));
        if (global == NULL)