summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorJustin Waters <justin.waters@timesys.com>2010-12-13 16:07:39 -0500
committerJustin Waters <justin.waters@timesys.com>2010-12-13 16:07:39 -0500
commitf1a2e7b6191168ee30964dbdc7810d07b9ee2add (patch)
tree4cc03c452f6357a4a694165d28cdd5b44d9aefb2 /net/wireless
parent9fe6206f400646a2322096b56c59891d530e8d51 (diff)
Linux 2.6.35.3 Patch
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/mlme.c8
-rw-r--r--net/wireless/scan.c5
2 files changed, 9 insertions, 4 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 48ead6f0426d..ef17fcf85092 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -44,10 +44,10 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len)
}
}
- WARN_ON(!done);
-
- nl80211_send_rx_auth(rdev, dev, buf, len, GFP_KERNEL);
- cfg80211_sme_rx_auth(dev, buf, len);
+ if (done) {
+ nl80211_send_rx_auth(rdev, dev, buf, len, GFP_KERNEL);
+ cfg80211_sme_rx_auth(dev, buf, len);
+ }
wdev_unlock(wdev);
}
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 58401d246bda..5ca8c7180141 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -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);
@@ -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);