Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159087
b: refs/heads/master
c: c56c571
h: refs/heads/master
i:
  159085: d849fa8
  159083: 5b114c0
  159079: 3aa619c
  159071: b27bc0f
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 24, 2009
1 parent 384cb26 commit 5c9bb16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: ca3dbc20d47ae43c201c215259d078e227bfcf01
refs/heads/master: c56c5714f12808e3f702817e72a78dd12f1704eb
13 changes: 9 additions & 4 deletions trunk/net/wireless/wext-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,19 +1209,24 @@ struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
/* we are under RTNL - globally locked - so can use static structs */
static struct iw_statistics wstats;
static struct station_info sinfo;
u8 *addr;
u8 bssid[ETH_ALEN];

if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION)
return NULL;

if (!rdev->ops->get_station)
return NULL;

addr = wdev->wext.connect.bssid;
if (!addr)
/* Grab BSSID of current BSS, if any */
wdev_lock(wdev);
if (!wdev->current_bss) {
wdev_unlock(wdev);
return NULL;
}
memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN);
wdev_unlock(wdev);

if (rdev->ops->get_station(&rdev->wiphy, dev, addr, &sinfo))
if (rdev->ops->get_station(&rdev->wiphy, dev, bssid, &sinfo))
return NULL;

memset(&wstats, 0, sizeof(wstats));
Expand Down

0 comments on commit 5c9bb16

Please sign in to comment.