x-cube-azrtos-f4
x-cube-azrtos-f4 copied to clipboard
NetX status request for ethernet driver failure
_nx_driver_get_status in common/drivers/ethernet/nx_stm32_eth_driver.c does not set value pointed by driver_req_ptr -> nx_ip_driver_return_ptr thus caller consider request failed.
This patch actually fixes the issue for me: Middlewares/ST/netxduo/common/drivers/ethernet/nx_stm32_eth_driver.c `static VOID _nx_driver_get_status(NX_IP_DRIVER *driver_req_ptr) {
UINT status;
/* Call hardware specific get status function. */ status = _nx_driver_hardware_get_status(driver_req_ptr);
/* Determine if there was an error. */ if (status != NX_SUCCESS) {
/* Indicate an unsuccessful request. */
driver_req_ptr -> nx_ip_driver_status = NX_DRIVER_ERROR;
*driver_req_ptr -> nx_ip_driver_return_ptr = NX_FALSE; // <<- added
}
else {
/* Indicate the request was successful. */
driver_req_ptr -> nx_ip_driver_status = NX_SUCCESS;
*driver_req_ptr -> nx_ip_driver_return_ptr = NX_TRUE; // <<- added
} } `