Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1e23c94 authored by Denis Kenzior's avatar Denis Kenzior Committed by Johannes Berg
Browse files

nl80211: Optimize cfg80211_bss_expire invocations



Only invoke cfg80211_bss_expire on the first nl80211_dump_scan
invocation to avoid (likely) redundant processing.

Signed-off-by: default avatarDenis Kenzior <denkenz@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent d4e36e55
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -8100,6 +8100,14 @@ static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb)

	wdev_lock(wdev);
	spin_lock_bh(&rdev->bss_lock);

	/*
	 * dump_scan will be called multiple times to break up the scan results
	 * into multiple messages.  It is unlikely that any more bss-es will be
	 * expired after the first call, so only call only call this on the
	 * first dump_scan invocation.
	 */
	if (start == 0)
		cfg80211_bss_expire(rdev);

	cb->seq = rdev->bss_generation;