[U-Boot] [PATCH 2/4] eth: asix88179: Fix receiving on big endian system

Marek Vasut marex at denx.de
Wed Aug 3 09:01:23 CEST 2016


On 08/03/2016 08:14 AM, Alban Bedel wrote:
> In asix_recv() the call to convert the endianess of the receive header
> was applied on the wrong variable. Instead of converting rx_hdr it
> converted pkt_hdr which is a pointer, and not yet initialiazed at this
> point.
> 
> Signed-off-by: Alban Bedel <alban.bedel at avionic-design.de>

Applied, thanks

> ---
>  drivers/usb/eth/asix88179.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
> index 9e04c7c5c658..81eae04e3402 100644
> --- a/drivers/usb/eth/asix88179.c
> +++ b/drivers/usb/eth/asix88179.c
> @@ -543,7 +543,7 @@ static int asix_recv(struct eth_device *eth)
>  
>  
>  	rx_hdr = *(u32 *)(recv_buf + actual_len - 4);
> -	le32_to_cpus(&pkt_hdr);
> +	le32_to_cpus(&rx_hdr);
>  
>  	pkt_cnt = (u16)rx_hdr;
>  	hdr_off = (u16)(rx_hdr >> 16);
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list