[PATCH 3/6] net/wan/fsl_ucc_hdlc: Adding ARPHRD_ETHER
David Gounaris
david.gounaris at infinera.com
Tue Aug 28 21:09:18 AEST 2018
This was done to avoid discarding ethernet
packets when using HDLC_ETH protocol.
Signed-off-by: David Gounaris <david.gounaris at infinera.com>
---
drivers/net/wan/fsl_ucc_hdlc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 963b3b5ae15e..54e2b2143e36 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -375,6 +375,10 @@ static netdev_tx_t ucc_hdlc_tx(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_bytes += skb->len;
break;
+ case ARPHRD_ETHER:
+ dev->stats.tx_bytes += skb->len;
+ break;
+
default:
dev->stats.tx_dropped++;
dev_kfree_skb(skb);
@@ -512,6 +516,8 @@ static int hdlc_rx_done(struct ucc_hdlc_private *priv, int rx_work_limit)
break;
case ARPHRD_PPP:
+ case ARPHRD_ETHER:
+
length -= HDLC_CRC_SIZE;
skb = dev_alloc_skb(length);
--
2.13.6
More information about the Linuxppc-dev
mailing list