提交 195a02cb 编写于 作者: S Stefan Wahren 提交者: Zheng Zengkai

net: qualcomm: fix QCA7000 checksum handling

stable inclusion
from stable-5.10.65
commit a67c66c1bb1244c0a9028fa1003e99a264a1abd8
bugzilla: 182361 https://gitee.com/openeuler/kernel/issues/I4EH3U

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a67c66c1bb1244c0a9028fa1003e99a264a1abd8

--------------------------------

[ Upstream commit 429205da ]

Based on tests the QCA7000 doesn't support checksum offloading. So assume
ip_summed is CHECKSUM_NONE and let the kernel take care of the checksum
handling. This fixes data transfer issues in noisy environments.
Reported-by: NMichael Heimpold <michael.heimpold@in-tech.com>
Fixes: 291ab06e ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 08d76116
...@@ -434,7 +434,7 @@ qcaspi_receive(struct qcaspi *qca) ...@@ -434,7 +434,7 @@ qcaspi_receive(struct qcaspi *qca)
skb_put(qca->rx_skb, retcode); skb_put(qca->rx_skb, retcode);
qca->rx_skb->protocol = eth_type_trans( qca->rx_skb->protocol = eth_type_trans(
qca->rx_skb, qca->rx_skb->dev); qca->rx_skb, qca->rx_skb->dev);
qca->rx_skb->ip_summed = CHECKSUM_UNNECESSARY; skb_checksum_none_assert(qca->rx_skb);
netif_rx_ni(qca->rx_skb); netif_rx_ni(qca->rx_skb);
qca->rx_skb = netdev_alloc_skb_ip_align(net_dev, qca->rx_skb = netdev_alloc_skb_ip_align(net_dev,
net_dev->mtu + VLAN_ETH_HLEN); net_dev->mtu + VLAN_ETH_HLEN);
......
...@@ -107,7 +107,7 @@ qca_tty_receive(struct serdev_device *serdev, const unsigned char *data, ...@@ -107,7 +107,7 @@ qca_tty_receive(struct serdev_device *serdev, const unsigned char *data,
skb_put(qca->rx_skb, retcode); skb_put(qca->rx_skb, retcode);
qca->rx_skb->protocol = eth_type_trans( qca->rx_skb->protocol = eth_type_trans(
qca->rx_skb, qca->rx_skb->dev); qca->rx_skb, qca->rx_skb->dev);
qca->rx_skb->ip_summed = CHECKSUM_UNNECESSARY; skb_checksum_none_assert(qca->rx_skb);
netif_rx_ni(qca->rx_skb); netif_rx_ni(qca->rx_skb);
qca->rx_skb = netdev_alloc_skb_ip_align(netdev, qca->rx_skb = netdev_alloc_skb_ip_align(netdev,
netdev->mtu + netdev->mtu +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册