diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index ca7251d72a28cc..41b8af50158bd9 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -1060,7 +1060,24 @@ void ConnectivityManagerImpl::_ConnectWiFiNetworkAsyncCallback(GObject * source_ } mpConnectCallback = nullptr; }); + + return; + } + + GError * gerror = nullptr; + + result = wpa_fi_w1_wpa_supplicant1_interface_call_save_config_sync(mWpaSupplicant.iface, nullptr, &gerror); + if (result) + { + ChipLogProgress(DeviceLayer, "wpa_supplicant: save config succeeded!"); } + else + { + ChipLogProgress(DeviceLayer, "wpa_supplicant: failed to save config: %s", gerror ? gerror->message : "unknown error"); + } + + if (gerror != nullptr) + g_error_free(gerror); } }