summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/wireless/wext-compat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index d39688ca7fe..2c33cd83cfe 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -1136,8 +1136,11 @@ int cfg80211_wext_giwrate(struct net_device *dev,
if (!rdev->ops->get_station)
return -EOPNOTSUPP;
- addr = wdev->wext.connect.bssid;
- if (!addr)
+ if (wdev->current_bss)
+ addr = wdev->current_bss->pub.bssid;
+ else if (wdev->wext.connect.bssid)
+ addr = wdev->wext.connect.bssid;
+ else
return -EOPNOTSUPP;
err = rdev->ops->get_station(&rdev->wiphy, dev, addr, &sinfo);