Commit a42dd7ef authored by Zhu Yi's avatar Zhu Yi Committed by John W. Linville

wireless: display wext SSID when connected by cfg80211

cfg80211 displays correct link info when connected by wext. But if
the connection is setup by cfg80211, wext cannot display the SSID.
This patch fixed this issue.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent bedaf808
...@@ -206,7 +206,15 @@ int cfg80211_mgd_wext_giwessid(struct net_device *dev, ...@@ -206,7 +206,15 @@ int cfg80211_mgd_wext_giwessid(struct net_device *dev,
data->flags = 0; data->flags = 0;
wdev_lock(wdev); wdev_lock(wdev);
if (wdev->wext.connect.ssid && wdev->wext.connect.ssid_len) { if (wdev->current_bss) {
const u8 *ie = ieee80211_bss_get_ie(&wdev->current_bss->pub,
WLAN_EID_SSID);
if (ie) {
data->flags = 1;
data->length = ie[1];
memcpy(ssid, ie + 2, data->length);
}
} else if (wdev->wext.connect.ssid && wdev->wext.connect.ssid_len) {
data->flags = 1; data->flags = 1;
data->length = wdev->wext.connect.ssid_len; data->length = wdev->wext.connect.ssid_len;
memcpy(ssid, wdev->wext.connect.ssid, data->length); memcpy(ssid, wdev->wext.connect.ssid, data->length);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment