diff options
-rw-r--r-- | net/wireless/ibss.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index 9394e78cd11f..8b65e212ae49 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -487,8 +487,11 @@ int cfg80211_ibss_wext_giwap(struct net_device *dev, | |||
487 | wdev_lock(wdev); | 487 | wdev_lock(wdev); |
488 | if (wdev->current_bss) | 488 | if (wdev->current_bss) |
489 | memcpy(ap_addr->sa_data, wdev->current_bss->pub.bssid, ETH_ALEN); | 489 | memcpy(ap_addr->sa_data, wdev->current_bss->pub.bssid, ETH_ALEN); |
490 | else | 490 | else if (wdev->wext.ibss.bssid) |
491 | memcpy(ap_addr->sa_data, wdev->wext.ibss.bssid, ETH_ALEN); | 491 | memcpy(ap_addr->sa_data, wdev->wext.ibss.bssid, ETH_ALEN); |
492 | else | ||
493 | memset(ap_addr->sa_data, 0, ETH_ALEN); | ||
494 | |||
492 | wdev_unlock(wdev); | 495 | wdev_unlock(wdev); |
493 | 496 | ||
494 | return 0; | 497 | return 0; |