Skip to content

RDKEMW-19192: Implementation of handling PowerMode Change in NM plugin …#317

Merged
karuna2git merged 3 commits into
support/1.12.0from
feature/RDKEMW-19192
Jun 26, 2026
Merged

RDKEMW-19192: Implementation of handling PowerMode Change in NM plugin …#317
karuna2git merged 3 commits into
support/1.12.0from
feature/RDKEMW-19192

Conversation

@Anand73-n

Copy link
Copy Markdown
Contributor

…(#308)

Reason for change: Cherry-pick RDK-61298 to 8.4 support branch.
Test procedure: Change the PowerMode state and verify the behavior
Risks: low
Priority: P1

Signed-off-by: Anand N Anand_N@comcast.com

…308)

* RDK-61440: Implementation of handling PowerMode Change in NM plugin

Reason for change: Ctrl ntwrk state based on PowerMode transitions.
Also connectToKnownSSID does not exist in this branch and hence using
WiFiConnect with empty ssid
Test procedure: Change the PowerMode state and verify the behavior
Risks: low
Priority: P1

Signed-off-by: Anand N <Anand_N@comcast.com>
Co-authored-by: Karunakaran A <karunakaran_amirthalingam@cable.comcast.com>
Copilot AI review requested due to automatic review settings June 22, 2026 06:24
@Anand73-n Anand73-n requested a review from a team as a code owner June 22, 2026 06:24
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR backports power-mode handling into the NetworkManager plugin so networking behavior (WiFi disconnect/reconnect, scan, DHCP lease reacquire) can be coordinated with Thunder PowerManager DeepSleep transitions, while also updating CI/test scaffolding to build without the full entservices-apis stack.

Changes:

  • Introduces NetworkManagerPowerClient (Thunder IPowerManager COMRPC client) with a dedicated worker thread to process power events and send pre-change acks.
  • Wires power-mode callbacks into NetworkManagerImplementation to disconnect/reconnect WiFi around DeepSleep, optionally deactivate Ethernet pre-sleep, and attempt post-wakeup scan/DHCP renew.
  • Updates gnome/libnm implementation with Ethernet deactivation + DHCP “reacquire” via reapply, plus CI/workflow changes (PowerManager interface stub install, runner update, coverage tweaks).

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/mocks/thunder/IPowerManager.h Adds a minimal IPowerManager stub for CI builds.
plugin/NetworkManagerPowerClient.h Declares PowerManager client + callback interface and event threading model.
plugin/NetworkManagerPowerClient.cpp Implements PowerManager connection, event sinks, queueing, ack/delay behavior.
plugin/NetworkManagerImplementation.h Adds power callback inheritance, power client member, and new helpers.
plugin/NetworkManagerImplementation.cpp Creates power client and implements DeepSleep pre-change/changed handling.
plugin/gnome/NetworkManagerGnomeWIFI.h Adds Ethernet deactivate + DHCP reacquire APIs and new synchronization members.
plugin/gnome/NetworkManagerGnomeWIFI.cpp Implements Ethernet deactivate and DHCP reacquire via applied-connection reapply; serializes ops.
plugin/gnome/NetworkManagerGnomeProxy.cpp Exposes EthernetDeactivate / ReacquireDHCPLease via gnome proxy.
plugin/rdk/NetworkManagerRDKProxy.cpp Adds no-op implementations for Ethernet deactivate / DHCP reacquire on RDK.
plugin/CMakeLists.txt Links NetworkManagerPowerClient.cpp into the plugin library.
tests/l2Test/rdk/CMakeLists.txt Adds power client compilation to RDK L2 test binary.
tests/l2Test/libnm/CMakeLists.txt Adds power client compilation to libnm L2 test binary.
CMakeLists.txt Adds ENABLE_ETHERNET_CONNECTION_HANDLING option/define.
.github/workflows/* Installs the PowerManager stub header in CI; updates libnm runner to ubuntu-24.04; lcov flags tweak.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/mocks/thunder/IPowerManager.h
Comment thread plugin/NetworkManagerImplementation.cpp Outdated
Comment thread plugin/NetworkManagerImplementation.cpp
Comment thread plugin/NetworkManagerImplementation.cpp
Comment thread plugin/NetworkManagerPowerClient.cpp
Comment thread plugin/gnome/NetworkManagerGnomeWIFI.h
Reason for change: replace nullptr with empty string.
Test procedure: Change the PowerMode state and verify the behavior
Risks: low
Priority: P1

Signed-off-by: Anand N <Anand_N@comcast.com>
@karuna2git karuna2git merged commit 09ce4aa into support/1.12.0 Jun 26, 2026
7 checks passed
@karuna2git karuna2git deleted the feature/RDKEMW-19192 branch June 26, 2026 16:02
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants