Skip to content

Commit

Permalink
nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface()
Browse files Browse the repository at this point in the history
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 <ordex@autistici.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Antonio Quartulli authored and Johannes Berg committed Nov 7, 2012
1 parent 06e191e commit b84e7a0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b84e7a0

Please sign in to comment.