Re: [PATCH v2 3/5] cfg80211: add support for flushing old scan results
From: Johannes Berg <johannes@sipsolutions.net>
Date: 2012-09-28 11:03:31
From: Johannes Berg <johannes@sipsolutions.net>
Date: 2012-09-28 11:03:31
On Thu, 2012-09-27 at 11:59 -0700, Bing Zhao wrote:
+static void __cfg80211_bss_expire(struct cfg80211_registered_device *dev, + int maxage, unsigned long expire_time);
Please no static forward declarations, unless you really can't move the code (say because it's recursive). You can move the code up instead.
/* must hold dev->bss_lock! */ -void cfg80211_bss_expire(struct cfg80211_registered_device *dev) +static void __cfg80211_bss_expire(struct cfg80211_registered_device *dev, + int maxage, unsigned long expire_time)
I don't really see why you need maxage and expire_time?
+void cfg80211_bss_expire(struct cfg80211_registered_device *dev)
+{
+ __cfg80211_bss_expire(dev, IEEE80211_SCAN_RESULT_EXPIRE, 0);Here, you could just pass "jiffies - SCAN_RESULT_EXPIRE" as the maxage and get pretty much the same behaviour as before without a second parameter. johannes