aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2009-08-05 03:07:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:12:41 -0400
commita42dd7efd934888833c01199dbd21b242100ee92 (patch)
treee16e5a19a0b0ad38261794a16f21b13c7ea1ad7a
parentbedaf80866f5d438b47d05e02fb1852065fe5d8e (diff)
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: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/wireless/wext-sme.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
index 7bacbd1c2af6..e4a054aceb5a 100644
--- a/net/wireless/wext-sme.c
+++ b/net/wireless/wext-sme.c
@@ -206,7 +206,15 @@ int cfg80211_mgd_wext_giwessid(struct net_device *dev,
206 data->flags = 0; 206 data->flags = 0;
207 207
208 wdev_lock(wdev); 208 wdev_lock(wdev);
209 if (wdev->wext.connect.ssid && wdev->wext.connect.ssid_len) { 209 if (wdev->current_bss) {
210 const u8 *ie = ieee80211_bss_get_ie(&wdev->current_bss->pub,
211 WLAN_EID_SSID);
212 if (ie) {
213 data->flags = 1;
214 data->length = ie[1];
215 memcpy(ssid, ie + 2, data->length);
216 }
217 } else if (wdev->wext.connect.ssid && wdev->wext.connect.ssid_len) {
210 data->flags = 1; 218 data->flags = 1;
211 data->length = wdev->wext.connect.ssid_len; 219 data->length = wdev->wext.connect.ssid_len;
212 memcpy(ssid, wdev->wext.connect.ssid, data->length); 220 memcpy(ssid, wdev->wext.connect.ssid, data->length);