]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: print the ssid when requesting device info
authorAntonio Quartulli <ordex@autistici.org>
Fri, 9 Nov 2012 18:46:53 +0000 (19:46 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 9 Nov 2012 19:19:55 +0000 (20:19 +0100)
The GET_INTERFACE command receives also the ssid as part of the reply.
This patch makes iw print the ssid together with the other information
when issuing the "iw dev $vif info" command.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
interface.c

index 810c2b96d25e56c6ce0c09602d33880b5c3f51b0..28626dc49a6abe5c498572cf07099bc418ad2afa 100644 (file)
@@ -294,6 +294,12 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
                mac_addr_n2a(mac_addr, nla_data(tb_msg[NL80211_ATTR_MAC]));
                printf("%s\taddr %s\n", indent, mac_addr);
        }
+       if (tb_msg[NL80211_ATTR_SSID]) {
+               printf("%s\tssid ", indent);
+               print_ssid_escaped(nla_len(tb_msg[NL80211_ATTR_SSID]),
+                                  nla_data(tb_msg[NL80211_ATTR_SSID]));
+               printf("\n");
+       }
        if (tb_msg[NL80211_ATTR_IFTYPE])
                printf("%s\ttype %s\n", indent, iftype_name(nla_get_u32(tb_msg[NL80211_ATTR_IFTYPE])));
        if (!wiphy && tb_msg[NL80211_ATTR_WIPHY])