Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1647098

Re: [PATCH] cfg80211: Be able to set bss expire time at config stage.

From Johannes Berg <johannes@sipsolutions.net>
Newsgroups linux.kernel
Subject Re: [PATCH] cfg80211: Be able to set bss expire time at config stage.
Date 2017-05-22 18:20 +0200
Message-ID <tJYdP-7Wy-1@gated-at.bofh.it> (permalink)
References <tJYdP-7Wy-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2017-05-22 at 18:09 +0200, Enric Balletbo i Serra wrote:
> The IEEE80211_SCAN_RESULT_EXPIRE value was modified several times in
> the
> past. Initially was set at 10 seconds (2a51931192), then increased at
> 15
> seconds (09f97e0fc4) and finally to 30 seconds (f9616e0f88) to cover
> the
> use case when a station is having heavy uplink traffic. On some
> devices,
> like Chromebooks, this value is decreased to 7 seconds to avoid stall
> results, and other devices prefer set to 15 seconds.
> 
> This simple patch tries to make the selection of this value a bit
> more
> flexible by being able to set the expire time at config stage. Most
> users
> can leave the default value set as 30 seconds, others can modify the
> value
> at config stage if they want lower or bigger values.

I'm not really all that convinced that we really need this - userspace
should just be using the flush thing more often, and then it doesn't
really matter.

However, maybe that doesn't really matter all that much.

But,

> +config CFG80211_SCAN_RESULT_EXPIRE
> +	int "Scan completion time" if CFG80211

That should have "if CFG80211 && EXPERT" or something like that - no
need to prompt everyone for it.

> +	rdev->scan_result_expire =
> CONFIG_CFG80211_SCAN_RESULT_EXPIRE;

This is completely pointless - no need to go through runtime like that.

> -#define IEEE80211_SCAN_RESULT_EXPIRE	(30 * HZ)

You can just use CONFIG_CFG80211_SCAN_RESULT_EXPIRE * HZ here.

> +	__cfg80211_bss_expire(rdev, jiffies - rdev-
> >scan_result_expire);

You also completely messed this up because it now depends on HZ.

johannes

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] cfg80211: Be able to set bss expire time at config  stage. Johannes Berg <johannes@sipsolutions.net> - 2017-05-22 18:20 +0200
  Re: [PATCH] cfg80211: Be able to set bss expire time at config  stage. Johannes Berg <johannes@sipsolutions.net> - 2017-05-22 18:40 +0200

csiph-web