From patchwork Wed Nov 7 11:52:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1710381 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0F1A23FC8F for ; Wed, 7 Nov 2012 11:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754323Ab2KGLxH (ORCPT ); Wed, 7 Nov 2012 06:53:07 -0500 Received: from contumacia.investici.org ([178.255.144.35]:59990 "EHLO contumacia.investici.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719Ab2KGLxF (ORCPT ); Wed, 7 Nov 2012 06:53:05 -0500 Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id DB9B1E8B99; Wed, 7 Nov 2012 11:53:03 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org DB9B1E8B99 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1352289184; bh=YEVpPhrDGEJBet3vrWwdhR86CAIT0NmNgp86BYVZYOU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=SJS5pdoLt7lCj5ZeM6oz0bxq6uVbKTVtkCB45Fmd5HjmUI70ZG9I1vLyZitFRnZTP sQkjkalksPC/2MkIqLfhcBjSGDPDyEL6D9Wp5tR6uSGP0Wl2+ssaDY/VoMEUlx1+id qjxppgsU50uNLzp56aw98ZDRShEc6BogVQQPwu8Y= From: Antonio Quartulli To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Antonio Quartulli Subject: [PATCH 2/2] nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface() Date: Wed, 7 Nov 2012 12:52:20 +0100 Message-Id: <1352289140-20515-2-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1352289140-20515-1-git-send-email-ordex@autistici.org> References: <1352289140-20515-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 userspace may want to know what is the current ssid that a given interface is using. This patch enables nl80211 to send the NL80211_ATTR_SSID attribute in nl80211_send_iface(). Signed-off-by: Antonio Quartulli --- net/wireless/nl80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e521ca0..c18b2fc 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -1787,6 +1787,11 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag goto nla_put_failure; } + if (wdev->ssid_len) { + if (nla_put(msg, NL80211_ATTR_SSID, wdev->ssid_len, wdev->ssid)) + goto nla_put_failure; + } + return genlmsg_end(msg, hdr); nla_put_failure: