From: "Alvin Šipraga" <ALSI@bang-olufsen.dk>
To: Denis Kenzior <denkenz@gmail.com>
Cc: "Alvin Šipraga" <alvin@pqrs.dk>,
"iwd@lists.linux.dev" <iwd@lists.linux.dev>
Subject: Re: [RFC PATCH] scan: retry scan based on scan done events per wiphy, not wdev
Date: Thu, 17 Nov 2022 18:29:50 +0000 [thread overview]
Message-ID: <20221117182950.ncb7h33ngvqr5q7v@bang-olufsen.dk> (raw)
In-Reply-To: <eead8130-e13b-e1eb-6453-e27b1d293c31@gmail.com>
Hi Denis,
On Thu, Nov 17, 2022 at 11:49:02AM -0600, Denis Kenzior wrote:
> Hi Alvin,
>
> On 11/17/22 11:29, Alvin Šipraga wrote:
> > From: Alvin Šipraga <alsi@bang-olufsen.dk>
> >
> > ---
> > src/scan.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 46 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/scan.c b/src/scan.c
> > index 5548914a12de..c3763ee41173 100644
> > --- a/src/scan.c
> > +++ b/src/scan.c
>
> <snip>
>
> > @@ -231,6 +247,7 @@ static void scan_request_triggered(struct l_genl_msg *msg, void *userdata)
> > if (err < 0) {
> > /* Scan in progress, assume another scan is running */
> > if (err == -EBUSY) {
> > + l_debug("XXX busy");
>
> This might need a nicer message
Sure, it was just an RFC patch. I'll send a proper patch w/ commit
message later :)
>
> > sc->state = SCAN_STATE_PASSIVE;
> > return;
> > }
> > @@ -2044,6 +2061,29 @@ static void scan_parse_result_frequencies(struct l_genl_msg *msg,
> > }
> > }
> > +static void scan_retry_pending(uint32_t wiphy_id)
> > +{
> > + struct scan_context *sc = l_queue_find(scan_contexts,
> > + scan_context_match_retry,
> > + &wiphy_id);
> > + struct scan_request *sr;
> > +
> > + l_debug("");
> > +
> > + if (!sc)
> > + return;
> > +
> > + sr = l_queue_peek_head(sc->requests);
> > +
> > + if (L_WARN_ON(!sr))
> > + return;
>
> Also you could simplify out the need for this L_WARN_ON by using
> l_queue_get_entries() style for loop on the scan_context(s) instead of using
> l_queue_find. But that's just me nitpicking.
Alright, I'll try and improve it before sending again.
>
> > +
> > + l_debug("XXX retry pending request");
> > +
> > + sc->state = SCAN_STATE_NOT_RUNNING;
> > + start_next_scan_request(&sr->work);
> > +}
> > +
>
> Otherwise this looks fine to me. Does it work?
Yes!
Thanks for the quick review!
Kind regards,
Alvin
prev parent reply other threads:[~2022-11-17 18:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 17:29 [RFC PATCH] scan: retry scan based on scan done events per wiphy, not wdev Alvin Šipraga
2022-11-17 17:49 ` Denis Kenzior
2022-11-17 18:29 ` Alvin Šipraga [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=20221117182950.ncb7h33ngvqr5q7v@bang-olufsen.dk \
--to=alsi@bang-olufsen.dk \
--cc=alvin@pqrs.dk \
--cc=denkenz@gmail.com \
--cc=iwd@lists.linux.dev \
/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).