From 40b061cd51078c3ca3a0f58ccfce6a9078fb08ef Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 15 Apr 2024 08:52:20 +0800 Subject: [PATCH] ui/network: update known connections after adding tethering connection. (#32166) update known connections --- selfdrive/ui/qt/network/wifi_manager.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/network/wifi_manager.cc b/selfdrive/ui/qt/network/wifi_manager.cc index 854a8920b5..cb7cccd194 100644 --- a/selfdrive/ui/qt/network/wifi_manager.cc +++ b/selfdrive/ui/qt/network/wifi_manager.cc @@ -428,7 +428,10 @@ void WifiManager::addTetheringConnection() { connection["ipv4"]["route-metric"] = 1100; connection["ipv6"]["method"] = "ignore"; - call(NM_DBUS_PATH_SETTINGS, NM_DBUS_INTERFACE_SETTINGS, "AddConnection", QVariant::fromValue(connection)); + auto path = call(NM_DBUS_PATH_SETTINGS, NM_DBUS_INTERFACE_SETTINGS, "AddConnection", QVariant::fromValue(connection)); + if (!path.path().isEmpty()) { + knownConnections[path] = tethering_ssid; + } } void WifiManager::tetheringActivated(QDBusPendingCallWatcher *call) {