linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Andrew Zaborowski <andrew.zaborowski@intel.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH v4 3/5] cfg80211: Accept multiple RSSI thresholds for CQM
Date: Wed, 08 Feb 2017 10:58:53 +0100	[thread overview]
Message-ID: <1486547933.24745.2.camel@sipsolutions.net> (raw)
In-Reply-To: <20170125114344.8179-3-andrew.zaborowski@intel.com> (sfid-20170125_124407_436433_080482FC)


> This method doesn't have a hysteresis parameter because there's no
> benefit to the cfg80211 code from having the hysteresis be handled by
> hardware/driver in terms of the number of wakeups.  At the same time
> it would likely be less consistent between drivers if offloaded or
> done in the drivers.

I'm not really sure I buy this.

What if I configure a few ranges, and let's say one of the boundaries
is -50dBm. Now if I sit just on that value of -50dBm and thus my signal
fluctuates say -48..-52, I'd have to continuously wake up the host.

You try to avoid that here, I think:

+	if (low > (s32) (last - hyst))
+		low = last - hyst;
+	if (high < (s32) (last + hyst))
+		high = last + hyst;

but it's not clear to me that this is effective?

Let's see. last is -52, so low will be -60 and high will be -50.

Let's say hyst is 3 since I chose the ranges so closely. I'm guessing a
higher hysteresis and larger ranges would actually be better, but let's
stick to this for the sake of the example.

last-hyst = -55, so low isn't > that, low = -60
last+hyst = -49, so high = -49

but now it still fluctuates around -50, so if I next hit -48 you do the
same dance again with -50/-40, getting -51/-40 and never really
applying a full hysteresis, no?

I'll probably see an intermediate value of -50 at some point, but I'll
never actually *report* it, so "last" can switch between -48 and -52
constantly in this scenario, no?


I think it would make sense to unconditionally apply the hysteresis to
low/high, i.e. always set
 low = low - hyst
 high = high + hyst

so that you get "sticky" ranges once you're in them?



> +	if (!wiphy_ext_feature_isset(&rdev->wiphy,
> +			
> 	     NL80211_EXT_FEATURE_CQM_RSSI_LIST))
> +		return
> -EOPNOTSUPP;


That check should be earlier in the function
cfg80211_cqm_rssi_update(), no?



johannes

  reply	other threads:[~2017-02-08  9:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 11:43 [PATCH v4 1/5] mac80211: Pass new RSSI level in CQM RSSI notification Andrew Zaborowski
2017-01-25 11:43 ` [PATCH v4 2/5] cfg80211: " Andrew Zaborowski
2017-02-08  9:47   ` Johannes Berg
2017-01-25 11:43 ` [PATCH v4 3/5] cfg80211: Accept multiple RSSI thresholds for CQM Andrew Zaborowski
2017-02-08  9:58   ` Johannes Berg [this message]
2017-02-08 11:26     ` Andrew Zaborowski
2017-02-08 12:32       ` Johannes Berg
2017-02-10  9:39         ` Andrew Zaborowski
2017-02-10  9:41           ` Johannes Berg
2017-01-25 11:43 ` [PATCH v4 4/5] mac80211: Add set_cqm_rssi_range_config Andrew Zaborowski
2017-01-25 11:43 ` [PATCH v4 5/5] wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers Andrew Zaborowski
2017-02-08 10:00   ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1486547933.24745.2.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=andrew.zaborowski@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).