Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion source/core/wifi_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,13 @@ unsigned int selfheal_event_publish_time(void)
return atoi(buff) ? atoi(buff) : 1;
}

int reboot_device(wifi_ctrl_t *ctrl)
int reboot_device(void* arg)
{
wifi_ctrl_t *ctrl = (wifi_ctrl_t *)arg;
bus_error_t rc;

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) {
Expand Down
1 change: 1 addition & 0 deletions source/core/wifi_ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ int publish_endpoint_enable(void);
int get_mld_mac_from_link_mac(mac_address_t in_addr, mac_address_t mld_addr);
void hotspot_timing_start(void);
void hotspot_timing_stop(void);
int reboot_device(void* arg);
#if defined(CONFIG_IEEE80211BE) && !defined(CONFIG_GENERIC_MLO)
unsigned int update_mld_groups(webconfig_subdoc_decoded_data_t *data,
char **vap_names, unsigned int vap_names_size, wifi_dbg_type_t log_type);
Expand Down
2 changes: 1 addition & 1 deletion source/core/wifi_ctrl_webconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,7 @@ void ecomode_telemetry_update_and_reboot(unsigned int index, bool active)
}
system("systemctl restart onewifi.service");
#else
reboot_device(ctrl);
scheduler_add_timer_task(ctrl->sched, TRUE, NULL, reboot_device, ctrl, 0, 1, TRUE);
#endif
}
#endif // defined (FEATURE_SUPPORT_ECOPOWERDOWN)
Expand Down
Loading