linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Arend Van Spriel <arend.vanspriel@broadcom.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [RFC V2 1/5] nl80211: allow multiple active scheduled scan requests
Date: Tue, 14 Feb 2017 13:51:54 +0100	[thread overview]
Message-ID: <1487076714.4705.11.camel@sipsolutions.net> (raw)
In-Reply-To: <fd4c2573-caea-1cdc-ee33-f010bb0aad58@broadcom.com> (sfid-20170214_133543_692623_F8DC7C86)

On Tue, 2017-02-14 at 13:35 +0100, Arend Van Spriel wrote:
> On 24-1-2017 10:40, Johannes Berg wrote:
> > 
> > > + * @max_sched_scan_reqs: maximum number of scheduled scan
> > > requests
> > > that
> > > + *	the device can run concurrently.
> > 
> > Perhaps we should get rid of WIPHY_FLAG_SUPPORTS_SCHED_SCAN and
> > just
> > set this to 1 for such devices? Otherwise we have two different
> > requirements, and we need to track that 0 is an invalid value here
> > if
> > WIPHY_FLAG_SUPPORTS_SCHED_SCAN is set, or something like that?
> 
> Ok. Doesn't that cause issues in user-space. Or do you only want to
> get rid of it in cfg80211 api and report the flag to user-space when
> max_sched_scan_reqs equals 1?

WIPHY_FLAG_* aren't directly reported to userspace at all.

> > This might break older userspace - you'll have to put it in a later
> > portion of the code.
> > 
> > I'm also a bit surprised the attributes aren't actually optional
> > for when sched scan isn't supported, I'd make the new one optional
> > and I guess we can fix the others later too, if desired.
> 
> Why would it break user-space. Is the order in which attributes are
> added into the stream something user-space relies on.

No. But there was a size limit on how much older userspace could
process before we did the splitting.

> > > +static struct cfg80211_sched_scan_request *
> > > +cfg80211_find_sched_scan_req(struct cfg80211_registered_device
> > > *rdev, u64 reqid)
> > > +{
> > > +	struct cfg80211_sched_scan_request *pos;
> > > +
> > > +	list_for_each_entry(pos, &rdev->sched_scan_req_list,
> > > list) {
> > > +		if (pos->reqid == reqid)
> > > +			return pos;
> > > +	}
> > > +	return ERR_PTR(-ENOENT);
> > > +}
> > 
> > Here too, I guess, since you don't actually use RCU.
> 
> So should I use RCU here? Not sure what is the better choice here.

No no, I just meant to add locking assertions :)

johannes

  reply	other threads:[~2017-02-14 12:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 11:42 [RFC V2 0/5] cfg80211: support multiple scheduled scans Arend van Spriel
2017-01-16 11:42 ` [RFC V2 1/5] nl80211: allow multiple active scheduled scan requests Arend van Spriel
2017-01-24  9:40   ` Johannes Berg
2017-02-14 12:35     ` Arend Van Spriel
2017-02-14 12:51       ` Johannes Berg [this message]
2017-02-14 13:07         ` Arend Van Spriel
2017-02-14 13:12           ` Johannes Berg
2017-02-14 20:09             ` Arend Van Spriel
2017-02-14 20:11               ` Johannes Berg
2017-02-15 10:55                 ` Arend Van Spriel
2017-02-15 10:59                   ` Johannes Berg
2017-02-14 13:33     ` Arend Van Spriel
2017-02-14 13:34       ` Johannes Berg
2017-01-16 11:42 ` [RFC V2 2/5] nl80211: include request id in scheduled scan event messages Arend van Spriel
2017-01-16 11:42 ` [RFC V2 3/5] cfg80211: add request id parameter to .sched_scan_stop() signature Arend van Spriel
2017-01-16 11:42 ` [RFC V2 4/5] cfg80211: add request id to cfg80211_sched_scan_results() api Arend van Spriel
2017-01-16 11:42 ` [RFC V2 5/5] cfg80211: add request id in cfg80211_sched_scan_stopped{,_rtnl}() api Arend van Spriel

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=1487076714.4705.11.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arend.vanspriel@broadcom.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).