net: broadcom: bcm4908_enet: fix endianness in xmit code

Use le32_to_cpu() for reading __le32 struct field filled by hw.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Rafał Miłecki 2021-02-11 13:12:39 +01:00 committed by David S. Miller
parent 195e2d9feb
commit bdd70b9977
1 changed files with 1 additions and 1 deletions

View File

@ -476,7 +476,7 @@ static int bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netde
/* Free transmitted skbs */
while (ring->read_idx != ring->write_idx) {
buf_desc = &ring->buf_desc[ring->read_idx];
if (buf_desc->ctl & DMA_CTL_STATUS_OWN)
if (le32_to_cpu(buf_desc->ctl) & DMA_CTL_STATUS_OWN)
break;
slot = &ring->slots[ring->read_idx];