From f6cec3b584ed263986ca9ececf345d3a52a8c8f9 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Fri, 12 Aug 2022 12:43:31 +0200 Subject: [PATCH] iwd: Let IWD handle retries When we're set to let IWD control autoconnect, don't retry connections on NM side, set retry count to 0. --- src/core/devices/wifi/nm-device-iwd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/core/devices/wifi/nm-device-iwd.c b/src/core/devices/wifi/nm-device-iwd.c index aadfc115ea..73232e3414 100644 --- a/src/core/devices/wifi/nm-device-iwd.c +++ b/src/core/devices/wifi/nm-device-iwd.c @@ -2275,6 +2275,18 @@ act_stage2_config(NMDevice *device, NMDeviceStateReason *out_failure_reason) goto out_fail; } + /* With priv->iwd_autoconnect we have to let IWD handle retries for + * infrastructure networks. IWD will not necessarily retry the same + * network after a failure but it will likely go into an autoconnect + * mode and we don't want to try to override the logic. We don't need + * to reset the retry count so we set no timeout. + */ + if (priv->iwd_autoconnect) { + NMSettingsConnection *sett_conn = nm_act_request_get_settings_connection(req); + + nm_settings_connection_autoconnect_retries_set(sett_conn, 0); + } + /* With priv->iwd_autoconnect, if we're assuming a connection because * of a state change to "connecting", signal stage 2 is still running. * If "connected" or "roaming", we can go right to the IP_CONFIG state