aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/wireless/ibss.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index 9394e78cd11..8b65e212ae4 100644
--- a/net/wireless/ibss.c
+++ b/net/wireless/ibss.c
@@ -487,8 +487,11 @@ int cfg80211_ibss_wext_giwap(struct net_device *dev,
wdev_lock(wdev);
if (wdev->current_bss)
memcpy(ap_addr->sa_data, wdev->current_bss->pub.bssid, ETH_ALEN);
- else
+ else if (wdev->wext.ibss.bssid)
memcpy(ap_addr->sa_data, wdev->wext.ibss.bssid, ETH_ALEN);
+ else
+ memset(ap_addr->sa_data, 0, ETH_ALEN);
+
wdev_unlock(wdev);
return 0;