diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-01 01:04:14 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-04 18:57:43 +0100 |
commit | 2ca813ad61136896c91a40194452ff665a522711 (patch) | |
tree | e1eb791203ddc573a8ac34a9fd0a836dcbc20132 /net/wireless/scan.c | |
parent | 50521aa8817e3f6a77eb7aaabdbbb7b5c2fe0ea3 (diff) |
cfg80211: move locking into cfg80211_bss_age
There's no reason for it to require external
locking, move it into the function.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r-- | net/wireless/scan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 34b47b30be8..1494d947e8d 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -231,15 +231,16 @@ int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev, return 0; } -/* must hold dev->bss_lock! */ void cfg80211_bss_age(struct cfg80211_registered_device *dev, unsigned long age_secs) { struct cfg80211_internal_bss *bss; unsigned long age_jiffies = msecs_to_jiffies(age_secs * MSEC_PER_SEC); + spin_lock_bh(&dev->bss_lock); list_for_each_entry(bss, &dev->bss_list, list) bss->ts -= age_jiffies; + spin_unlock_bh(&dev->bss_lock); } void cfg80211_bss_expire(struct cfg80211_registered_device *dev) |