if (WARN_ON(!wdev->ssid_len))
return;
- if (memcmp(bssid, wdev->bssid, ETH_ALEN) == 0)
- return;
-
bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid,
wdev->ssid, wdev->ssid_len,
WLAN_CAPABILITY_IBSS, WLAN_CAPABILITY_IBSS);
cfg80211_hold_bss(bss);
wdev->current_bss = bss;
- memcpy(wdev->bssid, bssid, ETH_ALEN);
nl80211_send_ibss_bssid(wiphy_to_dev(wdev->wiphy), dev, bssid, gfp);
#ifdef CONFIG_WIRELESS_EXT
wdev->current_bss = NULL;
wdev->ssid_len = 0;
- memset(wdev->bssid, 0, ETH_ALEN);
#ifdef CONFIG_WIRELESS_EXT
if (!nowext)
wdev->wext.ibss.ssid_len = 0;
ap_addr->sa_family = ARPHRD_ETHER;
- if (wdev->wext.ibss.bssid) {
+ if (wdev->current_bss)
+ memcpy(ap_addr->sa_data, wdev->current_bss->bssid, ETH_ALEN);
+ else
memcpy(ap_addr->sa_data, wdev->wext.ibss.bssid, ETH_ALEN);
- return 0;
- }
-
- memcpy(ap_addr->sa_data, wdev->bssid, ETH_ALEN);
return 0;
}
/* temporary symbol - mark GPL - in the future the handler won't be */