mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
net: fec: correct rx_bytes statistic for the case SHIFT16 is set
[ Upstream commit ad17e7e92a7c52ce70bb764813fcf99464f96903 ]
Two additional bytes in front of each frame received into the RX FIFO if
SHIFT16 is set, so we need to subtract the extra two bytes from pkt_len
to correct the statistic of rx_bytes.
Fixes: 3ac72b7b63 ("net: fec: align IP header in hardware")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20251106021421.2096585-1-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c2ec6ebd8e
commit
e78b093bad
1 changed files with 2 additions and 0 deletions
|
|
@ -1530,6 +1530,8 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
|
|||
ndev->stats.rx_packets++;
|
||||
pkt_len = fec16_to_cpu(bdp->cbd_datlen);
|
||||
ndev->stats.rx_bytes += pkt_len;
|
||||
if (fep->quirks & FEC_QUIRK_HAS_RACC)
|
||||
ndev->stats.rx_bytes -= 2;
|
||||
|
||||
index = fec_enet_get_bd_index(bdp, &rxq->bd);
|
||||
skb = rxq->rx_skbuff[index];
|
||||
|
|
|
|||
Loading…
Reference in a new issue