iwlwifi: mvm: checksum IPv6 fragmented packet
authorSara Sharon <sara.sharon@intel.com>
Wed, 8 Jun 2016 12:15:41 +0000 (15:15 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 5 Jul 2016 23:09:56 +0000 (02:09 +0300)
Our HW does not support checksum of fragmented packets.
Fix code accordingly to checksum those packets in the driver.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Fixes: 5e6a98dc4863 ("iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/tx.c

index 2373142b0f432ca9e53e4375d93177fcf28269ca..f3a6e95cedece8e861923e2b20c74e8061e3941c 100644 (file)
@@ -138,28 +138,19 @@ 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);
-
-                               protocol = hp->nexthdr;
-                               off += ipv6_optlen(hp);
-                       }
+                       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