diff --git a/patches/0231-WHD-reduce-the-number-of-join-retry.patch b/patches/0231-WHD-reduce-the-number-of-join-retry.patch new file mode 100644 index 000000000..4f6585666 --- /dev/null +++ b/patches/0231-WHD-reduce-the-number-of-join-retry.patch @@ -0,0 +1,25 @@ +From 42b018c12eb413383c6ae4f2432be9f0c2d9dbe9 Mon Sep 17 00:00:00 2001 +From: pennam +Date: Mon, 17 Jun 2024 17:11:58 +0200 +Subject: [PATCH 231/233] WHD: reduce the number of join retry + +--- + .../drivers/emac/COMPONENT_WHD/interface/WhdSTAInterface.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/connectivity/drivers/emac/COMPONENT_WHD/interface/WhdSTAInterface.cpp b/connectivity/drivers/emac/COMPONENT_WHD/interface/WhdSTAInterface.cpp +index 509a2c0981..c933203d36 100644 +--- a/connectivity/drivers/emac/COMPONENT_WHD/interface/WhdSTAInterface.cpp ++++ b/connectivity/drivers/emac/COMPONENT_WHD/interface/WhdSTAInterface.cpp +@@ -260,7 +260,7 @@ nsapi_error_t WhdSTAInterface::connect() + { + ScopedMutexLock lock(_iface_shared.mutex); + +-#define MAX_RETRY_COUNT ( 5 ) ++#define MAX_RETRY_COUNT ( 1 ) + int i; + whd_result_t res; + +-- +2.43.0 + diff --git a/patches/0232-WHD-reduce-join-attempt-timeout.patch b/patches/0232-WHD-reduce-join-attempt-timeout.patch new file mode 100644 index 000000000..4b0e49008 --- /dev/null +++ b/patches/0232-WHD-reduce-join-attempt-timeout.patch @@ -0,0 +1,25 @@ +From e67490e8d2006e85877c6aff28132a9699023295 Mon Sep 17 00:00:00 2001 +From: pennam +Date: Mon, 17 Jun 2024 17:12:51 +0200 +Subject: [PATCH 232/233] WHD: reduce join attempt timeout + +--- + .../wifi/COMPONENT_WHD/wifi-host-driver/src/whd_wifi_api.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/connectivity/drivers/wifi/COMPONENT_WHD/wifi-host-driver/src/whd_wifi_api.c b/connectivity/drivers/wifi/COMPONENT_WHD/wifi-host-driver/src/whd_wifi_api.c +index 5294104ab4..c248b2ea1f 100755 +--- a/connectivity/drivers/wifi/COMPONENT_WHD/wifi-host-driver/src/whd_wifi_api.c ++++ b/connectivity/drivers/wifi/COMPONENT_WHD/wifi-host-driver/src/whd_wifi_api.c +@@ -64,7 +64,7 @@ + #define JOIN_SECURITY_FLAGS_MASK (JOIN_SECURITY_COMPLETE | JOIN_EAPOL_KEY_M1_TIMEOUT | JOIN_EAPOL_KEY_M3_TIMEOUT | \ + JOIN_EAPOL_KEY_G1_TIMEOUT | JOIN_EAPOL_KEY_FAILURE) + +-#define DEFAULT_JOIN_ATTEMPT_TIMEOUT (7000) /* Overall join attempt timeout in milliseconds. */ ++#define DEFAULT_JOIN_ATTEMPT_TIMEOUT (4000) /* Overall join attempt timeout in milliseconds. */ + #define DEFAULT_EAPOL_KEY_PACKET_TIMEOUT (5000) /* Timeout when waiting for EAPOL key packet M1 or M3 in milliseconds.*/ + /* Some APs may be slow to provide M1 and 1000 ms is not long enough for edge of cell. */ + #ifndef DEFAULT_PM2_SLEEP_RET_TIME +-- +2.43.0 + diff --git a/patches/0233-TCPSocket-send-return-NSAPI_ERROR_TIMEOUT-if-timeout.patch b/patches/0233-TCPSocket-send-return-NSAPI_ERROR_TIMEOUT-if-timeout.patch new file mode 100644 index 000000000..62835120d --- /dev/null +++ b/patches/0233-TCPSocket-send-return-NSAPI_ERROR_TIMEOUT-if-timeout.patch @@ -0,0 +1,25 @@ +From 783e574f0989f71447a460742d30b202fbc681d2 Mon Sep 17 00:00:00 2001 +From: pennam +Date: Mon, 17 Jun 2024 17:15:25 +0200 +Subject: [PATCH 233/233] TCPSocket::send return NSAPI_ERROR_TIMEOUT if timeout + is reached + +--- + connectivity/netsocket/source/TCPSocket.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/connectivity/netsocket/source/TCPSocket.cpp b/connectivity/netsocket/source/TCPSocket.cpp +index 368a2a36f1..f9efe6f8d1 100644 +--- a/connectivity/netsocket/source/TCPSocket.cpp ++++ b/connectivity/netsocket/source/TCPSocket.cpp +@@ -144,6 +144,7 @@ nsapi_size_or_error_t TCPSocket::send(const void *data, nsapi_size_t size) + + if (flag & osFlagsError) { + // Timeout break ++ ret = NSAPI_ERROR_TIMEOUT; + break; + } + } else if (ret < 0) { +-- +2.43.0 +