[Feature][S300][task-view-1920][locknet] Implementation of enhanced network locking scheme
Change-Id: I98ecadc158f0bd68c9abf4db8e3d305314e78193
diff --git a/lynq/S300/BJMTN/ap/app/zte_comm/zte_locknet/src/zctrm_locknet_main.c b/lynq/S300/BJMTN/ap/app/zte_comm/zte_locknet/src/zctrm_locknet_main.c
index 35cbc78..4a53fb0 100755
--- a/lynq/S300/BJMTN/ap/app/zte_comm/zte_locknet/src/zctrm_locknet_main.c
+++ b/lynq/S300/BJMTN/ap/app/zte_comm/zte_locknet/src/zctrm_locknet_main.c
@@ -132,8 +132,12 @@
T_zCtrm_LockListPara lockList = {0};
s_plmnList_temp_num = 0;
- for(iList = 0; iList < 20; iList++)
+ for(iList = 0; iList < 40; iList++)
{
+ if (1 == (iList % 2))
+ {
+ continue;
+ }
memset(&lockList, 0, sizeof(lockList));
retCode = cpnv_NvItemRead(AMT_LOCKNET_LIST + iList*sizeof(lockList), (UINT8 *)&lockList, sizeof(lockList));
if (EXT_SUCCESS != retCode )
@@ -214,6 +218,17 @@
slog(AT_PRINT,SLOG_ERR, "locknet_check write locknet fail\n");
}
}
+ else
+ {
+ memset(str, 0, sizeof(str));
+ cfg_get_item("reserved_value", str, sizeof(str))
+ if (0 == atoi(str))
+ {
+ cfg_set("reserved_value", "1");
+ amt_nvro_user_write(31, 2, "1");
+ cfg_save();
+ }
+ }
}
return;
diff --git a/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_sys b/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_sys
index 48c3866..7a50559 100755
--- a/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_sys
+++ b/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_sys
@@ -402,3 +402,4 @@
T3396_COUNTS=3
wefota_max_send_count=10
#for volte end
+reserved_value=0
diff --git a/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_user b/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_user
index 1ecb75c..abd95b1 100755
--- a/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_user
+++ b/lynq/S300/BJMTN/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_user
@@ -508,4 +508,3 @@
arms_device_md5=
arms_fota_version=
#for apparms end
-reserved_value=1
\ No newline at end of file
diff --git a/lynq/S300/ap/app/zte_comm/zte_locknet/src/zctrm_locknet_main.c b/lynq/S300/ap/app/zte_comm/zte_locknet/src/zctrm_locknet_main.c
index 970b9ba..e2b2534 100755
--- a/lynq/S300/ap/app/zte_comm/zte_locknet/src/zctrm_locknet_main.c
+++ b/lynq/S300/ap/app/zte_comm/zte_locknet/src/zctrm_locknet_main.c
@@ -132,8 +132,12 @@
T_zCtrm_LockListPara lockList = {0};
s_plmnList_temp_num = 0;
- for(iList = 0; iList < 20; iList++)
+ for(iList = 0; iList < 40; iList++)
{
+ if (1 == (iList % 2))
+ {
+ continue;
+ }
memset(&lockList, 0, sizeof(lockList));
retCode = cpnv_NvItemRead(AMT_LOCKNET_LIST + iList*sizeof(lockList), (UINT8 *)&lockList, sizeof(lockList));
if (EXT_SUCCESS != retCode )
@@ -214,6 +218,17 @@
slog(AT_PRINT,SLOG_ERR, "locknet_check write locknet fail\n");
}
}
+ else
+ {
+ memset(str, 0, sizeof(str));
+ cfg_get_item("reserved_value", str, sizeof(str))
+ if (0 == atoi(str))
+ {
+ cfg_set("reserved_value", "1");
+ amt_nvro_user_write(31, 2, "1");
+ cfg_save();
+ }
+ }
}
return;
diff --git a/lynq/S300/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_sys b/lynq/S300/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_sys
index cd9bec5..5b07df5 100755
--- a/lynq/S300/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_sys
+++ b/lynq/S300/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_sys
@@ -402,3 +402,4 @@
T3396_COUNTS=3
wefota_max_send_count=10
#for volte end
+reserved_value=0
diff --git a/lynq/S300/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_user b/lynq/S300/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_user
index 476ff65..79df241 100755
--- a/lynq/S300/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_user
+++ b/lynq/S300/ap/project/zx297520v3/prj_mifi_min/fs/normal/rootfs/etc_ro/default/default_parameter_user
@@ -501,4 +501,3 @@
fsfota_server_url=ftp://ftp:ftp123456@183.67.24.178:6521/FOTA/fsfota
#for fsfota end
SSIDbak=
-reserved_value=1