RDK-61444 : Network Manager Plugin to support Scan Specific SSID#306
RDK-61444 : Network Manager Plugin to support Scan Specific SSID#306jincysam87 wants to merge 61 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the GNOME NetworkManager WiFi scan path to support scanning with multiple SSID filters (instead of a single optional SSID string), aligning the plugin with the requirement to “scan multiple SSIDs”.
Changes:
- Updated
wifiScanRequestAPI to accept astd::vector<std::string>of SSIDs to filter. - Built a
GVariantaaySSID list fornm_device_wifi_request_scan_options_async()when filters are provided; otherwise falls back to a normal scan. - Updated the GNOME proxy to pass the SSID filter list through to the WiFi manager.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| plugin/gnome/NetworkManagerGnomeWIFI.h | Changes wifiScanRequest signature to take a vector of SSIDs. |
| plugin/gnome/NetworkManagerGnomeWIFI.cpp | Implements building a multi-SSID scan options payload and triggers filtered vs unfiltered scan. |
| plugin/gnome/NetworkManagerGnomeProxy.cpp | Passes the SSID filter list to the updated scan request API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| bool wifiConnectedSSIDInfo(Exchange::INetworkManager::WiFiSSIDInfo &ssidinfo); | ||
| bool wifiConnect(const Exchange::INetworkManager::WiFiConnectTo &ssidInfo); | ||
| bool wifiScanRequest(std::string ssidReq = ""); | ||
| bool wifiScanRequest(std::vector<std::string> ssidsToFilter = {}); |
| if(!ssidsToFilter.empty()) | ||
| { | ||
| NMLOG_INFO("starting wifi scanning .. %s", ssidReq.c_str()); | ||
| NMLOG_INFO("Starting wifi scanning for %d SSIDs:", ssidsToFilter.size()); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| bool wifiConnectedSSIDInfo(Exchange::INetworkManager::WiFiSSIDInfo &ssidinfo); | ||
| bool wifiConnect(const Exchange::INetworkManager::WiFiConnectTo &ssidInfo); | ||
| bool wifiScanRequest(std::string ssidReq = ""); | ||
| bool wifiScanRequest(std::vector<std::string> ssidsToFilter = {}); |
| if(!ssidsToFilter.empty()) | ||
| { | ||
| NMLOG_INFO("starting wifi scanning .. %s", ssidReq.c_str()); | ||
| NMLOG_INFO("Starting wifi scanning for %d SSIDs:", ssidsToFilter.size()); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (3)
plugin/NetworkManagerJsonRpc.cpp:670
- This malformed frequency-array path also returns with
rcstill set toCore::ERROR_GENERAL. Setrc = Core::ERROR_BAD_REQUESTbefore returning so non-numeric entries are reported as invalid request parameters rather than generic failures.
else
{
NMLOG_ERROR("Unexpected variant type in frequency array.");
returnJson(rc);
legacy/LegacyWiFiManagerAPIs.cpp:662
- This malformed frequency-array path also returns with
rcstill set toCore::ERROR_GENERAL. Setrc = Core::ERROR_BAD_REQUESTbefore returning so non-numeric entries are reported as invalid request parameters rather than generic failures.
else
{
NMLOG_ERROR("Unexpected variant type in frequency array.");
returnJson(rc);
plugin/gnome/gdbus/NetworkManagerGdbusProxy.cpp:223
- The GDBus backend now accepts the SSID/frequency iterators but still ignores them and always starts an unfiltered scan while returning success. With the updated API/docs, callers requesting specific SSIDs or bands will receive unfiltered results on this backend. Populate the same filter state used by event filtering or return a not-supported/bad-request status when filters are provided.
uint32_t NetworkManagerImplementation::StartWiFiScan(IWIFIFrequencyIterator* const frequencies /* @in */, IStringIterator* const ssids/* @in */)
{
uint32_t rc = Core::ERROR_GENERAL;
_nmGdbusEvents->setwifiScanOptions(true); /* Enable event posting */
if(_nmGdbusClient->startWifiScan())
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
plugin/gnome/gdbus/NetworkManagerGdbusProxy.cpp:223
- This backend accepts the new frequency iterator (and the existing SSID iterator) but still ignores both before starting the scan. In an
ENABLE_GNOME_GDBUSbuild, filteredStartWiFiScanrequests will return success while emitting unfiltered results; either apply the iterators to the scan/result filtering path or return a not-supported/error status when filters are provided.
uint32_t NetworkManagerImplementation::StartWiFiScan(IWIFIFrequencyIterator* const frequencies /* @in */, IStringIterator* const ssids/* @in */)
{
uint32_t rc = Core::ERROR_GENERAL;
_nmGdbusEvents->setwifiScanOptions(true); /* Enable event posting */
if(_nmGdbusClient->startWifiScan())
Reason for change: Support to scan multiple SSIDs
Test Procedure: Test wifi scan API with multiple SSIDs
Risks: Low
Signed-off-by: jincysaramma_sam@comcast.com