All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3] nl80211: specify RSSI threshold in scheduled scan
Date: Wed, 20 Jun 2012 10:26:59 +0200	[thread overview]
Message-ID: <1340180819.4655.27.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1340127208-3266-1-git-send-email-c_tpeder@qca.qualcomm.com>

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?

johannes


  reply	other threads:[~2012-06-20  8:27 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 [this message]
2012-06-21 17:14   ` Pedersen, Thomas

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=1340180819.4655.27.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=c_tpeder@qca.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.