From: Jouni Malinen Date: Sun, 14 Jan 2024 15:18:57 +0000 (+0200) Subject: nl80211: Print kernel version in debug output X-Git-Tag: hostap_2_11~490 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=197b440c49ed66f225a920445b8b8f3f316381d9;p=thirdparty%2Fhostap.git nl80211: Print kernel version in debug output This can be helpful in debugging some kernel specific issues. Signed-off-by: Jouni Malinen --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 4167b707b..a3147bc7c 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -12,6 +12,7 @@ #include "includes.h" #include +#include #include #include #include @@ -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)