From: Antonio Quartulli Date: Wed, 7 Nov 2012 11:52:20 +0000 (+0100) Subject: nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b84e7a05f619faec58bff24dfeeb2406f8dab584;p=linux-beck.git nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface() 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 Signed-off-by: Johannes Berg --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e521ca09d6a4..c18b2fc9d492 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: