ath10k: sdio: set skb len for all rx packets
authorAlagu Sankar <alagusankar@silex-india.com>
Fri, 29 Jun 2018 13:28:00 +0000 (16:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Oct 2018 00:00:49 +0000 (17:00 -0700)
[ Upstream commit 8530b4e7b22bc3bd8240579f3844c73947cd5f71 ]

Without this, packets larger than 1500 will silently be dropped.
Easily reproduced by sending a ping packet with a size larger
than 1500.

Co-Developed-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Alagu Sankar <alagusankar@silex-india.com>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath10k/sdio.c

index 895ccfb2141ff7d88be9bf356a0db4a1976ec4b8..c5e6f4254e49c92b5a786a8f991f32193dbe1ff6 100644 (file)
@@ -396,6 +396,7 @@ static int ath10k_sdio_mbox_rx_process_packet(struct ath10k *ar,
        int ret;
 
        payload_len = le16_to_cpu(htc_hdr->len);
+       skb->len = payload_len + sizeof(struct ath10k_htc_hdr);
 
        if (trailer_present) {
                trailer = skb->data + sizeof(*htc_hdr) +