SHARMAN-4192 : Eco mode is not not working in 6.3 SDK - #1318
Open
umasankar098 wants to merge 1 commit into
Open
Conversation
Reason for change: Test Procedure: Enable and disable eco mode Risks: low Priority: P0 Signed-off-by: usi096 <umasankar.srinivasan@sky.uk>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses Eco mode not working in the 6.3 SDK by ensuring the device reboot path is invoked in a scheduler-friendly way while recording an explicit reboot reason.
Changes:
- Exposes
reboot_device()inwifi_ctrl.hand updates its signature toint (*)(void*)to match the scheduler callback contract. - Updates
reboot_device()implementation to accept a generic argument and adds a debug log before setting reboot reason + triggering reboot via bus. - Changes EcoMode flow to schedule the reboot via
scheduler_add_timer_task()instead of callingreboot_device()directly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| source/core/wifi_ctrl.h | Adds reboot_device(void*) prototype for use as a scheduler callback. |
| source/core/wifi_ctrl.c | Updates reboot_device() signature/body for scheduled invocation and adds logging. |
| source/core/wifi_ctrl_webconfig.c | Schedules the EcoMode reboot via the scheduler instead of direct invocation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| system("systemctl restart onewifi.service"); | ||
| #else | ||
| reboot_device(ctrl); | ||
| scheduler_add_timer_task(ctrl->sched, TRUE, NULL, reboot_device, ctrl, 0, 1, TRUE); |
Comment on lines
+208
to
212
| wifi_util_dbg_print(WIFI_WEBCONFIG, | ||
| "%s : Setting the reboot reason as ECO Mode Reboot and rebooting the device\n", __FUNCTION__); | ||
| rc = get_bus_descriptor()->bus_set_string_fn(&ctrl->handle, | ||
| "Device.DeviceInfo.X_RDKCENTRAL-COM_LastRebootReason", "ECO Mode Reboot"); | ||
| if (rc != bus_error_success) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change:
Test Procedure: Enable and disable eco mode
Risks: low
Priority: P0