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
Subject: Re: [PATCH 1/2] dpp: relax requirement on IWD being in a disconnected state
Date: Fri, 19 Jul 2024 13:42:04 -0700	[thread overview]
Message-ID: <74956b29-14c9-47ae-ac7e-4294f52d2147@gmail.com> (raw)
In-Reply-To: <abdda292-7c90-4705-9c81-9e11ffaedd10@gmail.com>

Hi Denis,

On 7/19/24 1:33 PM, Denis Kenzior wrote:
> Hi James,
>
> On 7/19/24 1:19 PM, James Prestwood wrote:
>> Initially this made sense and for a completely unconfigured device
>> there is little to no downside to limiting IWD's state to
>> disconnected (or autoconnect states).
>>
>
> What about periodic scanning?
If a periodic scan was queued prior to DPP starting, then yeah it would 
run. But DPP queue's its next offchannel request prior to completing its 
current one, so once DPP starts nothing else can scan/connect until DPP 
is done.
>
>> Where this poses a problem is if the device has been configured
>> incorrectly, for example with an invalid PSK. IWD will continue to
>> try and connect to the network, blocking DPP from ever being
>> started and always returning busy. Even if you timed it perfectly
>> to start DP between connection attempts it would be canceled right
>> away when IWD tried connecting again.
>
> As in station_get_connected_network() returns non NULL?
Yep, since the connected network gets set before we're really "connected".
>
>>
>> Instead we can relax this requirement by allowing DPP to start even
>> if IWD is connecting, and only cancel DPP when IWD's state
>> transitions to connnected. Since DPP effectively blocks the wiphy
>> work queue once it is started it will prevent any further connection
>> attempts until it completes.
>
> But if iwd is connecting, station_get_connected_network() is true and 
> we've already sent the connection request?  So, you're inserting DPP 
> work which will run after the connection attempt fails?
Yes exactly, and if the connection succeeds DPP will be canceled by the 
existing logic.
>
> Have you looked into how WSC does this?
I hadn't, but looks like it waits for a disconnected state before 
starting? We could do this too in DPP I guess. Just check if station is 
in any pending connecting states (connecting/connecting_auto), set a 
flag, and start DPP when station signals its disconnected.
>
>> ---
>>   src/dpp.c | 48 +++++++++++++++++++++++++++++++++++++++++++-----
>>   1 file changed, 43 insertions(+), 5 deletions(-)
>
> FYI, CI is failing the DPP test for this set.
>
> Regards,
> -Denis

  reply	other threads:[~2024-07-19 20:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-19 18:19 [PATCH 1/2] dpp: relax requirement on IWD being in a disconnected state James Prestwood
2024-07-19 18:19 ` [PATCH 2/2] auto-t: add test for DPP starting while connecting James Prestwood
2024-07-19 20:33 ` [PATCH 1/2] dpp: relax requirement on IWD being in a disconnected state Denis Kenzior
2024-07-19 20:42   ` James Prestwood [this message]
2024-07-19 21:00     ` Denis Kenzior
2024-07-22 11:23       ` James Prestwood

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=74956b29-14c9-47ae-ac7e-4294f52d2147@gmail.com \
    --to=prestwoj@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