Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159071
b: refs/heads/master
c: a71d62d
h: refs/heads/master
i:
  159069: 30f7082
  159067: 6fb7526
  159063: 1323e84
  159055: b2805ac
  159039: ed9f709
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 24, 2009
1 parent 8de4b51 commit b27bc0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e0f114e82e3781087a0ad0e92c94ff0d55012c1a
refs/heads/master: a71d62dbf3f0523b7a456333196cb26cf783fe92
13 changes: 8 additions & 5 deletions trunk/net/wireless/wext-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ int cfg80211_wext_giwrate(struct net_device *dev,
struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
/* we are under RTNL - globally locked - so can use a static struct */
static struct station_info sinfo;
u8 *addr;
u8 addr[ETH_ALEN];
int err;

if (wdev->iftype != NL80211_IFTYPE_STATION)
Expand All @@ -1136,12 +1136,15 @@ int cfg80211_wext_giwrate(struct net_device *dev,
if (!rdev->ops->get_station)
return -EOPNOTSUPP;

err = 0;
wdev_lock(wdev);
if (wdev->current_bss)
addr = wdev->current_bss->pub.bssid;
else if (wdev->wext.connect.bssid)
addr = wdev->wext.connect.bssid;
memcpy(addr, wdev->current_bss->pub.bssid, ETH_ALEN);
else
return -EOPNOTSUPP;
err = -EOPNOTSUPP;
wdev_unlock(wdev);
if (err)
return err;

err = rdev->ops->get_station(&rdev->wiphy, dev, addr, &sinfo);
if (err)
Expand Down

0 comments on commit b27bc0f

Please sign in to comment.