All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iw: phy: dump wiphy index
@ 2020-03-12  1:05 Brian Norris
  0 siblings, 0 replies; only message in thread
From: Brian Norris @ 2020-03-12  1:05 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, yenlinlai, Brian Norris

We support getting wiphy info by index (e.g., 'iw phy#0 info') but we
don't actually dump that info anywhere. Let's fix that.

Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 info.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/info.c b/info.c
index 04f4bd7414d6..97240f68371d 100644
--- a/info.c
+++ b/info.c
@@ -133,6 +133,9 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
 	if (print_name && tb_msg[NL80211_ATTR_WIPHY_NAME])
 		printf("Wiphy %s\n", nla_get_string(tb_msg[NL80211_ATTR_WIPHY_NAME]));
 
+	if (print_name && tb_msg[NL80211_ATTR_WIPHY])
+		printf("\twiphy index: %u\n", nla_get_u32(tb_msg[NL80211_ATTR_WIPHY]));
+
 	/* needed for split dump */
 	if (tb_msg[NL80211_ATTR_WIPHY_BANDS]) {
 		nla_for_each_nested(nl_band, tb_msg[NL80211_ATTR_WIPHY_BANDS], rem_band) {
-- 
2.25.1.481.gfbce0eb801-goog


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-12  1:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12  1:05 [PATCH] iw: phy: dump wiphy index Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.