]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: qualcomm: fix QCA7000 checksum handling
authorStefan Wahren <stefan.wahren@i2se.com>
Sat, 28 Aug 2021 14:23:15 +0000 (16:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Aug 2021 10:28:02 +0000 (11:28 +0100)
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: Michael Heimpold <michael.heimpold@in-tech.com>
Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/qca_spi.c
drivers/net/ethernet/qualcomm/qca_uart.c

index b64c254e00ba19fb9aaf43f26980d399b3baebf2..8427fe1b8fd1c95759ffeb1271ba22e8628fbdae 100644 (file)
@@ -434,7 +434,7 @@ qcaspi_receive(struct qcaspi *qca)
                                skb_put(qca->rx_skb, retcode);
                                qca->rx_skb->protocol = eth_type_trans(
                                        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);
                                qca->rx_skb = netdev_alloc_skb_ip_align(net_dev,
                                        net_dev->mtu + VLAN_ETH_HLEN);
index bcdeca7b33664c3637557439b61d4a6143a4b758..ce3f7ce31adc1ab6c294d63a1e5482c164bf840d 100644 (file)
@@ -107,7 +107,7 @@ qca_tty_receive(struct serdev_device *serdev, const unsigned char *data,
                        skb_put(qca->rx_skb, retcode);
                        qca->rx_skb->protocol = eth_type_trans(
                                                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);
                        qca->rx_skb = netdev_alloc_skb_ip_align(netdev,
                                                                netdev->mtu +