Merge "[Feature][CODEC]CODEC 8311 Turning on I2S Pin Control and Optimizing Audio Recording Results in TDM Mode"
diff --git a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/zx297520v3-mdl-devices.c b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/zx297520v3-mdl-devices.c
index 74cba0d..e0ad7ac 100755
--- a/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/zx297520v3-mdl-devices.c
+++ b/ap/os/linux/linux-3.4.x/arch/arm/mach-zx297520v3/zx297520v3-mdl-devices.c
@@ -1406,8 +1406,7 @@
};
#else
int ts_temp_value_table[TS_ADC_TEMP_NUMBER][TS_ADC_TEMP_VOLTAGE_NUMBER]={
-{
- -45,-44,-43,-42,-41,
+{
-40,-39,-38,-37,-36, -35,-34,-33,-32,-31,
-30,-29,-28,-27,-26, -25,-24,-23,-22,-21,
-20,-19,-18,-17,-16, -15,-14,-13,-12,-11,
@@ -1427,24 +1426,23 @@
120,121,122,123,124,125},
{
-5849,5842,5835,5828,5821,
-5814,5807,5800,5794,5787,5780,5770,5761,5751,5742,
-5732,5720,5707,5695,5682,5670,5654,5638,5623,5607,
-5591,5571,5550,5530,5509,5489,5461,5432,5404,5375,
-5347,5318,5290,5261,5233,5204,5179,5154,5129,5104,
-5079,5040,5001,4961,4922,4883,4838,4794,4749,4705,
-4660,4618,4576,4534,4492,4450,4416,4383,4349,4316,
-4282,4238,4193,4149,4104,4060,4015,3971,3926,3882,
-3837,3798,3759,3719,3680,3641,3603,3565,3526,3488,
-3450,3419,3387,3356,3324,3293,3262,3232,3201,3171,
-3140,3112,3085,3057,3030,3002,2978,2954,2931,2907,
-2883,2862,2841,2819,2798,2777,2759,2740,2722,2703,
-2685,2669,2653,2636,2620,2604,2590,2575,2561,2546,
-2532,2520,2508,2495,2483,2471,2461,2451,2442,2432,
-2422,2414,2406,2398,2390,2380,2373,2366,2359,2352,
-2345,2339,2333,2327,2321,2315,2310,2305,2300,2295,
-2290,2286,2282,2278,2274,2270,2267,2264,2261,2258,
-2255,2254,2253,2252,2251,2250 }
+5753,5743,5732,5721,5709,5697,5684,5671,5658,5643,
+5629,5614,5598,5581,5564,5547,5529,5510,5491,5471,
+5450,5429,5407,5385,5362,5338,5314,5289,5263,5237,
+5211,5183,5155,5127,5097,5068,5037,5007,4975,4944,
+4912,4879,4846,4813,4779,4745,4710,4676,4641,4605,
+4570,4534,4498,4462,4426,4389,4353,4317,4280,4244,
+4207,4171,4135,4099,4063,4027,3992,3956,3921,3886,
+3851,3817,3783,3749,3716,3683,3650,3618,3587,3555,
+3524,3494,3464,3434,3405,3376,3348,3320,3292,3265,
+3239,3213,3188,3163,3138,3114,3091,3068,3045,3023,
+3001,2980,2960,2940,2920,2901,2883,2864,2847,2829,
+2812,2796,2779,2763,2748,2733,2718,2704,2690,2676,
+2662,2649,2637,2624,2612,2601,2589,2578,2567,2556,
+2546,2536,2526,2516,2507,2498,2489,2480,2471,2463,
+2455,2447,2440,2432,2425,2418,2411,2404,2398,2391,
+2385,2379,2373,2367,2362,2356,2351,2346,2341,2336,
+2331,2326,2322,2317,2313,2309}
};
#endif
volatile u32 ts_adc_flag=3;// 1:adc1; 2:adc2, other:adc rf;
diff --git a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/aicwf_sdio.c b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/aicwf_sdio.c
index 177bb92..95c40dc 100755
--- a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/aicwf_sdio.c
+++ b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/aicwf_sdio.c
@@ -2062,7 +2062,7 @@
struct mmc_host *host;
u8 byte_mode_disable = 0x1;//1: no byte mode
int ret = 0;
- uint32_t sdio_clock = 100000000;
+ uint32_t sdio_clock = 78000000; //zw.wang WiFi low temperature -40 degrees failure on 20240716
u8 val;
u8 val1 = 0;
//struct aicbsp_feature_t feature;
diff --git a/ap/os/linux/linux-3.4.x/drivers/soc/zte/tsc/zx-tsc.h b/ap/os/linux/linux-3.4.x/drivers/soc/zte/tsc/zx-tsc.h
index cad1254..aec0eb1 100755
--- a/ap/os/linux/linux-3.4.x/drivers/soc/zte/tsc/zx-tsc.h
+++ b/ap/os/linux/linux-3.4.x/drivers/soc/zte/tsc/zx-tsc.h
@@ -206,7 +206,7 @@
//#define TS_ADC_TEMP_NUMBER 2
//#define TS_ADC_TEMP_VOLTAGE_NUMBER 110
#define TS_TEMP_NUMBER_SMALLEST 0
-#define TS_TEMP_NUMBER_BIGGEST 171
+#define TS_TEMP_NUMBER_BIGGEST 166
#define TEMP_PERCENT_INTERVAL (10) //ζȰٷֱȼä¸ô
diff --git a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.c b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.c
index eab1ea0..ea72d9e 100755
--- a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.c
+++ b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.c
@@ -128,7 +128,7 @@
struct multi_packet{
volatile int maxPacketNum;
-
+ volatile int bindedMaxPacketNum;
unsigned int active;
struct usb_gadget *gadget;
@@ -1468,6 +1468,12 @@
return multiPacket.maxPacketNum;
}
+void multi_packet_set_actual_maxnum(int max_packet_num)
+{
+ multiPacket.maxPacketNum = max_packet_num;
+ multiPacket.bind.maxPacketNum = max_packet_num;
+ multiPacket.unbind.maxPacketNum = max_packet_num;
+}
void multi_packet_activate(void)
{
@@ -1501,6 +1507,7 @@
{
int retval = 0;
unsigned long flags;
+ struct multi_packet *multiPkt = &multiPacket;
struct sk_buff *skb = (struct sk_buff *)req->context;
ep->is_netep = 1;
int bind_th_state = 0;
@@ -1510,7 +1517,10 @@
//req->dma = virt_to_phys(req->buf);
//retval = usb_gadget_map_request(multiPacket.gadget, req, 1);
//dma_sync_single_for_device();
- ep->protocol_type = 2;
+ if(strcmp(multiPkt->geth->func.name,RNDIS_NAME_STR) == 0)
+ ep->protocol_type = 1;
+ else
+ ep->protocol_type = 2;
retval = usb_ep_queue(ep, req, gfp_flags);
}
else
@@ -1586,12 +1596,16 @@
{
int retval = 0;
unsigned long flags;
-
+ struct multi_packet *multiPkt = &multiPacket;
ep->is_netep = 1;
if(multi_packet_get_maxnum() <=1 )
{
///retval = usb_gadget_map_request(multiPacket.gadget, req, 0);
- ep->protocol_type = 2;
+ //ep->protocol_type = 2;
+ if(strcmp(multiPkt->geth->func.name,RNDIS_NAME_STR) == 0)
+ ep->protocol_type = 1;
+ else
+ ep->protocol_type = 2;
retval = usb_ep_queue(ep, req, gfp_flags);
}
else
@@ -1776,6 +1790,16 @@
multiPkt->trans_buffer_size = 0 ;
}
+void set_rndis_wrap_unwrap_header()
+{
+ struct multi_packet *multiPkt = &multiPacket;
+ if(multiPkt->maxPacketNum > 1)
+ {
+ multiPkt->geth->ioport->wrap = NULL;
+ multiPkt->geth->ioport->unwrap = NULL;
+ }
+}
+
int multi_packet_buf_alloc()
{
struct multi_packet *multiPkt = &multiPacket;
@@ -1829,6 +1853,7 @@
struct usb_multi_packet *pbind = &multiPacket.bind;
struct usb_multi_packet *punbind = &multiPacket.unbind;
multiPkt->maxPacketNum = get_vnic_multi_packet_num();
+ multiPkt->bindedMaxPacketNum = multiPkt->maxPacketNum;
#if 1
size_t alloc_req_size = (multiPkt->maxPacketNum + PACKET_BUF_EXTRA_NUM) * sizeof(struct usb_request *) ;
@@ -1873,20 +1898,22 @@
usb_multi_pkt_init(pbind, 1);
pbind->thread = kthread_run(usbBind_thread, pbind, "usbbind_thread");
BUG_ON(IS_ERR(pbind->thread));
+#if 0
if(strcmp(geth->func.name,RNDIS_NAME_STR)==0)
{
geth->wrap = NULL;
}
#endif
+#endif
pbind->maxPacketNum = multiPkt->maxPacketNum ;
punbind->maxPacketNum = multiPkt->maxPacketNum ;
-
+#if 0
if(strcmp(geth->func.name,RNDIS_NAME_STR) == 0)
{
geth->unwrap = NULL;
}
-
+#endif
//ÅжÏÍø¿¨ÀàÐÍ
printk("$$$$$$$geth->func.name = %s \n",geth->func.name) ;
if(strcmp(geth->func.name,RNDIS_NAME_STR) == 0)
@@ -1931,19 +1958,22 @@
USBSTACK_DBG("multi-pkt exit begin!");
- if(multiPacket.maxPacketNum>1)
+ if(multiPacket.maxPacketNum>1 || multiPacket.bindedMaxPacketNum > 1)
{
#ifndef RNDIS_DL_MULTI_DESC
USBSTACK_DBG("kill bind thread");
kthread_stop(pbind->thread);
- usb_mutli_pkt_exit(pbind, 1);
+ if (multiPacket.maxPacketNum > 1)
+ usb_mutli_pkt_exit(pbind, 1);
#endif
USBSTACK_DBG("kill unbind thread");
kthread_stop(punbind->thread);
- usb_mutli_pkt_exit(punbind, 0);
+ if (multiPacket.maxPacketNum > 1)
+ usb_mutli_pkt_exit(punbind, 0);
}
multiPacket.maxPacketNum = 0;
+ multiPacket.bindedMaxPacketNum = 0;
if(multiPacket.alloc_mem != NULL)
{
kfree(multiPacket.alloc_mem);
diff --git a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.h b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.h
index c9ebd1d..4197f94 100644
--- a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.h
+++ b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.h
@@ -8,6 +8,9 @@
#define MULTIPACKET_BUF_ALLOC 1
int multi_packet_get_maxnum(void);
+void multi_packet_set_actual_maxnum(int max_packet_num);
+void set_rndis_wrap_unwrap_header(void);
+
typedef void (*usb_complete_t)(struct usb_ep *ep, struct usb_request *req);
int multi_packet_tx_queue(struct usb_ep *ep, struct usb_request *req, gfp_t gfp_flags);
diff --git a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/rndis.c b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/rndis.c
index e2d2e3b..d72d333 100755
--- a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/rndis.c
+++ b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/rndis.c
@@ -58,6 +58,12 @@
#define rndis_debug 0
#endif
extern unsigned int get_panic_flag(void);
+extern int get_vnic_multi_packet_num(void);
+extern void multi_packet_set_actual_maxnum(int max_packet_num);
+extern void set_rndis_wrap_unwrap_header(void);
+
+
+
#define RNDIS_MAX_CONFIGS 1
extern void usb_notify_up(usb_notify_event notify_type, void* puf);
@@ -585,6 +591,8 @@
{
rndis_init_cmplt_type *resp;
rndis_resp_t *r;
+ int pc_expect_max_packet_num = 0;
+ int max_multi_packet_num = get_vnic_multi_packet_num();
struct rndis_params *params = rndis_per_dev_params + configNr;
if (!params->dev)
@@ -605,8 +613,16 @@
resp->Medium = cpu_to_le32(RNDIS_MEDIUM_802_3);
#if 1
- resp->MaxPacketsPerTransfer = cpu_to_le32(multi_packet_get_maxnum());//cpu_to_le32(1);
- resp->MaxTransferSize = 1568*multi_packet_get_maxnum();
+ pc_expect_max_packet_num = le32_to_cpu(buf->MaxTransferSize) / 1568;
+ if (pc_expect_max_packet_num > max_multi_packet_num)
+ pc_expect_max_packet_num = max_multi_packet_num;
+ resp->MaxPacketsPerTransfer = cpu_to_le32(pc_expect_max_packet_num);
+ resp->MaxTransferSize = 1568*pc_expect_max_packet_num;
+ multi_packet_set_actual_maxnum(pc_expect_max_packet_num);
+ set_rndis_wrap_unwrap_header();
+
+ //resp->MaxPacketsPerTransfer = cpu_to_le32(multi_packet_get_maxnum());//cpu_to_le32(1);
+ //resp->MaxTransferSize = 1568*multi_packet_get_maxnum();
#else
resp->MaxPacketsPerTransfer = cpu_to_le32(1);
resp->MaxTransferSize = cpu_to_le32(
diff --git a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/u_serial.c b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/u_serial.c
index 461af0a..09507a5 100644
--- a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/u_serial.c
+++ b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/u_serial.c
@@ -152,9 +152,9 @@
} ports[N_PORTS];
static unsigned n_ports;
static int inform_state = 0;
-
-#define GS_CLOSE_TIMEOUT 15 /* seconds */
-
+//xf.li@20240719 modify for youwei get_sim_status slowly start
+#define GS_CLOSE_TIMEOUT 1 /* seconds */
+//xf.li@20240719 modify for youwei get_sim_status slowly end
#ifdef VERBOSE_DEBUG
#define pr_vdebug(fmt, arg...) \
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
index 8400655..0bea4fc 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
@@ -455,6 +455,9 @@
#cz.li@20240221 add for MOBILETEK_GNSS_UPDATE_ENABLE value: "yes","no"
MOBILETEK_GNSS_UPDATE_ENABLE = "no"
+#xf.li@20240716 add for MOBILETEK_LOG_ENCRYPT value: "enable","disable"
+MOBILETEK_LOG_ENCRYPT = "disable"
+
LYNQ_CONFIG_COMMITID = "e2a3410390ff0ad762462ccb6af8faa5e16dcd61"
LYNQ_CONFIG_VERSION = "T106_ap_version_cap_0425"
LYNQ_CONFIG_SW_VERSION = "T106_ap_version_MR3.02b06.00"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb
index b9d6b78..f15ad14 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb
@@ -256,7 +256,17 @@
${@bb.utils.contains("DISTRO_FEATURES", "oemfs", "do_oemfs_oemdata;", "", d)} \
${@bb.utils.contains("IMAGE_FSTYPES", "squashfs", "do_rootfs_squashfs;", "", d)} \
"
-
+#xf.li@20240716 add start
+do_oem_config() {
+ if [ "${MOBILETEK_LOG_ENCRYPT}" = "enable" ]; then
+ touch ${IMAGE_ROOTFS}/etc/syslog_encrypt_flag
+ else
+ rm -rf ${IMAGE_ROOTFS}/etc/syslog_encrypt_flag
+ touch ${IMAGE_ROOTFS}/etc/no_log_encrypt
+ fi
+}
+addtask do_oem_config after do_rootfs before do_image
+#xf.li@20240716 add end
addtask cprootfs after do_dm_verity before do_build
addtask do_dm_verity after do_image_complete before do_build
addtask cleanrootfs after do_clean before do_cleansstate
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp
index 23bb8e4..5fff5eb 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-fota-backup/files/lynq-fota-backup.cpp
@@ -32,6 +32,7 @@
#define FOTA_SYNC_FLAG 1
#define FOTA_CURRENT_SYS "/mnt/userdata/.fota_current_sys"
+#define USER_LOG_TAG "LYNQ_FOTA_BACKUP"
extern int lynq_sync_system();
extern int lynq_fota_get_addr_value(char *tmp_value);
@@ -49,7 +50,7 @@
fp = fopen(FOTA_REBOOT_FLAG,"w+");
if(fp == NULL)
{
- printf("Open reboot flag file failed\n");
+ LYERRLOG("Open reboot flag file failed\n");
return;
}
@@ -70,33 +71,34 @@
//not fota
if(access(FOTA_FLAG_FILE, F_OK) == -1)
{
- printf("Fota flag file no exist\n");
+ LYINFLOG("Fota flag file no exist\n");
//file no exist,get current sys write to file
if(access(FOTA_CURRENT_SYS,F_OK) == -1)
{
- printf("Record current sys file no exist\n");
+ LYINFLOG("Record current sys file no exist\n");
fp = fopen(FOTA_CURRENT_SYS,"w");
if(fp == NULL)
{
- printf("creat record current file failed\n");
+ LYERRLOG("creat record current file failed\n");
return -1;
}
current_sys = lynq_get_current_system();
if(current_sys < 0)
{
- printf("Get current system failed %d\n",current_sys);
+ LYERRLOG("Get current system failed %d\n",current_sys);
fclose(fp);
return -1;
}
else
{
- printf("Get current system success %d\n",current_sys);
+ LYINFLOG("Get current system success %d\n",current_sys);
fprintf(fp, "%d", current_sys);
- system("sync");
fclose(fp);
+ system("sync");
+
return 0;
}
}
@@ -105,16 +107,16 @@
current_sys = lynq_get_current_system();
if(current_sys < 0)
{
- printf("Get current system failed %d\n",current_sys);
+ LYERRLOG("Get current system failed %d\n",current_sys);
return -1;
}
- printf("Get current system success %d\n",current_sys);
+ LYINFLOG("Get current system success %d\n",current_sys);
fp = fopen(FOTA_CURRENT_SYS,"r");
if(fp == NULL)
{
- printf("read file failed \n");
+ LYERRLOG("read file failed \n");
return -1;
}
@@ -124,37 +126,39 @@
}
else
{
- printf("tmp_sys is NULL");
+ LYERRLOG("tmp_sys is NULL");
fclose(fp);
return -1;
}
if( record_sys == current_sys)
{
- printf("System not need sync \n");
+ LYINFLOG("System not need sync \n");
fclose(fp);
return 0;
}
else
{
- fp = fopen(FOTA_CURRENT_SYS,"w");
- if(fp == NULL)
- {
- printf("creat file failed \n");
- return -1;
- }
-
- printf("System need sync \n");
- fprintf(fp,"%d",current_sys);
- system("sync");
- fclose(fp);
+ LYINFLOG("System need sync \n");
ret = lynq_sync_system();
if(ret < 0 )
{
- printf("A/B sync system failed \n");
+ LYERRLOG("A/B sync system failed \n");
return -1;
}
- printf("A/B sync system success \n");
+ LYINFLOG("A/B sync system success,record current sys \n");
+ fp = fopen(FOTA_CURRENT_SYS,"w");
+ if(fp == NULL)
+ {
+ LYERRLOG("creat file failed \n");
+ return -1;
+ }
+
+ fprintf(fp,"%d",current_sys);
+ fclose(fp);
+ system("sync");
+
+
return 0;
}
}
@@ -166,20 +170,20 @@
fp = fopen(FOTA_CURRENT_SYS,"w");
if(fp == NULL)
{
- printf("Creat file failed \n");
+ LYERRLOG("Creat file failed \n");
return -1;
}
- printf("fota flag file exist,record current sys \n");
+ LYINFLOG("fota flag file exist,record current sys \n");
current_sys = lynq_get_current_system();
if(current_sys < 0)
{
- printf("Get current system failed %d\n",current_sys);
+ LYERRLOG("Get current system failed %d\n",current_sys);
return -1;
}
fprintf(fp,"%d",current_sys);
- system("sync");
fclose(fp);
+ system("sync");
return 0;
}
@@ -198,7 +202,7 @@
fp = fopen(FOTA_FLAG_FILE,"r");
if(fp == NULL)
{
- printf("No need fota sync\n");
+ LYERRLOG("No need fota sync\n");
return -1;
}
@@ -213,7 +217,7 @@
ret = lynq_sync_system();
if(ret != 0)
{
- printf("sync faild\n");
+ LYERRLOG("sync faild\n");
}
system("rm -rf /mnt/userdata/.back_up_flag");
@@ -223,20 +227,20 @@
ret = lynq_fota_get_addr_value(tmp_addr);
if(ret != 0)
{
- printf("Get addr failed\n");
+ LYERRLOG("Get addr failed\n");
return -1;
}
- printf("tmp_addr is %s\n",tmp_addr);
+ LYINFLOG("tmp_addr is %s\n",tmp_addr);
ret = lynq_fota_set_addr_value(tmp_addr,10);
if(ret != 0)
{
- printf("Set addr failed\n");
+ LYERRLOG("Set addr failed\n");
return -1;
}
ret = lynq_fota_nrestart();
if(ret != 0)
{
- printf("Upgrade failed\n");
+ LYERRLOG("Upgrade failed\n");
return -1;
}
@@ -245,6 +249,7 @@
return 0;
}
+DEFINE_LYNQ_LIB_LOG(LYNQ_FOTA_BACKUP)
#ifdef __cplusplus
}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/files/lynq-wifi-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/files/lynq-wifi-demo.cpp
index c116e65..949c1f3 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/files/lynq-wifi-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/files/lynq-wifi-demo.cpp
@@ -13,6 +13,7 @@
#include <syslog.h>
#include <pthread.h>
+#include <include/lynq-qser-autosuspend.h>
#include <include/lynq-qser-wifi.h>
void lynq_wifi_event_handle_demo(lynq_wifi_event_s *event, void *arg)
@@ -51,6 +52,12 @@
int main(int argc, char *argv[])
{
+ int num = qser_wakelock_create("wifi_lock", 10);
+ if(num < 0)
+ {
+ printf("wakelock create fail\n");
+ printf("num=%d\n", num);
+ }
lynq_wifi_ap_index_e type;
if (strcmp(argv[0], "lynq-wifi-demo") == 0)
type = LYNQ_WIFI_AP_INDEX_AP0; // 2.4G
@@ -63,6 +70,18 @@
qser_wifi_enable(); // enable wifi
qser_wifi_ap_stop(type); // Disable ap mode for 2.4G/5G
qser_wifi_disable(); // Turn off WiFi
+ int ret = qser_wakelock_unlock(num);
+ if(ret != 0)
+ {
+ printf("wakelock unlock fail\n");
+ printf("ret=%d\n", ret);
+ }
+ ret = qser_wakelock_destroy(num);
+ if(ret != 0)
+ {
+ printf("wakelock destroy fail\n");
+ printf("ret=%d\n", ret);
+ }
}
else if (strcmp(argv[1], "1") == 0) //Load WiFi and turn on WiFi
{
@@ -93,6 +112,12 @@
}
qser_wifi_ap_auth_set(type, LYNQ_WIFI_AUTH_WPA2_PSK, pw); // Set the authentication of 2.4G/5G to wpa2 and the password to lynq123456
qser_wifi_ap_start(type); // Set the ap mode of 2.4G/5G
+ int ret = qser_wakelock_lock(num);
+ if(ret != 0)
+ {
+ printf("wakelock lock fail\n");
+ printf("ret=%d\n", ret);
+ }
}
else if (strcmp(argv[1], "2") == 0) //Callback query that only covers WiFi as an ap
{
@@ -195,7 +220,12 @@
qser_wifi_sta_start();
qser_wifi_sta_start_scan(); // When this function is executed once, sta's scan is called once
memset(cmdstr, 0, sizeof(cmdstr));
-
+ ret = qser_wakelock_lock(num);
+ if(ret != 0)
+ {
+ printf("wakelock lock fail\n");
+ printf("ret=%d\n", ret);
+ }
while (1)
{
printf("[lynq-wifi-demo]Enter the ssid and password as shown in the following example:ssid auth paris pw ||sta_pkt_get ||sta_param_get || sta_scan ||sta_stop\n");
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/files/makefile b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/files/makefile
index bac0c42..e3ec151 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/files/makefile
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/files/makefile
@@ -29,6 +29,7 @@
-lstdc++ \
-lpthread \
-llynq-qser-wifi \
+ -llynq-qser-autosuspend \
SOURCES = lynq-wifi-demo.cpp
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/lynq-wifi-demo.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/lynq-wifi-demo.bb
index 2b48617..ffd0288 100644
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/lynq-wifi-demo.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-wifi-demo/lynq-wifi-demo.bb
@@ -8,6 +8,7 @@
file://makefile \
"
DEPENDS += "liblynq-qser-wifi"
+DEPENDS += "liblynq-qser-autosuspend"
SRC-DIR = "${S}/../lynq-wifi-demo"
FILES_${PN} += "${bindir}/"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-core/busybox/busybox/busybox-1.33.1/0103-syslogd-data-encryption.patch b/cap/zx297520v3/sources/meta-zxic/recipes-core/busybox/busybox/busybox-1.33.1/0103-syslogd-data-encryption.patch
new file mode 100755
index 0000000..32a47fa
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-core/busybox/busybox/busybox-1.33.1/0103-syslogd-data-encryption.patch
@@ -0,0 +1,32 @@
+From 8e37145dcc28a46f9c1ebc85c8c2df269635677c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=E5=AE=8B=E4=BA=91=E9=9C=9E0318000489?=
+ <song.yunxia@sanechips.com.cn>
+Date: Thu, 18 Apr 2024 21:40:23 +0800
+Subject: [PATCH] syslogd data encryption
+
+---
+ sysklogd/syslogd.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+ mode change 100644 => 100755 sysklogd/syslogd.c
+
+diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
+old mode 100644
+new mode 100755
+index 76c0991..ca7cef8
+--- a/sysklogd/syslogd.c
++++ b/sysklogd/syslogd.c
+@@ -695,7 +695,12 @@ static void log_locally(time_t now, char *msg, logFile_t *log_file)
+ struct flock fl;
+ #endif
+ int len = strlen(msg);
++ int index;
+
++ if(access("/etc/syslog_encrypt_flag", F_OK) == 0){
++ for(index = 0; index < len; index++)
++ msg[index] ^= 1;
++ }
+ /* fd can't be 0 (we connect fd 0 to /dev/log socket) */
+ /* fd is 1 if "-O -" is in use */
+ if (log_file->fd > 1) {
+--
+2.17.1
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-core/busybox/busybox_1.33.1.bb b/cap/zx297520v3/sources/meta-zxic/recipes-core/busybox/busybox_1.33.1.bb
index 82866eb..a0e8bef 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-core/busybox/busybox_1.33.1.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-core/busybox/busybox_1.33.1.bb
@@ -59,6 +59,7 @@
SRC_URI += "file://busybox-1.33.1/0101-zxic-bb_get_chunk_from_file-limit-10MB.patch"
#SRC_URI += "file://busybox-1.33.1/0102-zxic-ash-read-etc-profile.patch"
SRC_URI += "file://busybox-1.33.1/0103-top-short-lived-processes-optimize.patch"
+SRC_URI += "file://busybox-1.33.1/0103-syslogd-data-encryption.patch"
SRC_URI_append_libc-musl = " file://busybox-1.33.1/musl.cfg "
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
index 404acb7..05550f1 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
@@ -91,6 +91,7 @@
static int s_module_call_state =CALL_OFF;
static int s_call_auto_answer = 0;
+static char g_hungup_addr[LYNQ_PHONE_NUMBER_MAX] = {0};
typedef enum{
LYNQ_E_VOLUMN_SET_DTMF,
@@ -308,6 +309,7 @@
s_call_lists[lynq_call_id].toa = 0;
s_call_lists[lynq_call_id].direction = 0;
s_call_lists[lynq_call_id].used = 0;
+ memcpy(g_hungup_addr,s_call_lists[lynq_call_id].addr,strlen(s_call_lists[lynq_call_id].addr)+1);
memset(s_call_lists[lynq_call_id].addr,0,sizeof(s_call_lists[lynq_call_id].addr));
}
@@ -468,6 +470,9 @@
if(call_end == 0)
{
LYINFLOG("MT/MO hungup,then clean call info local idx is %d id is %d",i, s_call_lists[i].call_id);
+
+ s_CallId = s_call_lists[i].call_id;
+
//update_end_state(i);//lei modify for:update end state for this call
cleanCallList(i);
send_call_state_change();//means mt/mo call is end
@@ -538,6 +543,7 @@
LYINFLOG("state changed from %d to %d",s_call_lists[n].call_state,call_list[i].call_state);
updateCallList(&s_call_lists[n],call_list[i].call_id,call_list[i].call_state,call_list[i].toa,call_list[i].direction);//update mt call
+ s_CallId = call_list[i].call_id;
send_call_state_change();
}
}
@@ -1032,8 +1038,11 @@
if(lynq_call_id!=INVALID_ID)
{
cleanCallList(lynq_call_id);
- }
-
+ }
+
+
+ s_CallId = call_id;
+
//fix bug T106BUG-56
send_call_state_change();
return RESULT_OK;
@@ -1114,6 +1123,7 @@
if((*handle) >= 0)
{
*call_state = (int)LYNQ_CALL_END;
+ memcpy(addr,g_hungup_addr,strlen(g_hungup_addr)+1);
return RESULT_OK;
}
else
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
index 995b7e4..421383b 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -17,6 +17,8 @@
#define APN_DB_READED 0
#define APN_DB_ERR 1
#define APN_DB_CREATE 2
+#define APN_TABLE_CREATE 3
+#define APN_TABLE_NEED_CREATE 4
#define RESULT_OK (0)
#define RESULT_ERROR (-1)
@@ -721,9 +723,69 @@
pthread_mutex_unlock(&s_qser_data_database_mutex);
return 0;
}
+check_apn_table_cb(void *data, int argc, char **argv, char **azColName)
+{
+ if(data==NULL)
+ {
+ return 1;
+ }
+ int *temp = (int *)data;
+ for(int i=0; i<argc; i++){
+ LYINFLOG("[%s]%s = %s", __FUNCTION__,azColName[i], argv[i] ? argv[i] : "NULL");
+ }
+ *temp = atoi(argv[0]);
+ LYINFLOG("\nThe number is %d\n", *temp);
+ return 0;
+}
+int check_apn_table(char*path)
+{
+ char *zErrMsg = 0;
+ int rc;
+ char *sql;
+ int num = -1;
+
+ /* Open database */
+ pthread_mutex_lock(&s_qser_data_database_mutex);
+ rc = sqlite3_open(path, &apnDb);
+ if( rc )
+ {
+ LYERRLOG("[%s] Can't open database: %s\n", __FUNCTION__,sqlite3_errmsg(apnDb));
+ pthread_mutex_unlock(&s_qser_data_database_mutex);
+ return 1;
+ }
+ LYINFLOG("[%s] Opened database successfully\n",__FUNCTION__);
+ /* Create SQL statement */
+ sql = "SELECT COUNT(*) FROM sqlite_master where type ='table' and name = 'LYNQAPN'";
+ /* Execute SQL statement */
+ rc = sqlite3_exec(apnDb, sql, check_apn_table_cb, &num, &zErrMsg);
+ if( rc != SQLITE_OK )
+ {
+ LYERRLOG("SQL error: %s\n", zErrMsg);
+ sqlite3_free(zErrMsg);
+ sqlite3_close(apnDb);
+ pthread_mutex_unlock(&s_qser_data_database_mutex);
+ return 1;
+ }
+ LYINFLOG("Table LYNQAPN check successfully\n");
+ sqlite3_close(apnDb);
+ pthread_mutex_unlock(&s_qser_data_database_mutex);
+ if(num <= 0)
+ {
+ LYINFLOG("No table LYNQAPN, num = %d\n", num);
+ return APN_TABLE_NEED_CREATE;
+ }
+ else
+ {
+ LYINFLOG("The table LYNQAPN exist, num = %d\n", num);
+ return APN_TABLE_CREATE;
+ }
+
+ return 0;
+}
static int init_apn_db()
{
int db_ret=0;
+ int check_ret=0;
int table_ret=0;
pthread_mutex_init(&s_qser_data_database_mutex, NULL);
@@ -741,7 +803,26 @@
}
else if(db_ret==APN_DB_READED)
{
- LYERRLOG("[%s] apn db has be build!!!",__FUNCTION__);
+ LYINFLOG("[%s] apn db has be build!!!",__FUNCTION__);
+ check_ret = check_apn_table(APN_DB_PATH);
+ if(check_ret == APN_TABLE_NEED_CREATE)
+ {
+ table_ret = create_apn_table(APN_DB_PATH);
+ if(table_ret!=0)
+ {
+ LYERRLOG("create apn table fail!!!");
+ return 1;
+ }
+ apn_db_add(0, &default_apn);
+ }
+ else if(check_ret == APN_TABLE_CREATE)
+ {
+ LYINFLOG("Table LYNQAPN has created");
+ }
+ else
+ {
+ LYERRLOG("check table fail!!!, ret = %d", check_ret);
+ }
}
else
{
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp
index 1589c5f..811e7e7 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-fota/lynq-qser-fota.cpp
@@ -123,7 +123,7 @@
int lynq_get_upgrade_type();
int lynq_get_sync_status();
int lynq_set_sync_status(char *option_para);
-
+int calculate_md5_sum( char *md5_sum,int md5_size);
/*****************************************
* @brief:rock_update_main
@@ -145,6 +145,7 @@
time_t endTime;
struct tm *localTime;
double elapsed = 0;
+ char md5_sum[48] = {0};
FILE *fp = NULL;
fp = fopen(FOTA_FLAG_FILE,"w+");
@@ -192,6 +193,12 @@
return -1;
}
+ ret = calculate_md5_sum(md5_sum,sizeof(md5_sum));
+ if(ret != 0)
+ {
+ LYINFLOG("Calculate md5 sum failed");
+ }
+
startTime = time(NULL);
if(startTime == (time_t)-1)
{
@@ -211,7 +218,7 @@
if(ret != 0)
{
LYERRLOG("Upgrade failed");
- ret = sc_debug_info_record(MODULE_ID_CAP_FOTA,"failed,spendtime: %.2lf seconds,package size:%d,finished time %s", elapsed,total_size,asctime(localTime));
+ ret = sc_debug_info_record(MODULE_ID_CAP_FOTA,"failed,spendtime: %.2lf seconds,finished time %s,md5:%s", elapsed,asctime(localTime),md5_sum);
if(ret <= 0)
{
LYERRLOG("lynq_record_debug_info failed");
@@ -221,7 +228,7 @@
else
{
LYINFLOG("Upgrade success");
- ret = sc_debug_info_record(MODULE_ID_CAP_FOTA,"success,spendtime: %.2lf seconds,package size:%d,finished time %s", elapsed,total_size,asctime(localTime));
+ ret = sc_debug_info_record(MODULE_ID_CAP_FOTA,"success,spendtime: %.2lf seconds,finished time %s,md5:%s", elapsed,asctime(localTime),md5_sum);
if(ret <= 0)
{
LYERRLOG("lynq_record_debug_info failed");
@@ -1006,6 +1013,58 @@
return ration;
}
+int calculate_md5_sum( char *md5_sum,int md5_size)
+{
+ FILE *fp = NULL;
+ char package_path[256] = {0};
+ char command[64] = {0};
+ char *space_pos = NULL;
+ int length = 0;
+ char command_result[64] = {0};
+
+ fp = fopen(FOTA_ADDR_FILE, "rb");
+ if(fp == NULL)
+ {
+ LYERRLOG("Open file failed", FOTA_ADDR_FILE);
+ return -1;
+ }
+ if(fgets(package_path, sizeof(package_path), fp) == NULL)
+ {
+ LYERRLOG("Read file %s failed", package_path);
+ }
+ fclose(fp);
+
+ snprintf(command, sizeof(command), "md5sum %s",package_path);
+
+ fp = popen(command, "r");
+ if (fp == NULL)
+ {
+ LYERRLOG("Failed to run command\n");
+ return -1;
+ }
+ if (fgets(command_result, sizeof(command_result), fp) != NULL)
+ {
+
+ space_pos = strchr(command_result, ' ');
+ if (space_pos != NULL)
+ {
+ length = space_pos - command_result;
+ if(length >= md5_size)
+ {
+ pclose(fp);
+ return -1;
+ }
+ strncpy(md5_sum, command_result, length);
+ md5_sum[length] = '\0';
+ }
+ }
+
+ pclose(fp);
+
+ return 0;
+
+}
+
DEFINE_LYNQ_LIB_LOG(LYNQ_FOTA)
#ifdef __cplusplus
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 e1d2ab4..5ca13fe 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
@@ -134,25 +134,43 @@
{
QSER_NW_SINGNAL_EVENT_IND_T msg_buf;
msg_buf.gsm_sig_info_valid = signalstrength.gw_sig_valid;
- msg_buf.gsm_sig_info.rssi = (signalstrength.rssi<<1)-110;
+ if(msg_buf.gsm_sig_info_valid)
+ {
+ msg_buf.gsm_sig_info.rssi = (signalstrength.rssi<<1)-113;
+ if(msg_buf.gsm_sig_info.rssi < -110)
+ {
+ msg_buf.gsm_sig_info.rssi=-110;
+ }
+ }
+
msg_buf.wcdma_sig_info_valid = signalstrength.wcdma_sig_valid;
- msg_buf.wcdma_sig_info.rssi = (signalstrength.wcdma_signalstrength<<1)-113;
- msg_buf.wcdma_sig_info.ecio = signalstrength.ecno/5;
+ if(msg_buf.wcdma_sig_info_valid)
+ {
+ msg_buf.wcdma_sig_info.rssi = (signalstrength.wcdma_signalstrength<<1)-113;
+ msg_buf.wcdma_sig_info.ecio = signalstrength.ecno/5;
+ }
msg_buf.tdscdma_sig_info_valid = 0;
msg_buf.lte_sig_info_valid = signalstrength.lte_sig_valid;
- msg_buf.lte_sig_info.rssi = (signalstrength.lte_signalstrength<<1)-113;
- msg_buf.lte_sig_info.rsrp = -signalstrength.rsrp;
- msg_buf.lte_sig_info.rsrq = -signalstrength.rsrq;
- msg_buf.lte_sig_info.snr = signalstrength.rssnr;
+ if(msg_buf.lte_sig_info_valid)
+ {
+ msg_buf.lte_sig_info.rssi = (signalstrength.lte_signalstrength<<1)-113;
+ msg_buf.lte_sig_info.rsrp = -signalstrength.rsrp;
+ msg_buf.lte_sig_info.rsrq = -signalstrength.rsrq;
+ msg_buf.lte_sig_info.snr = signalstrength.rssnr;
+ }
msg_buf.cdma_sig_info_valid = 0;
msg_buf.hdr_sig_info_valid = 0;
msg_buf.nr_sig_info_valid = signalstrength.nr_sig_valid;
- msg_buf.nr_sig_info.ssRsrp = signalstrength.ssRsrp;
- msg_buf.nr_sig_info.ssRsrq = signalstrength.ssRsrq;
- msg_buf.nr_sig_info.ssSinr = signalstrength.ssSinr;
- msg_buf.nr_sig_info.csiRsrp = signalstrength.csiRsrp;
- msg_buf.nr_sig_info.csiRsrq = signalstrength.csiRsrq;
- msg_buf.nr_sig_info.csiSinr = signalstrength.csiSinr;
+ if(msg_buf.nr_sig_info_valid)
+ {
+ msg_buf.nr_sig_info.ssRsrp = signalstrength.ssRsrp;
+ msg_buf.nr_sig_info.ssRsrq = signalstrength.ssRsrq;
+ msg_buf.nr_sig_info.ssSinr = signalstrength.ssSinr;
+ msg_buf.nr_sig_info.csiRsrp = signalstrength.csiRsrp;
+ msg_buf.nr_sig_info.csiRsrq = signalstrength.csiRsrq;
+ msg_buf.nr_sig_info.csiSinr = signalstrength.csiSinr;
+ }
+
void *ind_msg_buf= &msg_buf;
if(s_handlerPtr!=NULL)
{
@@ -736,25 +754,47 @@
return RESULT_ERROR;
}
pt_info->gsm_sig_info_valid = lib_info.gw_sig_valid;
- pt_info->gsm_sig_info.rssi = (lib_info.rssi<<1)-110;
+ if(pt_info->gsm_sig_info_valid)
+ {
+ pt_info->gsm_sig_info.rssi = (lib_info.rssi<<1)-113;
+ if(pt_info->gsm_sig_info.rssi < -110)
+ {
+ pt_info->gsm_sig_info.rssi=-110;
+ }
+ }
+
pt_info->wcdma_sig_info_valid = lib_info.wcdma_sig_valid;
- pt_info->wcdma_sig_info.rssi = (lib_info.wcdma_signalstrength<<1)-113;
- pt_info->wcdma_sig_info.ecio = lib_info.ecno/5;
+ if(pt_info->wcdma_sig_info_valid)
+ {
+ pt_info->wcdma_sig_info.rssi = (lib_info.wcdma_signalstrength<<1)-113;
+ pt_info->wcdma_sig_info.ecio = lib_info.ecno/5;
+ }
+
pt_info->tdscdma_sig_info_valid = 0;
+
pt_info->lte_sig_info_valid = lib_info.lte_sig_valid;
- pt_info->lte_sig_info.rssi = (lib_info.lte_signalstrength<<1)-113;
- pt_info->lte_sig_info.rsrp = -lib_info.rsrp;
- pt_info->lte_sig_info.rsrq = -lib_info.rsrq;
- pt_info->lte_sig_info.snr = lib_info.rssnr;
+ if(pt_info->lte_sig_info_valid)
+ {
+ pt_info->lte_sig_info.rssi = (lib_info.lte_signalstrength<<1)-113;
+ pt_info->lte_sig_info.rsrp = -lib_info.rsrp;
+ pt_info->lte_sig_info.rsrq = -lib_info.rsrq;
+ pt_info->lte_sig_info.snr = lib_info.rssnr;
+ }
+
pt_info->cdma_sig_info_valid = 0;
pt_info->hdr_sig_info_valid = 0;
+
pt_info->nr_sig_info_valid = lib_info.nr_sig_valid;
- pt_info->nr_sig_info.ssRsrp = lib_info.ssRsrp;
- pt_info->nr_sig_info.ssRsrq = lib_info.ssRsrq;
- pt_info->nr_sig_info.ssSinr = lib_info.ssSinr;
- pt_info->nr_sig_info.csiRsrp = lib_info.csiRsrp;
- pt_info->nr_sig_info.csiRsrq = lib_info.csiRsrq;
- pt_info->nr_sig_info.csiSinr = lib_info.csiSinr;
+ if(pt_info->nr_sig_info_valid)
+ {
+ pt_info->nr_sig_info.ssRsrp = lib_info.ssRsrp;
+ pt_info->nr_sig_info.ssRsrq = lib_info.ssRsrq;
+ pt_info->nr_sig_info.ssSinr = lib_info.ssSinr;
+ pt_info->nr_sig_info.csiRsrp = lib_info.csiRsrp;
+ pt_info->nr_sig_info.csiRsrq = lib_info.csiRsrq;
+ pt_info->nr_sig_info.csiSinr = lib_info.csiSinr;
+ }
+
return RESULT_OK;
}
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/zvnet/zvnet_dev.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/zvnet/zvnet_dev.c
index bea60e1..ffdba06 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/zvnet/zvnet_dev.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/net/zvnet/zvnet_dev.c
@@ -451,7 +451,7 @@
}
if(unlikely(skb_headroom(skb) < NET_SKB_PAD || skb->next//|| skb->capHead
- || skb->fclone || skb->cloned || (skb_shinfo(skb)->nr_frags)
+ || skb->fclone || skb->cloned || (skb_shinfo(skb)->nr_frags) || skb->sk || (skb->indev == NULL)
|| (skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY) || (skb_has_frag_list(skb)))){
int ret_len = skb->len;
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/spi/spi-zx29.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/spi/spi-zx29.c
index 3d371ea..fd49fd6 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/spi/spi-zx29.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/spi/spi-zx29.c
@@ -2341,7 +2341,7 @@
.iface = SPI_INTERFACE_MOTOROLA_SPI,
.hierarchy = SPI_MASTER,
.slave_tx_disable = DO_NOT_DRIVE_TX,
- .rx_lev_trig = SPI_RX_4_OR_MORE_ELEM,
+ .rx_lev_trig = SPI_RX_8_OR_MORE_ELEM,
.tx_lev_trig = SPI_TX_4_OR_MORE_EMPTY_LOC,
// .ctrl_len = SSP_BITS_8,
// .wait_state = SSP_MWIRE_WAIT_ZERO,
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/include/log/logd.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/include/log/logd.h
index 9fbcbc5..973cb60 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/include/log/logd.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/include/log/logd.h
@@ -38,6 +38,13 @@
extern "C" {
#endif
+/*cz.li add on 2024/7/8 for control RLOGD start*/
+#define SLOG_DEBUG 1 //研发个体行为log输出,量很大
+#define SLOG_NORMAL 2 //集成测试阶段log输出,量适中
+#define SLOG_ERR 3 //致命或快照类log输出,量小
+#define SLOG_OFF 4 //全部关闭打印
+/*cz.li add on 2024/7/8 for control RLOGD start*/
+
int __android_log_bwrite(int32_t tag, const void *payload, size_t len);
int __android_log_btwrite(int32_t tag, char type, const void *payload,
size_t len);
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c
index dbe869f..8e86270 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c
@@ -440,7 +440,7 @@
return LOG_NAME[log_id];
}
#endif
-
+int sys_log_levle = 4;
static int __write_to_log_init(log_id_t log_id, struct iovec *vec, size_t nr)
{
#ifdef HAVE_PTHREADS
@@ -466,7 +466,38 @@
#ifdef HAVE_PTHREADS
pthread_mutex_unlock(&log_init_lock);
#endif
-
+/*cz.li add on 2024/7/8 for control RLOGD start*/
+ char nv_syslog_level[10];
+ char buffer[32];
+ FILE *output = popen("nv show | grep syslog_level", "r");
+ while (fgets(buffer, sizeof(buffer), output) != NULL)
+ {
+ char *equal_sign = strchr(buffer, '=');
+ strncpy(nv_syslog_level,equal_sign + 1,1);
+ }
+ pclose(output);
+ sys_log_levle = atoi(nv_syslog_level);
+ if(sys_log_levle == SLOG_DEBUG)
+ {
+ sys_log_levle = ANDROID_LOG_DEBUG;
+ }
+ else if(sys_log_levle == SLOG_NORMAL)
+ {
+ sys_log_levle = ANDROID_LOG_INFO;
+ }
+ else if(sys_log_levle == SLOG_ERR)
+ {
+ sys_log_levle = ANDROID_LOG_ERROR;
+ }
+ else if(sys_log_levle == SLOG_OFF)
+ {
+ sys_log_levle = ANDROID_LOG_SILENT;
+ }
+ else
+ {
+ sys_log_levle = ANDROID_LOG_INFO;
+ }
+/*cz.li add on 2024/7/8 for control RLOGD end*/
return write_to_log(log_id, vec, nr);
}
@@ -475,7 +506,12 @@
struct iovec vec[3];
log_id_t log_id = LOG_ID_MAIN;
char tmp_tag[32];
-
+/*cz.li add on 2024/7/8 for control RLOGD start*/
+ if(prio < sys_log_levle)
+ {
+ return 0;
+ }
+/*cz.li add on 2024/7/8 for control RLOGD end*/
if (!tag)
tag = "";
@@ -517,7 +553,12 @@
{
struct iovec vec[3];
char tmp_tag[32];
-
+/*cz.li add on 2024/7/8 for control RLOGD start*/
+ if(prio < sys_log_levle)
+ {
+ return 0;
+ }
+/*cz.li add on 2024/7/8 for control RLOGD end*/
if (!tag)
tag = "";
diff --git a/update_version.sh b/update_version.sh
index b60c396..efe9533 100755
--- a/update_version.sh
+++ b/update_version.sh
@@ -1,8 +1,8 @@
#!/bin/bash
#export LYNQ_VERSION="T106_lynq_version_ap_build_sh"
-LYNQ_AP_VERSION="T106-V2.01.01.02P56U06.AP.15.06"
-LYNQ_CAP_INSIDE_VERSION="CAP.15.06"
-LYNQ_CAP_VERSION="CAP.15.06"
+LYNQ_AP_VERSION="T106-W-V2.01.01.02P56U06.AP.15.09"
+LYNQ_CAP_INSIDE_VERSION="CAP.15.09"
+LYNQ_CAP_VERSION="CAP.15.09"
COMMIT_ID="$(git rev-parse HEAD)"
LYNQ_SW_INSIDE_VERSION="LYNQ_CONFIG_VERSION = \"${LYNQ_AP_VERSION}_${LYNQ_CAP_INSIDE_VERSION}\""