]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.7.7/iwlwifi-mvm-checksum-ipv6-fragmented-packet.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.7.7 / iwlwifi-mvm-checksum-ipv6-fragmented-packet.patch
1 From ecf51424152bad1b2727409f42ddf1bd86f44b7d Mon Sep 17 00:00:00 2001
2 From: Sara Sharon <sara.sharon@intel.com>
3 Date: Wed, 8 Jun 2016 15:15:41 +0300
4 Subject: iwlwifi: mvm: checksum IPv6 fragmented packet
5
6 From: Sara Sharon <sara.sharon@intel.com>
7
8 commit ecf51424152bad1b2727409f42ddf1bd86f44b7d upstream.
9
10 Our HW does not support checksum of fragmented packets.
11 Fix code accordingly to checksum those packets in the driver.
12
13 Signed-off-by: Sara Sharon <sara.sharon@intel.com>
14 Fixes: 5e6a98dc4863 ("iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family")
15 Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18 ---
19 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 21 ++++++---------------
20 1 file changed, 6 insertions(+), 15 deletions(-)
21
22 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
23 +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
24 @@ -138,28 +138,19 @@ static void iwl_mvm_tx_csum(struct iwl_m
25
26 protocol = ipv6h->nexthdr;
27 while (protocol != NEXTHDR_NONE && ipv6_ext_hdr(protocol)) {
28 + struct ipv6_opt_hdr *hp;
29 +
30 /* only supported extension headers */
31 if (protocol != NEXTHDR_ROUTING &&
32 protocol != NEXTHDR_HOP &&
33 - protocol != NEXTHDR_DEST &&
34 - protocol != NEXTHDR_FRAGMENT) {
35 + protocol != NEXTHDR_DEST) {
36 skb_checksum_help(skb);
37 return;
38 }
39
40 - if (protocol == NEXTHDR_FRAGMENT) {
41 - struct frag_hdr *hp =
42 - OPT_HDR(struct frag_hdr, skb, off);
43 -
44 - protocol = hp->nexthdr;
45 - off += sizeof(struct frag_hdr);
46 - } else {
47 - struct ipv6_opt_hdr *hp =
48 - OPT_HDR(struct ipv6_opt_hdr, skb, off);
49 -
50 - protocol = hp->nexthdr;
51 - off += ipv6_optlen(hp);
52 - }
53 + hp = OPT_HDR(struct ipv6_opt_hdr, skb, off);
54 + protocol = hp->nexthdr;
55 + off += ipv6_optlen(hp);
56 }
57 /* if we get here - protocol now should be TCP/UDP */
58 #endif