From a0bc64d1cd4ce85693cf512c97ca665930e79d16 Mon Sep 17 00:00:00 2001 From: gururaajar Date: Thu, 5 Feb 2026 23:49:46 -0500 Subject: [PATCH] =?UTF-8?q?RDKEMW-13401:=20Migration=20Device=20connects?= =?UTF-8?q?=20to=20Wi=E2=80=91Fi=20instead=20of=20Ethernet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reason for Change: As the interface type is not checked before assigning the firstconnection. Firstconnection is getting assigned with a valid wifi connection when both ethernet and wifi are connected. So even when Wired connection is activated we end in activating Wifi connection. Added interface check to avoid this Test Procedure: Migration test scenario Priority: P1 Risks: Medium Signed-off-by: Gururaaja ESR --- plugin/gnome/NetworkManagerGnomeWIFI.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/gnome/NetworkManagerGnomeWIFI.cpp b/plugin/gnome/NetworkManagerGnomeWIFI.cpp index c1cbdfcb..fabacec1 100644 --- a/plugin/gnome/NetworkManagerGnomeWIFI.cpp +++ b/plugin/gnome/NetworkManagerGnomeWIFI.cpp @@ -859,13 +859,19 @@ namespace WPEFramework std::string connTypStr = connTyp; NMLOG_DEBUG("connection id: %s, type: %s", connId != NULL ? connId : "NULL", connTypStr.c_str()); - if(connTypStr == "802-11-wireless") { + // Store first connection only if it matches the interface type + if(iface == nmUtils::wlanIface() && connTypStr == "802-11-wireless") { NMLOG_INFO("wifi conn found : %s", connId); // if no known ssid given then use first wifi connection from list // it usefule when bootup there will be no known ssid if(firstConnection == NULL) firstConnection = connection; } + else if(iface == nmUtils::ethIface() && connTypStr == "802-3-ethernet") { + NMLOG_INFO("ethernet conn found : %s", connId); + if(firstConnection == NULL) + firstConnection = connection; + } if (connId != NULL && strcmp(connId, knowConnectionID.c_str()) == 0) {