diff --git a/RELEASE.md b/RELEASE.md
index d0ef78b..acc50dd 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -6,6 +6,10 @@ See the [README.md](./README.md) for a complete description of the [lwIP network
## Changelog
+### v1.1.2
+
+- Minor bug fixes
+
### v1.1.1
- Minor bug fixes
diff --git a/docs/api_reference_manual/html/group__generic__lwip__whd__port__defines.html b/docs/api_reference_manual/html/group__generic__lwip__whd__port__defines.html
index bea76bb..7ed043f 100644
--- a/docs/api_reference_manual/html/group__generic__lwip__whd__port__defines.html
+++ b/docs/api_reference_manual/html/group__generic__lwip__whd__port__defines.html
@@ -209,6 +209,10 @@
#define
CY_RSLT_NETWORK_NOT_SUPPORTED (CY_RSLT_NETWORK_PORT_ERR_BASE + 22) |
| Denotes that the feature is not supported.
|
|
+
+#define | CY_RSLT_NETWORK_LINK_NOT_UP (CY_RSLT_NETWORK_PORT_ERR_BASE + 23) |
+ | Denotes that the Link is not up.
|
+ |
diff --git a/docs/api_reference_manual/html/group__generic__lwip__whd__port__defines.js b/docs/api_reference_manual/html/group__generic__lwip__whd__port__defines.js
index ad2bbe6..4aa2848 100644
--- a/docs/api_reference_manual/html/group__generic__lwip__whd__port__defines.js
+++ b/docs/api_reference_manual/html/group__generic__lwip__whd__port__defines.js
@@ -21,5 +21,6 @@ var group__generic__lwip__whd__port__defines =
[ "CY_RSLT_NETWORK_ERROR_PING", "group__generic__lwip__whd__port__defines.html#ga2f88f008edcc1b4c1d38a1c6df4ca2bf", null ],
[ "CY_RSLT_NETWORK_ERROR_NOMEM", "group__generic__lwip__whd__port__defines.html#ga1f0322ffd345df3120842c6d78c0f229", null ],
[ "CY_RSLT_NETWORK_ERROR_RTOS", "group__generic__lwip__whd__port__defines.html#ga0c5b724f4d242fd2f465ba00cee17fa4", null ],
- [ "CY_RSLT_NETWORK_NOT_SUPPORTED", "group__generic__lwip__whd__port__defines.html#ga1ae343f44b7540a45f3680ba6d1a7226", null ]
+ [ "CY_RSLT_NETWORK_NOT_SUPPORTED", "group__generic__lwip__whd__port__defines.html#ga1ae343f44b7540a45f3680ba6d1a7226", null ],
+ [ "CY_RSLT_NETWORK_LINK_NOT_UP", "group__generic__lwip__whd__port__defines.html#gadd0ef95e5fb952dd62156060eaf25d2e", null ]
];
\ No newline at end of file
diff --git a/docs/api_reference_manual/html/navtreeindex0.js b/docs/api_reference_manual/html/navtreeindex0.js
index 8a156e8..0dfeafb 100644
--- a/docs/api_reference_manual/html/navtreeindex0.js
+++ b/docs/api_reference_manual/html/navtreeindex0.js
@@ -21,6 +21,7 @@ var NAVTREEINDEX0 =
"group__generic__lwip__whd__port__defines.html#gabc1d83188fe0b29bbe0de950519a52a8":[1,1,14],
"group__generic__lwip__whd__port__defines.html#gabe7486b63b0e20d597c80f66b281a6c6":[1,1,3],
"group__generic__lwip__whd__port__defines.html#gac2bfa236e9261ca5bab6e78d6f32d128":[1,1,13],
+"group__generic__lwip__whd__port__defines.html#gadd0ef95e5fb952dd62156060eaf25d2e":[1,1,22],
"group__generic__lwip__whd__port__defines.html#gaf293c31318d2af1d62bac43bbdf4a462":[1,1,17],
"group__generic__lwip__whd__port__defines.html#gafc24f9c602ae45614f7231508eb574bf":[1,1,11],
"group__group__lwip__network__interface__integration.html":[1,0],
diff --git a/docs/api_reference_manual/html/search/all_1.js b/docs/api_reference_manual/html/search/all_1.js
index 70fcfb8..b2c5b97 100644
--- a/docs/api_reference_manual/html/search/all_1.js
+++ b/docs/api_reference_manual/html/search/all_1.js
@@ -50,10 +50,11 @@ var searchData=
['cy_5frslt_5fnetwork_5finterface_5fnetwork_5fnot_5fup_47',['CY_RSLT_NETWORK_INTERFACE_NETWORK_NOT_UP',['../group__generic__lwip__whd__port__defines.html#gabc1d83188fe0b29bbe0de950519a52a8',1,'cy_nw_mw_core_error.h']]],
['cy_5frslt_5fnetwork_5finvalid_5fsocket_48',['CY_RSLT_NETWORK_INVALID_SOCKET',['../group__generic__lwip__whd__port__defines.html#ga7325308cb997463c8372e84d4cdde4c7',1,'cy_nw_mw_core_error.h']]],
['cy_5frslt_5fnetwork_5fipv6_5finterface_5fnot_5fready_49',['CY_RSLT_NETWORK_IPV6_INTERFACE_NOT_READY',['../group__generic__lwip__whd__port__defines.html#ga0370d51c846f63d87078f684e27f93a7',1,'cy_nw_mw_core_error.h']]],
- ['cy_5frslt_5fnetwork_5fnot_5fsupported_50',['CY_RSLT_NETWORK_NOT_SUPPORTED',['../group__generic__lwip__whd__port__defines.html#ga1ae343f44b7540a45f3680ba6d1a7226',1,'cy_nw_mw_core_error.h']]],
- ['cy_5frslt_5fnetwork_5fport_5ferr_5fbase_51',['CY_RSLT_NETWORK_PORT_ERR_BASE',['../group__generic__lwip__whd__port__defines.html#ga64411e3dd47f1879323877c2370b9eec',1,'cy_nw_mw_core_error.h']]],
- ['cy_5frslt_5fnetwork_5fsocket_5fcreate_5ffail_52',['CY_RSLT_NETWORK_SOCKET_CREATE_FAIL',['../group__generic__lwip__whd__port__defines.html#ga0be1337ee3c34383be5bc25b9492321f',1,'cy_nw_mw_core_error.h']]],
- ['cy_5frslt_5fnetwork_5fsocket_5ferror_53',['CY_RSLT_NETWORK_SOCKET_ERROR',['../group__generic__lwip__whd__port__defines.html#ga0402c74db5d2b1251c2bc8ba16520bb5',1,'cy_nw_mw_core_error.h']]],
- ['cy_5fwifimwcore_5feapol_5fpacket_5fhandler_5ft_54',['cy_wifimwcore_eapol_packet_handler_t',['../group__group__wifimwcore__eapol__functions.html#ga5d501ebe6f09b2f93384fc33de1617a0',1,'cy_wifimwcore_eapol.h']]],
- ['cy_5fwifimwcore_5feapol_5fregister_5freceive_5fhandler_55',['cy_wifimwcore_eapol_register_receive_handler',['../group__group__wifimwcore__eapol__functions.html#gab3477cb9900a5387811bf337cb7d42b1',1,'cy_wifimwcore_eapol.h']]]
+ ['cy_5frslt_5fnetwork_5flink_5fnot_5fup_50',['CY_RSLT_NETWORK_LINK_NOT_UP',['../group__generic__lwip__whd__port__defines.html#gadd0ef95e5fb952dd62156060eaf25d2e',1,'cy_nw_mw_core_error.h']]],
+ ['cy_5frslt_5fnetwork_5fnot_5fsupported_51',['CY_RSLT_NETWORK_NOT_SUPPORTED',['../group__generic__lwip__whd__port__defines.html#ga1ae343f44b7540a45f3680ba6d1a7226',1,'cy_nw_mw_core_error.h']]],
+ ['cy_5frslt_5fnetwork_5fport_5ferr_5fbase_52',['CY_RSLT_NETWORK_PORT_ERR_BASE',['../group__generic__lwip__whd__port__defines.html#ga64411e3dd47f1879323877c2370b9eec',1,'cy_nw_mw_core_error.h']]],
+ ['cy_5frslt_5fnetwork_5fsocket_5fcreate_5ffail_53',['CY_RSLT_NETWORK_SOCKET_CREATE_FAIL',['../group__generic__lwip__whd__port__defines.html#ga0be1337ee3c34383be5bc25b9492321f',1,'cy_nw_mw_core_error.h']]],
+ ['cy_5frslt_5fnetwork_5fsocket_5ferror_54',['CY_RSLT_NETWORK_SOCKET_ERROR',['../group__generic__lwip__whd__port__defines.html#ga0402c74db5d2b1251c2bc8ba16520bb5',1,'cy_nw_mw_core_error.h']]],
+ ['cy_5fwifimwcore_5feapol_5fpacket_5fhandler_5ft_55',['cy_wifimwcore_eapol_packet_handler_t',['../group__group__wifimwcore__eapol__functions.html#ga5d501ebe6f09b2f93384fc33de1617a0',1,'cy_wifimwcore_eapol.h']]],
+ ['cy_5fwifimwcore_5feapol_5fregister_5freceive_5fhandler_56',['cy_wifimwcore_eapol_register_receive_handler',['../group__group__wifimwcore__eapol__functions.html#gab3477cb9900a5387811bf337cb7d42b1',1,'cy_wifimwcore_eapol.h']]]
];
diff --git a/include/cy_network_mw_core.h b/include/cy_network_mw_core.h
index 34973cb..348c040 100644
--- a/include/cy_network_mw_core.h
+++ b/include/cy_network_mw_core.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2022, Cypress Semiconductor Corporation (an Infineon company) or
+ * Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
diff --git a/source/cy_ethernetif.c b/source/cy_ethernetif.c
index 0d49383..a129279 100644
--- a/source/cy_ethernetif.c
+++ b/source/cy_ethernetif.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2022, Cypress Semiconductor Corporation (an Infineon company) or
+ * Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
@@ -1013,13 +1013,12 @@ static void ethernetif_input(void *arg)
struct pbuf *p = NULL;
struct eth_hdr *ethhdr;
struct netif *netif = (struct netif *)arg;
- bool is_from_isr = false;
cm_cy_log_msg( CYLF_MIDDLEWARE, CY_LOG_DEBUG, "%s():%d netif:[%p]\n", __func__, __LINE__, netif);
while(1)
{
- cy_rtos_get_semaphore( &rx_semaphore, CY_RTOS_NEVER_TIMEOUT, is_from_isr );
+ cy_rtos_get_semaphore( &rx_semaphore, CY_RTOS_NEVER_TIMEOUT, false );
/* Receive data from RX descriptor, post data to queue, enable IRQ. */
NVIC_DisableIRQ((IRQn_Type)108);
diff --git a/source/cy_internal.h b/source/cy_internal.h
index 8d0396d..bf7326e 100644
--- a/source/cy_internal.h
+++ b/source/cy_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2022, Cypress Semiconductor Corporation (an Infineon company) or
+ * Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
diff --git a/source/cy_lwip_dhcp_server.c b/source/cy_lwip_dhcp_server.c
index 026a4ce..06f7e21 100644
--- a/source/cy_lwip_dhcp_server.c
+++ b/source/cy_lwip_dhcp_server.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2022, Cypress Semiconductor Corporation (an Infineon company) or
+ * Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
diff --git a/source/cy_lwip_dhcp_server.h b/source/cy_lwip_dhcp_server.h
index 61b3811..0e1b8c8 100644
--- a/source/cy_lwip_dhcp_server.h
+++ b/source/cy_lwip_dhcp_server.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2022, Cypress Semiconductor Corporation (an Infineon company) or
+ * Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
diff --git a/source/cy_lwip_log.h b/source/cy_lwip_log.h
index 6d253c1..cbd1687 100644
--- a/source/cy_lwip_log.h
+++ b/source/cy_lwip_log.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2022, Cypress Semiconductor Corporation (an Infineon company) or
+ * Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
diff --git a/source/cy_network_mw_core.c b/source/cy_network_mw_core.c
index 7cbc77f..6c654c4 100644
--- a/source/cy_network_mw_core.c
+++ b/source/cy_network_mw_core.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2022, Cypress Semiconductor Corporation (an Infineon company) or
+ * Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
@@ -65,7 +65,7 @@
#include "whd_network_types.h"
#include "whd_buffer_api.h"
#include "cy_wifimwcore_eapol.h"
-#ifdef COMPONENT_43907
+#ifdef COMPONENT_4390X
#include "whd_wlioctl.h"
#endif
#endif
@@ -127,7 +127,7 @@ int errno;
#define MAX_AUTO_IP_RETRIES (5)
-#ifdef COMPONENT_43907
+#ifdef COMPONENT_4390X
#define CY_PRNG_SEED_FEEDBACK_MAX_LOOPS (1000)
#define CY_PRNG_CRC32_POLYNOMIAL (0xEDB88320)
#define CY_PRNG_ADD_CYCLECNT_ENTROPY_EACH_N_BYTE (1024)
@@ -203,7 +203,7 @@ static uint8_t iface_count = 0;
static uint8_t connectivity_lib_init = 0;
static bool is_tcp_initialized = false;
-#ifdef COMPONENT_43907
+#ifdef COMPONENT_4390X
static uint32_t prng_well512_state[CY_PRNG_WELL512_STATE_SIZE];
static uint32_t prng_well512_index = 0;
@@ -248,7 +248,7 @@ static err_t ping_send(int socket_hnd, const cy_nw_ip_address_t* address, struct
static err_t ping_recv(int socket_hnd, cy_nw_ip_address_t* address, uint16_t *ping_seq_num);
#endif
-#ifdef COMPONENT_43907
+#ifdef COMPONENT_4390X
static uint32_t prng_well512_get_random ( void );
static void prng_well512_add_entropy( const void* buffer, uint16_t buffer_length );
cy_rslt_t cy_prng_get_random( void* buffer, uint32_t buffer_length );
@@ -476,9 +476,8 @@ static err_t wifiinit(struct netif *iface)
whd_mac_t macaddr;
whd_interface_t whd_iface = (whd_interface_t)if_ctx->hw_interface;
-#ifdef COMPONENT_43907
- whd_buffer_t buffer;
- whd_buffer_t response;
+#ifdef COMPONENT_4390X
+ uint8_t buffer[WLC_GET_RANDOM_BYTES];
uint32_t *wlan_rand = NULL;
#endif
@@ -496,35 +495,20 @@ static err_t wifiinit(struct netif *iface)
memcpy(&iface->hwaddr, &macaddr, sizeof(macaddr));
iface->hwaddr_len = sizeof(macaddr);
-#ifdef COMPONENT_43907
+#ifdef COMPONENT_4390X
/*
* CYW43907 kits do not have the TRNG module. Get a random number from the WLAN and feed
* it as a seed to the PRNG function.
- * Before invoking whd_cdc_get_iovar_buffer, WHD interface should be initialized.
+ * Before invoking whd_wifi_get_iovar_buffer, WHD interface should be initialized.
* However, wcminit is called from cy_lwip_add_interface; the WHD interface is an
* input to the cy_lwip_add_interface API. So it is safe to invoke
- * whd_cdc_get_iovar_buffer here.
+ * whd_wifi_get_iovar_buffer here.
*/
- if (NULL != whd_cdc_get_iovar_buffer(whd_iface->whd_driver, &buffer, WLC_GET_RANDOM_BYTES, IOVAR_STR_RAND) )
- {
- whd_result_t whd_result;
- whd_result = whd_cdc_send_iovar(whd_iface, CDC_GET, buffer, &response);
- if (whd_result != WHD_SUCCESS)
- {
- whd_buffer_release(whd_iface->whd_driver, response, WHD_NETWORK_RX);
- return ERR_IF;
- }
- wlan_rand = (uint32_t *)whd_buffer_get_current_piece_data_pointer(whd_iface->whd_driver, response);
- if ( wlan_rand == NULL )
- {
- whd_buffer_release(whd_iface->whd_driver, response, WHD_NETWORK_RX);
- return ERR_IF;
- }
- }
- else
+ if(WHD_SUCCESS != whd_wifi_get_iovar_buffer(whd_iface, IOVAR_STR_RAND, buffer, WLC_GET_RANDOM_BYTES))
{
return ERR_IF;
}
+ wlan_rand = (uint32_t *)buffer;
/* Initialize the mutex to protect the PRNG WELL512 state */
if (cy_prng_mutex_ptr == NULL)
@@ -536,11 +520,6 @@ static err_t wifiinit(struct netif *iface)
* algorithm as the initial seed value.
*/
cy_prng_add_entropy((const void *)wlan_rand, 4);
-
- /*
- * Free the WHD buffer used to get the random number from the WLAN.
- */
- whd_buffer_release(whd_iface->whd_driver, response, WHD_NETWORK_RX);
#endif
/*
* Set up the information associated with sending packets
@@ -1228,7 +1207,7 @@ cy_rslt_t cy_network_remove_nw_interface(cy_network_interface_context *iface_con
SET_IP_NETWORK_INITED(interface_index, false);
-#ifdef COMPONENT_43907
+#ifdef COMPONENT_4390X
/* cy_prng_mutex_ptr is initialized when the first network interface is initialized.
* Deinitialize the mutex only after all the interfaces are deinitialized.
*/
@@ -1282,6 +1261,14 @@ cy_rslt_t cy_network_ip_up(cy_network_interface_context *iface)
interface_index = (uint8_t)((iface->iface_type == CY_NETWORK_ETH_INTERFACE)? (CY_NETWORK_ETH_INTERFACE + iface->iface_idx) : iface->iface_type);
cm_cy_log_msg(CYLF_MIDDLEWARE, CY_LOG_DEBUG, "interface_index:[%d] \n", interface_index);
+#ifdef COMPONENT_CAT3
+ if(!netif_is_up(LWIP_IP_HANDLE(interface_index)))
+ {
+ cm_cy_log_msg(CYLF_MIDDLEWARE, CY_LOG_ERR, "Link is not up \n");
+ return CY_RSLT_NETWORK_LINK_NOT_UP;
+ }
+#endif
+
if(is_network_up(interface_index))
{
cm_cy_log_msg(CYLF_MIDDLEWARE, CY_LOG_DEBUG, "Network is already up \n");
@@ -1887,7 +1874,7 @@ cy_rslt_t cy_network_dhcp_renew(cy_network_interface_context *iface)
}
/* Renew DHCP */
- netifapi_netif_common(LWIP_IP_HANDLE(interface_index), (netifapi_void_fn)dhcp_renew, NULL);
+ netifapi_netif_common(LWIP_IP_HANDLE(interface_index), NULL, dhcp_renew);
cy_rtos_delay_milliseconds(DCHP_RENEWAL_DELAY_IN_MS);
@@ -2126,7 +2113,7 @@ static cy_rslt_t is_interface_valid(cy_network_interface_context *iface)
return CY_RSLT_SUCCESS;
}
-#ifdef COMPONENT_43907
+#ifdef COMPONENT_4390X
/* CYW43907 kits do not have a TRNG module.
* The following are the functions to generate pseudorandon numbers.
* These functions are internal to the AnyCloud library; currently used
diff --git a/source/cy_nw_mw_core_error.h b/source/cy_nw_mw_core_error.h
index bce815d..4f29b18 100644
--- a/source/cy_nw_mw_core_error.h
+++ b/source/cy_nw_mw_core_error.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2022, Cypress Semiconductor Corporation (an Infineon company) or
+ * Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
@@ -100,6 +100,7 @@ extern "C" {
#define CY_RSLT_NETWORK_ERROR_NOMEM (CY_RSLT_NETWORK_PORT_ERR_BASE + 20) /**< Denotes the failure to allocate memory*/
#define CY_RSLT_NETWORK_ERROR_RTOS (CY_RSLT_NETWORK_PORT_ERR_BASE + 21) /**< Denotes the failure from RTOS calls*/
#define CY_RSLT_NETWORK_NOT_SUPPORTED (CY_RSLT_NETWORK_PORT_ERR_BASE + 22) /**< Denotes that the feature is not supported*/
+#define CY_RSLT_NETWORK_LINK_NOT_UP (CY_RSLT_NETWORK_PORT_ERR_BASE + 23) /**< Denotes that the Link is not up*/
/**
* \}
diff --git a/source/cy_wifimwcore_eapol.h b/source/cy_wifimwcore_eapol.h
index dfb78b1..52228c2 100644
--- a/source/cy_wifimwcore_eapol.h
+++ b/source/cy_wifimwcore_eapol.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2022, Cypress Semiconductor Corporation (an Infineon company) or
+ * Copyright 2023, Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation. All rights reserved.
*
* This software, including source code, documentation and related
diff --git a/version.xml b/version.xml
index 6b01e04..87144be 100644
--- a/version.xml
+++ b/version.xml
@@ -1 +1 @@
-1.1.1.255
+1.1.2.268