fixes wrong append pointer assignment in minres ethmac driver
This commit was merged in pull request #3.
This commit is contained in:
@@ -799,7 +799,7 @@ void _nx_mnrs_network_driver_receive(NX_IP* ip_ptr, NX_PACKET* packet_ptr, UINT
|
||||
/* Adjust the packet length. */
|
||||
packet_ptr->nx_packet_length = packet_ptr->nx_packet_length - NX_ETHERNET_SIZE;
|
||||
/* Route to the ip receive function. */
|
||||
#ifdef NX_DEBUG_PACKET
|
||||
#ifdef NX_DEBUG
|
||||
printf("NetX MNRS ETH Driver IP Packet Receive - %s\n", ip_ptr->nx_ip_name);
|
||||
#endif
|
||||
_nx_ip_packet_deferred_receive(ip_ptr, packet_ptr);
|
||||
@@ -895,8 +895,9 @@ VOID _nx_mnrs_eth_recv_packet(UINT i)
|
||||
UINT packet_type;
|
||||
|
||||
/* read the number of bits in the frame and convert it into number of words to read */
|
||||
bits_received = get_ethmac_mac_rx(nx_mnrs_driver[i].ethmac);
|
||||
words_to_read = (bits_received + 31) / 32;
|
||||
bits_received = get_ethmac_mac_rx(nx_mnrs_driver[i].ethmac);
|
||||
bytes_received = (bits_received + 7) / 8;
|
||||
words_to_read = (bits_received + 31) / 32;
|
||||
if (words_to_read < 4)
|
||||
{
|
||||
for (j = 0; j < words_to_read; j++)
|
||||
@@ -956,8 +957,8 @@ VOID _nx_mnrs_eth_recv_packet(UINT i)
|
||||
}
|
||||
else
|
||||
{
|
||||
packet_ptr->nx_packet_length = (ULONG)bytes_received;
|
||||
packet_ptr->nx_packet_append_ptr += (ULONG)bytes_received;
|
||||
packet_ptr->nx_packet_length = bytes_received;
|
||||
packet_ptr->nx_packet_append_ptr += bytes_received;
|
||||
}
|
||||
|
||||
_nx_mnrs_network_driver_receive(ip_ptr, packet_ptr, i);
|
||||
|
||||
Reference in New Issue
Block a user