From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.linux.dev
Subject: Re: [PATCH 1/3] netdev: Remove improper use of netdev_connect_failed
Date: Wed, 15 Nov 2023 13:07:34 -0600 [thread overview]
Message-ID: <246db269-f53e-41c2-9784-19fefc596a2a@gmail.com> (raw)
In-Reply-To: <20231115000547.1139157-1-denkenz@gmail.com>
On 11/14/23 18:05, Denis Kenzior wrote:
> When a roam event is received, iwd generates a firmware scan request and
> notifies its event filter of the ROAMING condition. In cases where the
> firmware scan could not be started successfully, netdev_connect_failed
> is invoked. This is not a correct use of netev_connect_failed since it
> doesn't actually disconnect the underlying netdev and the reflected
> state becomes de-synchronized from the underlying kernel device.
>
> The firmware scan request could currently fail for two reasons:
> 1. nl80211 genl socket is in a bad state, or
> 2. the scan context does not exist
>
> Since both reasons are highly unlikely, simply use L_WARN instead.
>
> The other two cases where netdev_connect_failed is used could only occur
> if the kernel message is invalid. The message is ignored in that case
> and a warning is printed.
>
> The situation described above also exists in netdev_get_fw_scan_cb. If
> the scan could not be completed successfully, there's not much iwd can
> do to recover. Have iwd remain in roaming state and print an error.
> ---
> src/netdev.c | 35 +++++++++++------------------------
> 1 file changed, 11 insertions(+), 24 deletions(-)
>
All applied.
Regards,
-Denis
prev parent reply other threads:[~2023-11-15 19:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 0:05 [PATCH 1/3] netdev: Remove improper use of netdev_connect_failed Denis Kenzior
2023-11-15 0:05 ` [PATCH 2/3] netdev: Simplify netdev_auth_cb error logic Denis Kenzior
2023-11-15 0:05 ` [PATCH 3/3] netdev: Separate connect_failed and disconnected paths Denis Kenzior
2023-11-15 18:27 ` James Prestwood
2023-11-15 19:07 ` Denis Kenzior
2023-11-15 19:07 ` Denis Kenzior [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=246db269-f53e-41c2-9784-19fefc596a2a@gmail.com \
--to=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 read-only IMAP folder(s) and NNTP newsgroup(s).