From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v2 2/6] station: fix DBus reply for Connect() with netconfig
Date: Wed, 28 May 2025 13:10:22 -0700 [thread overview]
Message-ID: <20250528201026.598221-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20250528201026.598221-1-prestwoj@gmail.com>
When netconfig is enabled the DBus reply was being sent in
station_connect_ok(), before netconfig had even started. This would
result in a call to Connect() succeeding from a DBus perspective but
really netconfig still needed to complete before IWD transitioned
to a connected state.
Fixes: 72e7d3ceb83d ("station: Handle NETCONFIG_EVENT_FAILED")
---
src/station.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
v2:
* Broke this out into its own commit. I believe this is how the original
change was supposed to operate i.e. send the reply only once fully
connected.
diff --git a/src/station.c b/src/station.c
index 2b6a18f8..4180b7a4 100644
--- a/src/station.c
+++ b/src/station.c
@@ -1795,6 +1795,13 @@ static void station_enter_state(struct station *station,
periodic_scan_stop(station);
break;
case STATION_STATE_CONNECTED:
+ if (station->connect_pending) {
+ struct l_dbus_message *reply =
+ l_dbus_message_new_method_return(
+ station->connect_pending);
+ dbus_pending_reply(&station->connect_pending, reply);
+ }
+
l_dbus_object_add_interface(dbus,
netdev_get_path(station->netdev),
IWD_STATION_DIAGNOSTIC_INTERFACE,
@@ -3581,13 +3588,6 @@ static void station_connect_ok(struct station *station)
l_debug("");
- if (station->connect_pending) {
- struct l_dbus_message *reply =
- l_dbus_message_new_method_return(
- station->connect_pending);
- dbus_pending_reply(&station->connect_pending, reply);
- }
-
/*
* Get a neighbor report now so future roams can avoid waiting for
* a report at that time
--
2.34.1
next prev parent reply other threads:[~2025-05-28 20:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 20:10 [PATCH v2 1/6] network: make clearing network blacklist a separate operation James Prestwood
2025-05-28 20:10 ` James Prestwood [this message]
2025-05-28 20:10 ` [PATCH v2 3/6] station: include netconfig as part of the BSS retry logic James Prestwood
2025-05-28 20:10 ` [PATCH v2 4/6] auto-t: allow configurable DBus timeout/callbacks on connect{_bssid} James Prestwood
2025-05-28 20:10 ` [PATCH v2 5/6] auto-t: update several tests to work with netconfig refactor James Prestwood
2025-05-28 20:10 ` [PATCH v2 6/6] doc: add note about timeouts to Network.Connect() James Prestwood
2025-06-05 15:02 ` [PATCH v2 1/6] network: make clearing network blacklist a separate operation Denis Kenzior
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=20250528201026.598221-2-prestwoj@gmail.com \
--to=prestwoj@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