public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cfg80211: wext: don't display BSSID unless associated
@ 2009-09-17 15:35 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2009-09-17 15:35 UTC (permalink / raw)
  To: John Linville; +Cc: Thomas H. Guenther, linux-wireless

Currently, cfg80211's SIOCGIWAP implementation returns
the BSSID that the user set, even if the connection has
since been dropped due to other changes. It only should
return the current BSSID when actually connected.

Also do a small code cleanup.

Reported-by: Thomas H. Guenther <thomas.h.guenther@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Thomas H. Guenther <thomas.h.guenther@intel.com>
---
 net/wireless/wext-sme.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- wireless-testing.orig/net/wireless/wext-sme.c	2009-09-15 21:20:09.000000000 -0700
+++ wireless-testing/net/wireless/wext-sme.c	2009-09-15 21:20:50.000000000 -0700
@@ -229,8 +229,7 @@ int cfg80211_mgd_wext_giwessid(struct ne
 		data->flags = 1;
 		data->length = wdev->wext.connect.ssid_len;
 		memcpy(ssid, wdev->wext.connect.ssid, data->length);
-	} else
-		data->flags = 0;
+	}
 	wdev_unlock(wdev);
 
 	return 0;
@@ -306,8 +305,6 @@ int cfg80211_mgd_wext_giwap(struct net_d
 	wdev_lock(wdev);
 	if (wdev->current_bss)
 		memcpy(ap_addr->sa_data, wdev->current_bss->pub.bssid, ETH_ALEN);
-	else if (wdev->wext.connect.bssid)
-		memcpy(ap_addr->sa_data, wdev->wext.connect.bssid, ETH_ALEN);
 	else
 		memset(ap_addr->sa_data, 0, ETH_ALEN);
 	wdev_unlock(wdev);



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-17 15:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-17 15:35 [PATCH] cfg80211: wext: don't display BSSID unless associated Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox