Skip to contentSkip to conversation

cfg80211: wext: don't display BSSID unless associated

PATCH New Johannes Berg 1 participant 1 message Sep 17, 2009 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 cfg80211: wext: don't display BSSID unless associated

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.

---
 net/wireless/wext-sme.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/wireless/wext-sme.c +1 -4
@@ -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);