[Bugfix][T106][task-view-449] set oos interface modification, fast cfg
only for normal mode, full band cfg only for low power and t_fast_num =
t_num-1
Only Configure: No
Affected branch: unknown
Affected module: network
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: yes
Doc Update: yes
Change-Id: I3f6744529c7cbc2e56dda299f1041734f2e07547
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq_qser_network.h b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq_qser_network.h
index aee4285..a6c8e15 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq_qser_network.h
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq_qser_network.h
@@ -42,23 +42,25 @@
}E_QSER_NW_IMS_MODE_TYPE_T;
/** Configures the OOS (out of service) settings that define the MCM network interface. */
-#define QSER_NW_OOS_CFG_TYPE_FAST_SCAN 0x00 /**< fast net scan */
-#define QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN 0x01 /**< full band scan */
+#define QSER_NW_OOS_CFG_TYPE_FAST_SCAN 0x00 /**< fast net scan, only for normal mode */
+#define QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN 0x01 /**< full band scan, only for low power mode */
typedef struct
{
- /* Configuration parameters for MCM network fast network scan when OOS (out of service)*/
- char enable;
- uint16_t time_interval;
+ /* Configuration parameters for MCM network fast network scan when OOS (out of service) in normal mode*/
+ char enable; /*[0, 1]*/
+ uint16_t time_interval; /*[1, 65535],unit: second, valid when enable equal 1*/
}QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T;
typedef struct
{
- /* Configuration parameters for MCM network full band network scan when OOS (out of service)*/
- int t_min;
- int t_step;
- int t_num;
- int t_max;
+ /* Configuration parameters for MCM network full band network scan when OOS (out of service) in low power mode*/
+ /*t_min,t_step,t_num,t_max all are 0, or all are not 0*/
+ /*if t_min > t_max, time interval will be t_max*/
+ int t_min; /*[0, 65535], unit: second*/
+ int t_step; /*[0, 65535], unit: second*/
+ int t_num; /*[0, 65535]*/
+ int t_max; /*[0, 65535], unit: second*/
}QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T;
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
index 3e55731..c10be55 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
@@ -1946,22 +1946,25 @@
}
-int lynq_set_oos_net_scan_cfg_full_band(int t_full_band_min, int t_full_band_step, int t_full_band_num, int t_full_band_max)
+int lynq_set_oos_net_scan_cfg_full_band(int t_full_band_min, int t_full_band_step, int t_full_band_num, int t_full_band_max, int t_full_band_fast_num)
{
if(! (
- (t_full_band_min==0 && t_full_band_step ==0 && t_full_band_num ==0 && t_full_band_max ==0) ||
+ (t_full_band_min==0 && t_full_band_step ==0 && t_full_band_num ==0 && t_full_band_max ==0 && t_full_band_fast_num==0) ||
(t_full_band_min > 0 && t_full_band_min <= 65535 &&
t_full_band_step > 0 && t_full_band_step <= 65535 &&
t_full_band_num > 0 && t_full_band_num <= 65535 &&
- t_full_band_max > 0 && t_full_band_max <= 65535 )
+ t_full_band_max > 0 && t_full_band_max <= 65535 &&
+ t_full_band_fast_num >=0 && t_full_band_fast_num < t_full_band_num)
) )
{
- LYERRLOG("%s paramter %d %d %d %d error!",__func__, t_full_band_min, t_full_band_step, t_full_band_num, t_full_band_max);
+ LYERRLOG("%s paramter %d %d %d %d %d error!",__func__, t_full_band_min, t_full_band_step, t_full_band_num, t_full_band_max, t_full_band_fast_num);
return LYNQ_E_PARAMETER_ANONALY;
}
Parcel* p=NULL;
- int ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_OEM_HOOK_RAW,1,"%s,%d,%d,%d,%d","AT+ZSET=\"SLEEP_FREQ_SCAN\"",t_full_band_min,t_full_band_step,t_full_band_num,t_full_band_max);
+
+ int ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_OEM_HOOK_RAW,1,"%s,%d,%d,%d,%d,%d","AT+ZSET=\"SLEEP_FREQ_SCAN\"",t_full_band_min,t_full_band_step,t_full_band_num,t_full_band_max,t_full_band_fast_num);
+
if(ret!=RESULT_OK)
{
@@ -1971,7 +1974,7 @@
ret=get_ret_code_for_hook(p);
- LYINFLOG("%s %d %d %d %d ret is %d",__func__,t_full_band_min,t_full_band_step,t_full_band_num,t_full_band_max,ret);
+ LYINFLOG("%s %d %d %d %d %d ret is %d",__func__,t_full_band_min,t_full_band_step,t_full_band_num,t_full_band_max,t_full_band_fast_num,ret);
delete p;
return ret;
}
@@ -1992,12 +1995,12 @@
ret=GetIntArrayInRespString(p,"SLEEP_FREQ_SCAN",int_array_in_resp,&valid_num);
- if(ret==RESULT_OK && valid_num > 1)
+ if(ret==RESULT_OK && valid_num > 3)
{
*t_full_band_min = int_array_in_resp[0];
*t_full_band_step = int_array_in_resp[1];
*t_full_band_num = int_array_in_resp[2];
- *t_full_band_max = int_array_in_resp[3];
+ *t_full_band_max = int_array_in_resp[3];
}
else
{
@@ -2276,13 +2279,12 @@
}
else if (config_list[0] == OOS_NET_SCAN_CFG_TYPE_FULL_BAND)
{
- if(valid_num <5 )
- {
-
+ if(valid_num <6 )
+ {
LYERRLOG("%s paramter valid_num %d error!",__func__, valid_num);
return LYNQ_E_PARAMETER_ANONALY;
- }
- return lynq_set_oos_net_scan_cfg_full_band(config_list[1],config_list[2],config_list[3],config_list[4]);
+ }
+ return lynq_set_oos_net_scan_cfg_full_band(config_list[1],config_list[2],config_list[3],config_list[4],config_list[5]);
}
else
{
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/include/lynq_qser_network.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/include/lynq_qser_network.h
index b5abbc7..1f3063c 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/include/lynq_qser_network.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/include/lynq_qser_network.h
@@ -42,23 +42,25 @@
}E_QSER_NW_IMS_MODE_TYPE_T;
/** Configures the OOS (out of service) settings that define the MCM network interface. */
-#define QSER_NW_OOS_CFG_TYPE_FAST_SCAN 0x00 /**< fast net scan */
-#define QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN 0x01 /**< full band scan */
+#define QSER_NW_OOS_CFG_TYPE_FAST_SCAN 0x00 /**< fast net scan, only for normal mode */
+#define QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN 0x01 /**< full band scan, only for low power mode */
typedef struct
{
- /* Configuration parameters for MCM network fast network scan when OOS (out of service)*/
- char enable;
- uint16_t time_interval;
+ /* Configuration parameters for MCM network fast network scan when OOS (out of service) in normal mode*/
+ char enable; /*[0, 1]*/
+ uint16_t time_interval; /*[1, 65535],unit: second, valid when enable equal 1*/
}QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T;
typedef struct
{
- /* Configuration parameters for MCM network full band network scan when OOS (out of service)*/
- int t_min;
- int t_step;
- int t_num;
- int t_max;
+ /* Configuration parameters for MCM network full band network scan when OOS (out of service) in low power mode*/
+ /*t_min,t_step,t_num,t_max all are 0, or all are not 0*/
+ /*if t_min > t_max, time interval will be t_max*/
+ int t_min; /*[0, 65535], unit: second*/
+ int t_step; /*[0, 65535], unit: second*/
+ int t_num; /*[0, 65535]*/
+ int t_max; /*[0, 65535], unit: second*/
}QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T;
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
index 82a1b8f..bdf4caa 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
@@ -404,8 +404,16 @@
config_list[2]=pt_info->u.full_band_scan_info.t_step;
config_list[3]=pt_info->u.full_band_scan_info.t_num;
config_list[4]=pt_info->u.full_band_scan_info.t_max;
- return lynq_set_oos_net_scan_cfg(config_list, 5);
- }
+ if(pt_info->u.full_band_scan_info.t_num > 0)
+ {
+ config_list[5]=pt_info->u.full_band_scan_info.t_num-1;
+ }
+ else
+ {
+ config_list[5]=0;
+ }
+ return lynq_set_oos_net_scan_cfg(config_list, 6);
+ }
else
{
LYERRLOG("invalid client parameters %d incoming", pt_info->type);