[Bugfix][T108][bug-view-1630]The problem where the repair nw_power_mode is set to 1 and the query is -1
Only Configure: No
Affected branch: GSW_V1453
Affected module: autosuspend
Is it affected on IC: only ASR
Self-test: yes
Doc Update: no
Change-Id: I00676cc2971c968157d8977b5d77f7be04df6d4b
diff --git a/mbtk/libgsw_lib/gsw_nw_interface.c b/mbtk/libgsw_lib/gsw_nw_interface.c
index e59e24b..76cff99 100755
--- a/mbtk/libgsw_lib/gsw_nw_interface.c
+++ b/mbtk/libgsw_lib/gsw_nw_interface.c
@@ -2230,8 +2230,8 @@
int gsw_nw_power_mode = 0;
int gsw_network_set_power_mode(char mode)
{
- //int ret = -1;
- if (nw_init_flag == 0 || nw_info_handle == NULL)
+ int ret = -1;
+ if (nw_init_flag == 0)//nw_info_handle == NULL Don't need
{
return GSW_HAL_NORMAL_FAIL;
}
@@ -2246,13 +2246,13 @@
gsw_nw_power_mode = 3;
else
gsw_nw_power_mode = 1;
- LOGE("mode is %d\n",gsw_nw_power_mode);
- // ret = mbtk_wakeup_state_set(nw_info_handle, gsw_nw_power_mode);
- // if(ret != 0)
- // {
- // LOGE("mbtk_wakeup_state_set fail\n");
- // return GSW_HAL_NORMAL_FAIL;
- // }
+ LOGE("mode is %d\n",gsw_nw_power_mode);
+ ret = mbtk_wakeup_state_set(nw_info_handle, gsw_nw_power_mode);
+ if(ret != 0)
+ {
+ LOGE("mbtk_wakeup_state_set fail\n");
+ return GSW_HAL_NORMAL_FAIL;
+ }
return GSW_HAL_SUCCESS;