OSDN Git Service

iwlwifi: remove remaining software checksum code
authorJohannes Berg <johannes.berg@intel.com>
Sun, 11 Apr 2021 09:46:20 +0000 (12:46 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 14 Apr 2021 09:07:18 +0000 (12:07 +0300)
After the removal of the software checksum code for the
A-MSDU path that we had for testing, the csum_skb variable
stuck around. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210411124417.280f268ae679.Iad455b6c91e427c9f74963bbd3eb0ce743aaac53@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/tx.c
drivers/net/wireless/intel/iwlwifi/queue/tx.c

index b07194b..0346505 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2003-2014, 2018-2020 Intel Corporation
+ * Copyright (C) 2003-2014, 2018-2021 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
  */
@@ -1350,7 +1350,6 @@ static int iwl_fill_data_tbs_amsdu(struct iwl_trans *trans, struct sk_buff *skb,
                /* this is the data left for this subframe */
                unsigned int data_left =
                        min_t(unsigned int, mss, total_len);
-               struct sk_buff *csum_skb = NULL;
                unsigned int hdr_tb_len;
                dma_addr_t hdr_tb_phys;
                u8 *subf_hdrs_start = hdr_page->pos;
@@ -1381,10 +1380,8 @@ static int iwl_fill_data_tbs_amsdu(struct iwl_trans *trans, struct sk_buff *skb,
                hdr_tb_len = hdr_page->pos - start_hdr;
                hdr_tb_phys = dma_map_single(trans->dev, start_hdr,
                                             hdr_tb_len, DMA_TO_DEVICE);
-               if (unlikely(dma_mapping_error(trans->dev, hdr_tb_phys))) {
-                       dev_kfree_skb(csum_skb);
+               if (unlikely(dma_mapping_error(trans->dev, hdr_tb_phys)))
                        return -EINVAL;
-               }
                iwl_pcie_txq_build_tfd(trans, txq, hdr_tb_phys,
                                       hdr_tb_len, false);
                trace_iwlwifi_dev_tx_tb(trans->dev, skb, start_hdr,
@@ -1403,10 +1400,8 @@ static int iwl_fill_data_tbs_amsdu(struct iwl_trans *trans, struct sk_buff *skb,
 
                        tb_phys = dma_map_single(trans->dev, tso.data,
                                                 size, DMA_TO_DEVICE);
-                       if (unlikely(dma_mapping_error(trans->dev, tb_phys))) {
-                               dev_kfree_skb(csum_skb);
+                       if (unlikely(dma_mapping_error(trans->dev, tb_phys)))
                                return -EINVAL;
-                       }
 
                        iwl_pcie_txq_build_tfd(trans, txq, tb_phys,
                                               size, false);
index 833f43d..494f9db 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2020 Intel Corporation
+ * Copyright (C) 2020-2021 Intel Corporation
  */
 #include <net/tso.h>
 #include <linux/tcp.h>
@@ -399,7 +399,6 @@ static int iwl_txq_gen2_build_amsdu(struct iwl_trans *trans,
        while (total_len) {
                /* this is the data left for this subframe */
                unsigned int data_left = min_t(unsigned int, mss, total_len);
-               struct sk_buff *csum_skb = NULL;
                unsigned int tb_len;
                dma_addr_t tb_phys;
                u8 *subf_hdrs_start = hdr_page->pos;
@@ -430,10 +429,8 @@ static int iwl_txq_gen2_build_amsdu(struct iwl_trans *trans,
                tb_len = hdr_page->pos - start_hdr;
                tb_phys = dma_map_single(trans->dev, start_hdr,
                                         tb_len, DMA_TO_DEVICE);
-               if (unlikely(dma_mapping_error(trans->dev, tb_phys))) {
-                       dev_kfree_skb(csum_skb);
+               if (unlikely(dma_mapping_error(trans->dev, tb_phys)))
                        goto out_err;
-               }
                /*
                 * No need for _with_wa, this is from the TSO page and
                 * we leave some space at the end of it so can't hit
@@ -458,10 +455,8 @@ static int iwl_txq_gen2_build_amsdu(struct iwl_trans *trans,
                        ret = iwl_txq_gen2_set_tb_with_wa(trans, skb, tfd,
                                                          tb_phys, tso.data,
                                                          tb_len, NULL);
-                       if (ret) {
-                               dev_kfree_skb(csum_skb);
+                       if (ret)
                                goto out_err;
-                       }
 
                        data_left -= tb_len;
                        tso_build_data(skb, &tso, tb_len);