diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-01 15:26:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:49 -0400 |
commit | 7ebbe6bd51a259e16608b3fd7b578f5dd1292a45 (patch) | |
tree | 1c00bb480bf90c9516c983ee373e7825f49b42f6 | |
parent | e6d6e3420d511cd7552a95d1f04bd4c80a9ddb34 (diff) |
cfg80211: remove wireless_dev->bssid
This variable isn't necessary -- the wext code keeps
track of the BSSID itself, and otherwise we have
current_bss.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | include/net/cfg80211.h | 1 | ||||
-rw-r--r-- | net/wireless/ibss.c | 13 |
2 files changed, 3 insertions, 11 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 1696ff647a08..10eb53e2bc9f 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1170,7 +1170,6 @@ struct wireless_dev { | |||
1170 | 1170 | ||
1171 | /* currently used for IBSS - might be rearranged in the future */ | 1171 | /* currently used for IBSS - might be rearranged in the future */ |
1172 | struct cfg80211_bss *current_bss; | 1172 | struct cfg80211_bss *current_bss; |
1173 | u8 bssid[ETH_ALEN]; | ||
1174 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 1173 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
1175 | u8 ssid_len; | 1174 | u8 ssid_len; |
1176 | 1175 | ||
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index a4a1c3498ff2..34b11eae30c8 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -24,9 +24,6 @@ void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp) | |||
24 | if (WARN_ON(!wdev->ssid_len)) | 24 | if (WARN_ON(!wdev->ssid_len)) |
25 | return; | 25 | return; |
26 | 26 | ||
27 | if (memcmp(bssid, wdev->bssid, ETH_ALEN) == 0) | ||
28 | return; | ||
29 | |||
30 | bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid, | 27 | bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid, |
31 | wdev->ssid, wdev->ssid_len, | 28 | wdev->ssid, wdev->ssid_len, |
32 | WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS); | 29 | WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS); |
@@ -41,7 +38,6 @@ void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp) | |||
41 | 38 | ||
42 | cfg80211_hold_bss(bss); | 39 | cfg80211_hold_bss(bss); |
43 | wdev->current_bss = bss; | 40 | wdev->current_bss = bss; |
44 | memcpy(wdev->bssid, bssid, ETH_ALEN); | ||
45 | 41 | ||
46 | nl80211_send_ibss_bssid(wiphy_to_dev(wdev->wiphy), dev, bssid, gfp); | 42 | nl80211_send_ibss_bssid(wiphy_to_dev(wdev->wiphy), dev, bssid, gfp); |
47 | #ifdef CONFIG_WIRELESS_EXT | 43 | #ifdef CONFIG_WIRELESS_EXT |
@@ -87,7 +83,6 @@ void cfg80211_clear_ibss(struct net_device *dev, bool nowext) | |||
87 | 83 | ||
88 | wdev->current_bss = NULL; | 84 | wdev->current_bss = NULL; |
89 | wdev->ssid_len = 0; | 85 | wdev->ssid_len = 0; |
90 | memset(wdev->bssid, 0, ETH_ALEN); | ||
91 | #ifdef CONFIG_WIRELESS_EXT | 86 | #ifdef CONFIG_WIRELESS_EXT |
92 | if (!nowext) | 87 | if (!nowext) |
93 | wdev->wext.ibss.ssid_len = 0; | 88 | wdev->wext.ibss.ssid_len = 0; |
@@ -356,12 +351,10 @@ int cfg80211_ibss_wext_giwap(struct net_device *dev, | |||
356 | 351 | ||
357 | ap_addr->sa_family = ARPHRD_ETHER; | 352 | ap_addr->sa_family = ARPHRD_ETHER; |
358 | 353 | ||
359 | if (wdev->wext.ibss.bssid) { | 354 | if (wdev->current_bss) |
355 | memcpy(ap_addr->sa_data, wdev->current_bss->bssid, ETH_ALEN); | ||
356 | else | ||
360 | memcpy(ap_addr->sa_data, wdev->wext.ibss.bssid, ETH_ALEN); | 357 | memcpy(ap_addr->sa_data, wdev->wext.ibss.bssid, ETH_ALEN); |
361 | return 0; | ||
362 | } | ||
363 | |||
364 | memcpy(ap_addr->sa_data, wdev->bssid, ETH_ALEN); | ||
365 | return 0; | 358 | return 0; |
366 | } | 359 | } |
367 | /* temporary symbol - mark GPL - in the future the handler won't be */ | 360 | /* temporary symbol - mark GPL - in the future the handler won't be */ |