3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-06-07 22:07:23 +02:00

station: fix DBus reply for Connect() with netconfig

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")
This commit is contained in:
James Prestwood 2025-05-28 13:10:22 -07:00 committed by Denis Kenzior
parent 5287809043
commit 5b5a9b60fb

View File

@ -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