From: "Pedersen, Thomas" <c_tpeder@qca.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v3] nl80211: specify RSSI threshold in scheduled scan
Date: Thu, 21 Jun 2012 10:14:34 -0700 [thread overview]
Message-ID: <20120621171434.GA2822@pista> (raw)
In-Reply-To: <1340180819.4655.27.camel@jlt3.sipsolutions.net>
On Wed, Jun 20, 2012 at 10:26:59AM +0200, Johannes Berg wrote:
> On Tue, 2012-06-19 at 10:33 -0700, Thomas Pedersen wrote:
> > Support configuring an RSSI threshold in dBm (s32) when requesting
> > scheduled scan, below which a BSS won't be reported by the cfg80211
> > driver.
>
> > @@ -4241,7 +4242,7 @@ static int nl80211_start_sched_scan(struct sk_buff *skb,
> > nla_for_each_nested(attr,
> > info->attrs[NL80211_ATTR_SCHED_SCAN_MATCH],
> > tmp) {
> > - struct nlattr *ssid;
> > + struct nlattr *ssid, *rssi;
> >
> > nla_parse(tb, NL80211_SCHED_SCAN_MATCH_ATTR_MAX,
> > nla_data(attr), nla_len(attr),
> > @@ -4257,6 +4258,9 @@ static int nl80211_start_sched_scan(struct sk_buff *skb,
> > request->match_sets[i].ssid.ssid_len =
> > nla_len(ssid);
> > }
> > + rssi = tb[NL80211_SCHED_SCAN_MATCH_ATTR_RSSI];
> > + if (rssi)
> > + request->rssi_thold = nla_get_u32(rssi);
>
> I was going to apply this, but then I realized ... if userspace doesn't
> set the value then the default is 0 which is a bit useless, better set
> to a very small negative value or something, right?
OK. I was still treating the '0' threshold as "off" in the driver, but
this is more consistent. Will submit a v4 shortly.
Thanks,
Thomas
prev parent reply other threads:[~2012-06-21 17:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-19 17:33 [PATCH v3] nl80211: specify RSSI threshold in scheduled scan Thomas Pedersen
2012-06-20 8:26 ` Johannes Berg
2012-06-21 17:14 ` Pedersen, Thomas [this message]
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=20120621171434.GA2822@pista \
--to=c_tpeder@qca.qualcomm.com \
--cc=johannes@sipsolutions.net \
--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).