Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef3e9ed0 authored by Niranjana Vishwanathapura's avatar Niranjana Vishwanathapura Committed by Gerrit - the friendly Code Review server
Browse files

msm: emac: Set checksum flag properly for received packets



When the receive checksum offload is enabled, set the checksum
flag for received packets indicating that no further checksum
validation is necessary.

Change-Id: Iea0b57dd951d979313bb8cf8c815a8cae74fee66
Signed-off-by: default avatarNiranjana Vishwanathapura <nvishwan@codeaurora.org>
parent 420f17b6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -466,9 +466,12 @@ static void emac_handle_rx(struct emac_adapter *adpt,
		}

		skb_put(skb, srrd.genr.pkt_len - ETH_FCS_LEN);
		skb->ip_summed = CHECKSUM_NONE;
		skb->dev = netdev;
		skb->protocol = eth_type_trans(skb, skb->dev);
		if (netdev->features & NETIF_F_RXCSUM)
			skb->ip_summed = CHECKSUM_UNNECESSARY;
		else
			skb_checksum_none_assert(skb);

		if (CHK_HW_FLAG(TS_RX_EN)) {
			struct skb_shared_hwtstamps *hwts = skb_hwtstamps(skb);