public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, iwd@lists.linux.dev
Cc: Daniel Bond <danielbondno@gmail.com>
Subject: Re: [PATCH 1/2] scan: check scan request in get_survey_done before deref
Date: Thu, 5 Sep 2024 08:09:03 -0700	[thread overview]
Message-ID: <e82acb54-3b2a-49cf-91c3-0adabfc574fc@gmail.com> (raw)
In-Reply-To: <4d66fa8f-7499-4d68-9087-6e3bf6aa876e@gmail.com>

Hi Denis,

On 9/5/24 7:57 AM, Denis Kenzior wrote:
> Hi James,
>
>>> Do we know why external scans are happening?  I can understand a one 
>>> off because someone triggered iw scan, but from the bug report it 
>>> sounded like it was crashing iwd repeatedly?
>> NetworkManager? wpa_supplicant running? I really have no idea. Either 
>> way its out of our control.
>
> Would be good to know and fix that.
>
>>>
>>> I still don't understand why we're even bothering requesting a 
>>> survey for a scan we didn't trigger?  In other words, we shouldn't 
>>> even be in this function.
>> Because we still utilize external scan results for periodic scans. So 
>> if periodic scans are running we will still try and get the 
>> survey/results.
>
> Should we though?  I'm not really sure how surveys are implemented at 
> the driver level.  Are you sure this isn't introducing other timing 
> problems?

So looking at the nl80211 code it is actually making a driver call for 
surveys, versus GET_SCAN simply returns the list. I can't speak to the 
implementation but based on testing several cards it appears that 
GET_SURVEY was always gathering data from the last scan request. E.g. if 
you do a limited scan then survey it will only have updated results for 
those limited frequencies.

But anyways, if this seems sketchy to you I'm also fine skipping the 
survey and only doing GET_SCAN in the case of external scans. I guess 
without knowing what the driver is doing a survey could in theory take 
an excessive amount of time and cause unintended behavior, like if our 
own internal scan got issued during that.

Thanks,

James

>
> Regards,
> -Denis

      reply	other threads:[~2024-09-05 15:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 13:43 [PATCH 1/2] scan: check scan request in get_survey_done before deref James Prestwood
2024-09-05 13:43 ` [PATCH 2/2] scan: check pending requests after regdom update James Prestwood
2024-09-05 13:56 ` [PATCH 1/2] scan: check scan request in get_survey_done before deref James Prestwood
2024-09-05 14:37 ` Denis Kenzior
2024-09-05 14:44   ` James Prestwood
2024-09-05 14:57     ` Denis Kenzior
2024-09-05 15:09       ` James Prestwood [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=e82acb54-3b2a-49cf-91c3-0adabfc574fc@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=danielbondno@gmail.com \
    --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