RDKEMW-15309 : Improvements in Wifi Connection Processing in Network Manager plugin#300
RDKEMW-15309 : Improvements in Wifi Connection Processing in Network Manager plugin#300
Conversation
…#283) * spike Initial code change
Reason for change: Integrated breakpad support in networkmanager plugin Test Procedure: Check whether minidumps are generated properly Priority:P1 Risks: Medium Signed-off-by: Gururaaja ESR<Gururaja_ErodeSriranganRamlingham@comcast.com>
bug fix
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for connecting to a saved WiFi connection by SSID and extends WiFi connection handling with optional BSSID + frequency selection, along with corresponding JSON-RPC, interface, events, docs, and tests updates.
Changes:
- Introduce
ConnectToKnownSSIDacross interface, implementations (RDK + GNOME), and JSON-RPC registration. - Extend
WiFiConnectinputs to accept optionalbssidandfrequency, and include BSSID in scan results events. - Update/expand L2 tests and improve object-path/memory handling in the GNOME WiFi implementation.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/mocks/INetworkManagerMock.h | Adds mock for new ConnectToKnownSSID API. |
| tests/l2Test/libnm/l2_test_libnmproxyWifi.cpp | Adds coverage for wrong BSSID, known-SSID connect, and extra AP property mocking. |
| tests/l2Test/libnm/l2_test_libnmproxyEvent.cpp | Adjusts scan/event test setup to include device list and BSSID mocking. |
| plugin/rdk/NetworkManagerRDKProxy.cpp | Implements ConnectToKnownSSID as unavailable for RDK backend. |
| plugin/gnome/NetworkManagerGnomeWIFI.h | Adds GNOME connectToKnownSSID and changes m_objectPath ownership type. |
| plugin/gnome/NetworkManagerGnomeWIFI.cpp | Implements known-SSID connect; adds BSSID/frequency handling and various lifecycle fixes. |
| plugin/gnome/NetworkManagerGnomeUtils.h | Declares BSSID validator helper. |
| plugin/gnome/NetworkManagerGnomeUtils.cpp | Implements BSSID format validation; adjusts nmcli logging domains. |
| plugin/gnome/NetworkManagerGnomeProxy.cpp | Wires ConnectToKnownSSID into GNOME implementation; changes WiFiConnect behavior/validation. |
| plugin/gnome/NetworkManagerGnomeEvents.cpp | Adds BSSID to scan results and strengthens scan callback checks. |
| plugin/NetworkManagerJsonRpc.cpp | Registers ConnectToKnownSSID; parses bssid/frequency for WiFiConnect. |
| plugin/NetworkManagerImplementation.h | Changes process monitor interval constant and adds interface method. |
| plugin/NetworkManager.h | Exposes JSON-RPC handler declaration for ConnectToKnownSSID. |
| plugin/CMakeLists.txt | Whitespace-only formatting changes. |
| interface/INetworkManager.h | Adds WIFIFrequency, bssid/frequency to connect struct, and new interface method. |
| docs/NetworkManagerPlugin.md | Documents new RPC + new parameters and adds BSSID to scan results event docs. |
| definition/NetworkManager.json | Adds schema for ConnectToKnownSSID, makes WiFiConnect params optional, and adds BSSID to event schema. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 8 comments.
Comments suppressed due to low confidence (1)
plugin/gnome/NetworkManagerGnomeWIFI.cpp:1162
- If
AccessPointis null (SSID not found) andpersistis false, the function continues and later calls APIs likenm_access_point_connection_valid(AccessPoint, ...)/nm_object_get_path(NM_OBJECT(AccessPoint))with a nullAccessPoint, which is undefined behavior. Return failure immediately when the SSID isn’t found and you’re not going to add/persist it, or add explicit null-guards before anyAccessPointuse.
AccessPoint = findMatchingSSID(ApList, ssidInfo);
if(AccessPoint == NULL)
{
NMLOG_WARNING("SSID '%s' not found !", ssidInfo.ssid.c_str());
// if(_instance != nullptr)
// _instance->ReportWiFiStateChange(Exchange::INetworkManager::WIFI_STATE_SSID_NOT_FOUND);
/* ssid not found in scan list so add to known ssid it will do a scanning and connect */
if(ssidInfo.persist)
{
if(addToKnownSSIDs(ssidInfo))
{
NMLOG_DEBUG("Adding to known ssid '%s' ", ssidInfo.ssid.c_str());
deleteClientConnection();
return activateKnownConnection(nmUtils::wlanIface(), ssidInfo.ssid);
}
else
{
deleteClientConnection();
return false;
}
}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.