From: 罗正 <1732036298@qq.com> Date: Sat, 9 May 2026 03:48:36 +0000 (+0800) Subject: Revert "解决4G开不起来bug X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=46cdc96afdbde501ba47c1789ed02331a726710c;p=mirrors%2FFD230.git Revert "解决4G开不起来bug " --- diff --git a/code/sdk/open_source/openharmony/third_party/lwip/CMakeLists.txt b/code/sdk/open_source/openharmony/third_party/lwip/CMakeLists.txt index d00ce71bd..3a0e8b4fd 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/CMakeLists.txt +++ b/code/sdk/open_source/openharmony/third_party/lwip/CMakeLists.txt @@ -23,40 +23,6 @@ elseif("freertos" IN_LIST TARGET_COMPONENT) ${CMAKE_CURRENT_SOURCE_DIR}/lwip_adapter/freertos) endif() -# PPP -set(lwipppp_SRCS - ${LWIP_DIR}/src/netif/ppp/auth.c - ${LWIP_DIR}/src/netif/ppp/ccp.c - ${LWIP_DIR}/src/netif/ppp/chap-md5.c - ${LWIP_DIR}/src/netif/ppp/chap_ms.c - ${LWIP_DIR}/src/netif/ppp/chap-new.c - ${LWIP_DIR}/src/netif/ppp/demand.c - ${LWIP_DIR}/src/netif/ppp/eap.c - ${LWIP_DIR}/src/netif/ppp/ecp.c - ${LWIP_DIR}/src/netif/ppp/eui64.c - ${LWIP_DIR}/src/netif/ppp/fsm.c - ${LWIP_DIR}/src/netif/ppp/ipcp.c - ${LWIP_DIR}/src/netif/ppp/ipv6cp.c - ${LWIP_DIR}/src/netif/ppp/lcp.c - ${LWIP_DIR}/src/netif/ppp/magic.c - ${LWIP_DIR}/src/netif/ppp/mppe.c - ${LWIP_DIR}/src/netif/ppp/multilink.c - ${LWIP_DIR}/src/netif/ppp/ppp.c - ${LWIP_DIR}/src/netif/ppp/pppapi.c - ${LWIP_DIR}/src/netif/ppp/pppcrypt.c - ${LWIP_DIR}/src/netif/ppp/pppoe.c - ${LWIP_DIR}/src/netif/ppp/pppol2tp.c - ${LWIP_DIR}/src/netif/ppp/pppos.c - ${LWIP_DIR}/src/netif/ppp/upap.c - ${LWIP_DIR}/src/netif/ppp/utils.c - ${LWIP_DIR}/src/netif/ppp/vj.c - ${LWIP_DIR}/src/netif/ppp/polarssl/arc4.c - ${LWIP_DIR}/src/netif/ppp/polarssl/des.c - ${LWIP_DIR}/src/netif/ppp/polarssl/md4.c - ${LWIP_DIR}/src/netif/ppp/polarssl/md5.c - ${LWIP_DIR}/src/netif/ppp/polarssl/sha1.c -) - set(SOURCES ${CMAKE_LWIP_SOURCE_DIR}/src/core/tcp_out.c ${CMAKE_LWIP_SOURCE_DIR}/src/core/inet_chksum.c @@ -110,13 +76,6 @@ set(SOURCES ${CMAKE_LWIP_SOURCE_DIR}/src/api/api_lib.c ${CMAKE_LWIP_ADAPTER_DIR}/src/arch/sys_arch.c ${CMAKE_LWIP_ADAPTER_DIR}/src/arch/ethernetif.c - ${CMAKE_LWIP_ADAPTER_DIR}/src/arch/sio.c - ${CMAKE_LWIP_SOURCE_DIR}/src/netif/slipif.c - ${CMAKE_LWIP_ADAPTER_DIR}/src/test/lwip_test.c - ${CMAKE_LWIP_ADAPTER_DIR}/src/test/socket_test.c - ${CMAKE_LWIP_ADAPTER_DIR}/src/test/slip_test.c - ${CMAKE_CURRENT_SOURCE_DIR}/lwip_adapter/lwip_driver_adapter/lwip_driver_adapter.c - ${lwipppp_SRCS} ) if("__LITEOS__" IN_LIST DEFINES) diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/freertos/src/test/lwip_test.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/freertos/src/test/lwip_test.c deleted file mode 100644 index 99e96bdba..000000000 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/freertos/src/test/lwip_test.c +++ /dev/null @@ -1,63 +0,0 @@ -#include "lwip_test.h" -#include "lwip/netif.h" -#include "lwip/netifapi.h" -#include "lwip/ethernetif.h" -#define IP_ADDR0 192 -#define IP_ADDR1 168 -#define IP_ADDR2 1 -#define IP_ADDR3 122 - -#define NETMASK_ADDR0 255 -#define NETMASK_ADDR1 255 -#define NETMASK_ADDR2 255 -#define NETMASK_ADDR3 0 - -#define GW_ADDR0 192 -#define GW_ADDR1 168 -#define GW_ADDR2 1 -#define GW_ADDR3 1 - -#define WIFI_DRIVER_IF 801 -#define HWADDR_LEN 6 - -struct netif g_netif; - -err_t my_hw_input(struct pbuf *p, struct netif *netif); - -err_t my_hw_input(struct pbuf *p, struct netif *netif) -{ - (void)p; - (void)netif; - printf("enter my_hw_input\n"); - return 0; -} - -void lwip_test_init(void) -{ - int ret = 0; - ip4_addr_t ip, gw, netmask; - - IP4_ADDR(&ip, IP_ADDR0, IP_ADDR1, IP_ADDR2, IP_ADDR3); - IP4_ADDR(&gw, GW_ADDR0, GW_ADDR1, GW_ADDR2, GW_ADDR3); - IP4_ADDR(&netmask, NETMASK_ADDR0, NETMASK_ADDR1, NETMASK_ADDR2, NETMASK_ADDR3); - - g_netif.hwaddr_len = HWADDR_LEN; - g_netif.hwaddr[0] = 0x00; - g_netif.hwaddr[1] = 0x11; - g_netif.hwaddr[2] = 0x22; - g_netif.hwaddr[3] = 0x33; - g_netif.hwaddr[4] = 0x44; - g_netif.hwaddr[5] = 0x55; - - g_netif.flags = 4; - g_netif.input = my_hw_input; - /* Initilialize the LwIP stack */ - /* add the network interface */ - netif_add(&g_netif, &ip, &netmask, &gw, NULL, ðernetif_init, tcpip_input); - /* Registers the default network interface */ - netif_set_default(&g_netif); - - netif_is_link_up(&g_netif); - /* When the netif is fully configured this function must be called */ - netif_set_up(&g_netif); -} diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/freertos/src/test/socket_test.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/freertos/src/test/socket_test.c deleted file mode 100644 index d6f62e2e0..000000000 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/freertos/src/test/socket_test.c +++ /dev/null @@ -1,113 +0,0 @@ -#include "socket_test.h" -#include "lwip/opt.h" -#include "lwip/sys.h" -#include "lwip/api.h" -#include -#include - -#define SERVER_IP "192.168.1.121" -#define SEND_PORT 5002 -#define BUFFER_SIZE 1024 - -void udp_client(void) { - int sockfd; - struct sockaddr_in server_addr; - char buffer[BUFFER_SIZE]; - - // 创建 UDP 套接字 - sockfd = socket(AF_INET, SOCK_DGRAM, 0); - if (sockfd == -1) { - perror("Error creating socket"); - exit(EXIT_FAILURE); - } - - // 设置服务器地址信息 - memset(&server_addr, 0, sizeof(server_addr)); - server_addr.sin_family = AF_INET; - server_addr.sin_port = lwip_htons(SEND_PORT); - if (inet_aton(SERVER_IP, &server_addr.sin_addr) == 0) { - perror("Invalid server IP address"); - close(sockfd); - exit(EXIT_FAILURE); - } - - while (1) { - // 发送数据 - const char *message = "Hello, UDP Server!"; - int len = strlen(message); - printf("send message: \n"); - for (int i = 0; i < len; i++) { - printf(" %x ", message[i]); - } - printf("\n"); - if (sendto(sockfd, message, strlen(message), 0, (struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) { - perror("Error sending data"); - close(sockfd); - exit(EXIT_FAILURE); - } - sleep(1); - } -} - -#define REV_PORT 5001 -#define BUFFER_SIZE 1024 - -void udp_server(void) -{ - int sockfd; - struct sockaddr_in server_addr; - char buffer[BUFFER_SIZE]; - - // 创建 UDP 套接字 - sockfd = socket(AF_INET, SOCK_DGRAM, 0); - if (sockfd == -1) { - perror("Error creating socket"); - exit(EXIT_FAILURE); - } - - // 设置服务器地址信息 - memset(&server_addr, 0, sizeof(server_addr)); - server_addr.sin_family = AF_INET; - server_addr.sin_addr.s_addr = INADDR_ANY; - server_addr.sin_port = lwip_htons(REV_PORT); - - // 绑定套接字 - if (bind(sockfd, (struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) { - perror("Error binding socket"); - close(sockfd); - exit(EXIT_FAILURE); - } - - while (1) { - socklen_t client_len = sizeof(struct sockaddr_in); - struct sockaddr_in client_addr; - - // 接收数据 - ssize_t bytes_received = recvfrom(sockfd, buffer, BUFFER_SIZE, 0, (struct sockaddr *)&client_addr, &client_len); - if (bytes_received == -1) { - perror("Error receiving data"); - continue; - } - - // 打印接收到的数据 - printf("Received message from %s:%d\n", inet_ntoa(client_addr.sin_addr), lwip_ntohs(client_addr.sin_port)); - printf("Received message: %d %s\n", (int)bytes_received, buffer); - printf("message: "); - for (int i = 0; i < bytes_received; i++) { - printf(" %02x ", buffer[i]); - } - printf("\n"); - - // 清空缓冲区 - memset(buffer, 0, BUFFER_SIZE); - // break; - } - - close(sockfd); -} - -void client_init(void) { - printf("___enter client_init function___\n"); - sys_thread_new("server", udp_server, NULL, 4096, 4); - sys_thread_new("client", udp_client, NULL, 4096, 4); -} \ No newline at end of file diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/arch/sio.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/arch/sio.c index dc030fdb5..3fb708d62 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/arch/sio.c +++ b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/arch/sio.c @@ -641,9 +641,9 @@ errcode_t sio_interrupt_enable(void (*data_callback)(const uint8_t *data, uint32 - // uint32_t total_bytes = SIO_PING_PONG_BUFFER_COUNT * SIO_PING_PONG_BUFFER_SIZE; - // printf("[SIO] Allocated %d x %d bytes = %u KB total\n", - // SIO_PING_PONG_BUFFER_COUNT, SIO_PING_PONG_BUFFER_SIZE, total_bytes / 1024); + printf("[SIO] Allocated %d x %d bytes = %.2f KB total\n", + SIO_PING_PONG_BUFFER_COUNT, SIO_PING_PONG_BUFFER_SIZE, + (SIO_PING_PONG_BUFFER_COUNT * SIO_PING_PONG_BUFFER_SIZE) / 1024.0); // 2. 创建消息队列 int ret = osal_msg_queue_create( diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/include/lwip/lwipopts_default.h b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/include/lwip/lwipopts_default.h index 940098628..516f985b9 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/include/lwip/lwipopts_default.h +++ b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/include/lwip/lwipopts_default.h @@ -785,7 +785,11 @@ extern "C" { #endif #ifndef TCP_WND -#define TCP_WND (TCP_SND_BUF * 2 / 3) +#define TCP_WND (TCP_SND_BUF * 2 / 6) //改善810的下载速度 +#endif + +#ifndef LWIP_IGMP +#define LWIP_IGMP 1 #endif #ifndef LWIP_DNS_REVERSE @@ -800,6 +804,10 @@ extern "C" { #define LWIP_SO_RCVBUF 0 #endif +#ifndef LWIP_IPV6_MLD +#define LWIP_IPV6_MLD 0 +#endif + #ifndef LWIP_IPV6_MLD_QUERIER #define LWIP_IPV6_MLD_QUERIER 0 #endif @@ -1962,6 +1970,8 @@ TCP sender buffer space (pbufs). This must be at least = 2 * #define LWIP_NETIF_LOOPBACK 0 #endif + + #if LWIP_SNTP #define LWIP_DHCP_MAX_NTP_SERVERS 1 diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/lwip_test.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/lwip_test.c deleted file mode 100644 index 99e96bdba..000000000 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/lwip_test.c +++ /dev/null @@ -1,63 +0,0 @@ -#include "lwip_test.h" -#include "lwip/netif.h" -#include "lwip/netifapi.h" -#include "lwip/ethernetif.h" -#define IP_ADDR0 192 -#define IP_ADDR1 168 -#define IP_ADDR2 1 -#define IP_ADDR3 122 - -#define NETMASK_ADDR0 255 -#define NETMASK_ADDR1 255 -#define NETMASK_ADDR2 255 -#define NETMASK_ADDR3 0 - -#define GW_ADDR0 192 -#define GW_ADDR1 168 -#define GW_ADDR2 1 -#define GW_ADDR3 1 - -#define WIFI_DRIVER_IF 801 -#define HWADDR_LEN 6 - -struct netif g_netif; - -err_t my_hw_input(struct pbuf *p, struct netif *netif); - -err_t my_hw_input(struct pbuf *p, struct netif *netif) -{ - (void)p; - (void)netif; - printf("enter my_hw_input\n"); - return 0; -} - -void lwip_test_init(void) -{ - int ret = 0; - ip4_addr_t ip, gw, netmask; - - IP4_ADDR(&ip, IP_ADDR0, IP_ADDR1, IP_ADDR2, IP_ADDR3); - IP4_ADDR(&gw, GW_ADDR0, GW_ADDR1, GW_ADDR2, GW_ADDR3); - IP4_ADDR(&netmask, NETMASK_ADDR0, NETMASK_ADDR1, NETMASK_ADDR2, NETMASK_ADDR3); - - g_netif.hwaddr_len = HWADDR_LEN; - g_netif.hwaddr[0] = 0x00; - g_netif.hwaddr[1] = 0x11; - g_netif.hwaddr[2] = 0x22; - g_netif.hwaddr[3] = 0x33; - g_netif.hwaddr[4] = 0x44; - g_netif.hwaddr[5] = 0x55; - - g_netif.flags = 4; - g_netif.input = my_hw_input; - /* Initilialize the LwIP stack */ - /* add the network interface */ - netif_add(&g_netif, &ip, &netmask, &gw, NULL, ðernetif_init, tcpip_input); - /* Registers the default network interface */ - netif_set_default(&g_netif); - - netif_is_link_up(&g_netif); - /* When the netif is fully configured this function must be called */ - netif_set_up(&g_netif); -} diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/slip_test.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/slip_test.c index f5c2993d4..ba19351ed 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/slip_test.c +++ b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/slip_test.c @@ -32,14 +32,15 @@ static bool slipif_initialled = false; void slip_test_init(void) { ip4_addr_t ipaddr, netmask, gw; - + printf("SLIP test initialization...\n"); - - if (slipif_initialled) { - printf("SLIP netif already initialized, skip re-init\n"); + + /* Initialize SLIP netif */ + if (slipif_init(&slip_netif) != ERR_OK) { + printf("SLIP netif initialization failed!\n"); return; } - + /* Set IP address */ // IP4_ADDR(&ipaddr, 192, 168, 1, 100); // IP4_ADDR(&netmask, 255, 255, 255, 0); @@ -47,11 +48,8 @@ void slip_test_init(void) IP_ADDR4(&ipaddr, 172, 16, 1, 5); IP_ADDR4(&netmask, 255, 255, 255, 0); IP_ADDR4(&gw, 172, 16, 1, 2); - /* Add netif to lwIP(slipif_init 由 netif_add 内部调用,勿再单独 slipif_init) */ - if (netif_add(&slip_netif, &ipaddr, &netmask, &gw, NULL, slipif_init, tcpip_input) == NULL) { - printf("SLIP netif add failed!\n"); - return; - } + /* Add netif to lwIP */ + netif_add(&slip_netif, &ipaddr, &netmask, &gw, NULL, slipif_init, tcpip_input); netif_set_up(&slip_netif); netif_set_link_up(&slip_netif); diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/socket_test.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/socket_test.c deleted file mode 100644 index 2e8f48b01..000000000 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_adapter/liteos/src/test/socket_test.c +++ /dev/null @@ -1,113 +0,0 @@ -#include "socket_test.h" -#include "lwip/opt.h" -#include "lwip/sys.h" -#include "lwip/api.h" -#include -#include - -#define SERVER_IP "192.168.1.121" -#define SEND_PORT 5002 -#define BUFFER_SIZE 1024 - -void udp_client(void) { - int sockfd; - struct sockaddr_in server_addr; - char buffer[BUFFER_SIZE]; - - // 创建 UDP 套接字 - sockfd = socket(AF_INET, SOCK_DGRAM, 0); - if (sockfd == -1) { - perror("Error creating socket"); - exit(EXIT_FAILURE); - } - - // 设置服务器地址信息 - memset(&server_addr, 0, sizeof(server_addr)); - server_addr.sin_family = AF_INET; - server_addr.sin_port = lwip_htons(SEND_PORT); - if (inet_aton(SERVER_IP, &server_addr.sin_addr) == 0) { - perror("Invalid server IP address"); - close(sockfd); - exit(EXIT_FAILURE); - } - - while (1) { - // 发送数据 - const char *message = "Hello, UDP Server!"; - int len = strlen(message); - printf("send message: \n"); - for (int i = 0; i < len; i++) { - printf(" %x ", message[i]); - } - printf("\n"); - if (sendto(sockfd, message, strlen(message), 0, (struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) { - perror("Error sending data"); - close(sockfd); - exit(EXIT_FAILURE); - } - sleep(1); - } -} - -#define REV_PORT 5001 -#define BUFFER_SIZE 1024 - -void udp_server(void) -{ - int sockfd; - struct sockaddr_in server_addr; - char buffer[BUFFER_SIZE]; - - // 创建 UDP 套接字 - sockfd = socket(AF_INET, SOCK_DGRAM, 0); - if (sockfd == -1) { - perror("Error creating socket"); - exit(EXIT_FAILURE); - } - - // 设置服务器地址信息 - memset(&server_addr, 0, sizeof(server_addr)); - server_addr.sin_family = AF_INET; - server_addr.sin_addr.s_addr = INADDR_ANY; - server_addr.sin_port = lwip_htons(REV_PORT); - - // 绑定套接字 - if (bind(sockfd, (struct sockaddr *)&server_addr, sizeof(server_addr)) == -1) { - perror("Error binding socket"); - close(sockfd); - exit(EXIT_FAILURE); - } - - while (1) { - socklen_t client_len = sizeof(struct sockaddr_in); - struct sockaddr_in client_addr; - - // 接收数据 - ssize_t bytes_received = recvfrom(sockfd, buffer, BUFFER_SIZE, 0, (struct sockaddr *)&client_addr, &client_len); - if (bytes_received == -1) { - perror("Error receiving data"); - continue; - } - - // 打印接收到的数据 - printf("Received message from %s:%d\n", inet_ntoa(client_addr.sin_addr), lwip_ntohs(client_addr.sin_port)); - printf("Received message: %d %s\n", (int)bytes_received, buffer); - printf("message: "); - for (int i = 0; i < bytes_received; i++) { - printf(" %02x ", buffer[i]); - } - printf("\n"); - - // 清空缓冲区 - memset(buffer, 0, BUFFER_SIZE); - // break; - } - - close(sockfd); -} - -void client_init(void) { - printf("___enter client_init function___\n"); - sys_thread_new("server", udp_server, NULL, 512, 4); - sys_thread_new("client", udp_client, NULL, 512, 4); -} \ No newline at end of file diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/api/tcpip.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/api/tcpip.c index 332de16f2..18d74a7ae 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/api/tcpip.c +++ b/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/api/tcpip.c @@ -59,10 +59,6 @@ static app_task_definition_t taskcfg={0}; -#if LWIP_SLIP -extern void slip_test_init(void); -#endif - #define TCPIP_MSG_VAR_REF(name) API_VAR_REF(name) #define TCPIP_MSG_VAR_DECLARE(name) API_VAR_DECLARE(struct tcpip_msg, name) @@ -159,12 +155,6 @@ tcpip_thread(void *arg) LWIP_MARK_TCPIP_THREAD(); LOCK_TCPIP_CORE(); -#if LWIP_SLIP - /* 必须在 tcpip_init() 里 sys_mbox_new(&tcpip_mbox) 成功之后执行:此前 slip_test_init - * 会分配 SIO 缓冲/线程等,易耗尽系统堆,导致 osal_wait_init LOS_MemAlloc 失败。 - * 且 netif_add 要求 LWIP_ASSERT_CORE_LOCKED,此处已持锁。 */ - slip_test_init(); -#endif if (tcpip_init_done != NULL) { tcpip_init_done(tcpip_init_done_arg); } diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/core/dns.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/core/dns.c index ff4485842..5c6023898 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/core/dns.c +++ b/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/core/dns.c @@ -333,10 +333,6 @@ dns_init(void) for (n = 0; (n < LWIP_DHCP_MAX_DNS_SERVERS); n++) { dns_setserver(n, &dnsserver); } -#ifdef DNS_SERVER_ADDRESS_SECONDARY - DNS_SERVER_ADDRESS_SECONDARY(&dnsserver); - dns_setserver(1, &dnsserver); -#endif #endif /* DNS_SERVER_ADDRESS */ LWIP_ASSERT("sanity check SIZEOF_DNS_QUERY", diff --git a/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/core/init.c b/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/core/init.c index 4ca04a938..067d51a05 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/core/init.c +++ b/code/sdk/open_source/openharmony/third_party/lwip/lwip_v2.1.3/src/core/init.c @@ -67,8 +67,9 @@ #include "arch/bpstruct.h" #endif -/* SLIP 网卡在 tcpip_init 中于 tcpip_mbox 创建之后、tcpip_thread 内调用 slip_test_init, - * 避免 slip_test_init 先占满堆导致 sys_mbox_new(osal_wait_init) LOS_MemAlloc 失败。 */ +#if LWIP_SLIP +extern void slip_test_init(void); +#endif PACK_STRUCT_BEGIN struct packed_struct_test { PACK_STRUCT_FLD_8(u8_t dummy1); @@ -375,7 +376,11 @@ lwip_init(void) dns_init(); #endif /* LWIP_DNS */ -/* slip_test_init 已移至 tcpip.c 的 tcpip_thread(tcpip mbox 就绪且 core locked 后) */ +#if LWIP_SLIP +#if 0 // 1201patch 为编译过屏蔽 + slip_test_init(); +#endif +#endif /* LWIP_SLIP */ #if PPP_SUPPORT ppp_init(); #endif diff --git a/code/sdk/zhihui/4g/cat1Service/Service/cat1_utils.c b/code/sdk/zhihui/4g/cat1Service/Service/cat1_utils.c index f61a99fd4..0bc6dea87 100644 --- a/code/sdk/zhihui/4g/cat1Service/Service/cat1_utils.c +++ b/code/sdk/zhihui/4g/cat1Service/Service/cat1_utils.c @@ -384,10 +384,12 @@ errcode_t cat1_register_time_ctl_functions(time_ctl_funcs_t *funcs) void cat1_api_suspend_protocol(void) { + #if 0 // 1201patch 为编译过屏蔽 #ifdef SUPPORT_LWIP tcpip_thread_suspend(); slipif_loop_thread_suspend(); #endif + #endif } /** @@ -403,10 +405,12 @@ void cat1_api_suspend_protocol(void) */ void cat1_api_resume_protocol(void) { + #if 0 // 1201patch 为编译过屏蔽 #ifdef SUPPORT_LWIP tcpip_thread_resume(); slipif_loop_thread_resume(); #endif + #endif } /**