mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 08:21:14 +00:00
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
|
From bdd70b997799099597fc0952fb0ec1bd80505bc4 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||
|
Date: Thu, 11 Feb 2021 13:12:39 +0100
|
||
|
Subject: [PATCH] net: broadcom: bcm4908_enet: fix endianness in xmit code
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
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>
|
||
|
---
|
||
|
drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
|
||
|
+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
|
||
|
@@ -476,7 +476,7 @@ static int bcm4908_enet_start_xmit(struc
|
||
|
/* 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];
|
||
|
|