Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203703
b: refs/heads/master
c: ccb6c13
h: refs/heads/master
i:
  203701: d79ba8a
  203699: a6b49fb
  203695: 15e4166
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 14, 2010
1 parent 47f6895 commit b0fa427
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31e79a5954b78fbed15de2c8974d5a2b6019199a
refs/heads/master: ccb6c1360f8dd43303c659db718e7e0b24175db5
5 changes: 5 additions & 0 deletions trunk/net/wireless/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
{
struct cfg80211_registered_device *dev = wiphy_to_dev(wiphy);
struct cfg80211_internal_bss *bss, *res = NULL;
unsigned long now = jiffies;

spin_lock_bh(&dev->bss_lock);

Expand All @@ -283,6 +284,10 @@ struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
continue;
if (channel && bss->pub.channel != channel)
continue;
/* Don't get expired BSS structs */
if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) &&
!atomic_read(&bss->hold))
continue;
if (is_bss(&bss->pub, bssid, ssid, ssid_len)) {
res = bss;
kref_get(&res->ref);
Expand Down

0 comments on commit b0fa427

Please sign in to comment.