Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 6/7] wiphy: print driver flags on startup
Date: Thu, 15 Jun 2023 12:24:14 -0700	[thread overview]
Message-ID: <20230615192415.1718516-6-prestwoj@gmail.com> (raw)
In-Reply-To: <20230615192415.1718516-1-prestwoj@gmail.com>

Similar to other basic information, print the driver flags so the
user is informed what is set.
---
 src/wiphy.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/src/wiphy.c b/src/wiphy.c
index 2c09d47a..ebc91206 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -1333,6 +1333,27 @@ static void wiphy_print_basic_info(struct wiphy *wiphy)
 		l_free(joined);
 		l_strfreev(iftypes);
 	}
+
+	if (wiphy->driver_flags) {
+		char **flags = l_strv_new();
+		char *joined;
+
+		if (wiphy->driver_flags & DEFAULT_IF)
+			flags = l_strv_append(flags, "DefaultInterface");
+
+		if (wiphy->driver_flags & FORCE_PAE)
+			flags = l_strv_append(flags, "ForcePae");
+
+		if (wiphy->driver_flags & POWER_SAVE_DISABLE)
+			flags = l_strv_append(flags, "PowerSaveDisable");
+
+		joined = l_strjoinv(flags, ' ');
+
+		l_info("\tDriver Flags: %s", joined);
+
+		l_free(joined);
+		l_strfreev(flags);
+	}
 }
 
 static void parse_supported_commands(struct wiphy *wiphy,
-- 
2.25.1


  parent reply	other threads:[~2023-06-15 19:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 19:24 [PATCH 1/7] wiphy: store driver flags directly in wiphy object James Prestwood
2023-06-15 19:24 ` [PATCH 2/7] wiphy: allow for user-defined driver flags James Prestwood
2023-06-18 19:03   ` Denis Kenzior
2023-06-15 19:24 ` [PATCH 3/7] doc: document [DriverFlags] group settings James Prestwood
2023-06-15 19:24 ` [PATCH 4/7] wiphy: add [DriverFlags].PowerSaveDisable flag James Prestwood
2023-06-18 19:07   ` Denis Kenzior
2023-06-19 14:49     ` James Prestwood
2023-06-15 19:24 ` [PATCH 5/7] netdev: disable power save if required James Prestwood
2023-06-18 19:11   ` Denis Kenzior
2023-06-19 14:54     ` James Prestwood
2023-06-15 19:24 ` James Prestwood [this message]
2023-06-15 19:24 ` [PATCH 7/7] doc: Document [DriverFlags].PowerSaveDisable James Prestwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230615192415.1718516-6-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox