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

Commit ecf51424 authored by Sara Sharon's avatar Sara Sharon Committed by Luca Coelho
Browse files

iwlwifi: mvm: checksum IPv6 fragmented packet



Our HW does not support checksum of fragmented packets.
Fix code accordingly to checksum those packets in the driver.

Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Fixes: 5e6a98dc ("iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family")
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 849a9627
Loading
Loading
Loading
Loading
+6 −15
Original line number Diff line number Diff line
@@ -138,29 +138,20 @@ static void iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb,

		protocol = ipv6h->nexthdr;
		while (protocol != NEXTHDR_NONE && ipv6_ext_hdr(protocol)) {
			struct ipv6_opt_hdr *hp;

			/* only supported extension headers */
			if (protocol != NEXTHDR_ROUTING &&
			    protocol != NEXTHDR_HOP &&
			    protocol != NEXTHDR_DEST &&
			    protocol != NEXTHDR_FRAGMENT) {
			    protocol != NEXTHDR_DEST) {
				skb_checksum_help(skb);
				return;
			}

			if (protocol == NEXTHDR_FRAGMENT) {
				struct frag_hdr *hp =
					OPT_HDR(struct frag_hdr, skb, off);

				protocol = hp->nexthdr;
				off += sizeof(struct frag_hdr);
			} else {
				struct ipv6_opt_hdr *hp =
					OPT_HDR(struct ipv6_opt_hdr, skb, off);

			hp = OPT_HDR(struct ipv6_opt_hdr, skb, off);
			protocol = hp->nexthdr;
			off += ipv6_optlen(hp);
		}
		}
		/* if we get here - protocol now should be TCP/UDP */
#endif
	}