linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pedersen, Thomas" <c_tpeder@qca.qualcomm.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>, <johannes@sipsolutions.net>,
	<ath6kl-devel@qualcomm.com>
Subject: Re: [RFC 1/2] nl80211: specify RSSI threshold when scanning
Date: Thu, 7 Jun 2012 11:38:21 -0700	[thread overview]
Message-ID: <20120607183820.GA2950@pista> (raw)
In-Reply-To: <4FD0570D.50303@qca.qualcomm.com>

On Thu, Jun 07, 2012 at 10:23:57AM +0300, Kalle Valo wrote:
> On 06/07/2012 05:43 AM, Thomas Pedersen wrote:
> > Support configuring an RSSI threshold in dBm (s32) when scanning,
> > below which a BSS won't be reported by the cfg80211 driver.
> > 
> > Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
> 
> [...]
> 
> > + * @NL80211_ATTR_SCAN_RSSI: rssi threshold (in s32 dBm) below which a BSS is
> > + *	not reported in scan results. Will be disabled if 0 or not specified.
> > + *	Supported in %NL80211_CMD_START_SCHED_SCAN and %NL80211_TRIGGER_SCAN.
> > + *
> >   * @NL80211_ATTR_MAX: highest attribute number currently defined
> >   * @__NL80211_ATTR_AFTER_LAST: internal use
> >   */
> > @@ -1473,6 +1477,8 @@ enum nl80211_attrs {
> >  
> >  	NL80211_ATTR_BG_SCAN_PERIOD,
> >  
> > +	NL80211_ATTR_SCAN_RSSI,
> 
> NL80211_ATTR_SCAN_RSSI_THRESHOLD? Or is limit a better term? Or
> something else?
> 
> My english sucks anyway...

No you're probably right, thanks :)

> > @@ -935,6 +936,7 @@ struct cfg80211_scan_request {
> >  	struct net_device *dev;
> >  	bool aborted;
> >  	bool no_cck;
> > +	s32 rssi;
> 
> rssi_threshold?

Yes.

> >  
> >  	/* keep last */
> >  	struct ieee80211_channel *channels[0];
> > @@ -966,6 +968,7 @@ struct cfg80211_match_set {
> >   * @wiphy: the wiphy this was for
> >   * @dev: the interface
> >   * @channels: channels to scan
> > + * @rssi: don't report scan results below this threshold
> >   */
> >  struct cfg80211_sched_scan_request {
> >  	struct cfg80211_ssid *ssids;
> > @@ -976,6 +979,7 @@ struct cfg80211_sched_scan_request {
> >  	size_t ie_len;
> >  	struct cfg80211_match_set *match_sets;
> >  	int n_match_sets;
> > +	s32 rssi;
> 
> rssi_threshold?

Ditto.

> > @@ -1794,6 +1798,8 @@ struct cfg80211_ops {
> >   *	responds to probe-requests in hardware.
> >   * @WIPHY_FLAG_OFFCHAN_TX: Device supports direct off-channel TX.
> >   * @WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL: Device supports remain-on-channel call.
> > + * @WIPHY_FLAG_SUPPORTS_RSSI_SCAN: Device supports filtering scan results by
> > + *	 RSSI (in dBm).
> >   */
> >  enum wiphy_flags {
> >  	WIPHY_FLAG_CUSTOM_REGULATORY		= BIT(0),
> > @@ -1817,6 +1823,7 @@ enum wiphy_flags {
> >  	WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD	= BIT(19),
> >  	WIPHY_FLAG_OFFCHAN_TX			= BIT(20),
> >  	WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL	= BIT(21),
> > +	WIPHY_FLAG_SUPPORTS_RSSI_SCAN		= BIT(22),
> >  };
> 
> Is this flag really needed? For me this looks like an optimisation more
> than a functional change. If the driver supports this, that's great and
> we can save some power. But if the driver does not support it does it
> really make any difference for the user space? Would user space act
> differently if this feature is not supported by the driver?

Well, this allows cfg80211 to return an error if this feature is
requested but not supported by the driver / fw.

Thomas

  reply	other threads:[~2012-06-07 18:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07  2:43 [RFC 1/2] nl80211: specify RSSI threshold when scanning Thomas Pedersen
2012-06-07  2:43 ` [RFC 2/2] mac80211: support rssi threshold scan Thomas Pedersen
2012-06-07  7:25   ` Kalle Valo
2012-06-09  8:09   ` Johannes Berg
2012-06-09 22:03     ` Pedersen, Thomas
2012-06-10  8:11       ` Kalle Valo
2012-06-07  7:23 ` [RFC 1/2] nl80211: specify RSSI threshold when scanning Kalle Valo
2012-06-07 18:38   ` Pedersen, Thomas [this message]
2012-06-07 18:53     ` Kalle Valo
2012-06-07 19:18       ` Pedersen, Thomas
2012-06-09  8:09         ` Johannes Berg
2012-06-10  9:50           ` Luciano Coelho
2012-06-07 15:50 ` Dan Williams
2012-06-07 17:50   ` Kalle Valo
2012-06-11  5:39 ` Luciano Coelho

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=20120607183820.GA2950@pista \
    --to=c_tpeder@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=johannes@sipsolutions.net \
    --cc=kvalo@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 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).