RDKEMW-19192: Implementation of handling PowerMode Change in NM plugin …#317
Conversation
…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>
|
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:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
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(ThunderIPowerManagerCOMRPC client) with a dedicated worker thread to process power events and send pre-change acks. - Wires power-mode callbacks into
NetworkManagerImplementationto 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.
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>
…(#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