From patchwork Fri Nov 9 18:46:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1721621 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4516BDF264 for ; Fri, 9 Nov 2012 18:47:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755265Ab2KISrn (ORCPT ); Fri, 9 Nov 2012 13:47:43 -0500 Received: from latitanza.investici.org ([82.94.249.234]:37257 "EHLO latitanza.investici.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754622Ab2KISrn (ORCPT ); Fri, 9 Nov 2012 13:47:43 -0500 Received: from [82.94.249.234] (latitanza [82.94.249.234]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 266009818E; Fri, 9 Nov 2012 18:47:40 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 latitanza.investici.org 266009818E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1352486860; bh=0M4cWJNXVzjuEdG7tZ/eu9KRZXTZNq4TKBY54jvpAGw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=MnTWcNewRQoZJs63VIso6n8NAk4zrnsARcrCuyEG6mKPuJ1t9PeCGOwc3FjczboMt grz9FZMw3FCvkK2ZU9C2gcSFjSwZHarOQO3+UbDWXoFg8rOm1VNw9uY2nbIICYowXV QeobMpldAi6rAes39QQBkg+iYbEOaTMqBRf56HZQ= From: Antonio Quartulli To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Antonio Quartulli Subject: [PATCHv2] iw: print the ssid when requesting device info Date: Fri, 9 Nov 2012 19:46:53 +0100 Message-Id: <1352486813-26168-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1352468278-30931-1-git-send-email-ordex@autistici.org> References: <1352468278-30931-1-git-send-email-ordex@autistici.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- v2: - use print_ssid_escaped() interface.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface.c b/interface.c index 810c2b9..28626dc 100644 --- a/interface.c +++ b/interface.c @@ -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])