diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-06-01 09:45:55 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-09-28 08:57:25 +0300 |
commit | 53f474e6a8d74d5dc0c3a015d889471f9a157685 (patch) | |
tree | c28c1a4cbe4ff7a6027153953c633643c2a993a8 /drivers | |
parent | 3f425b81ce41ab076e5052160a6defbfa8e7e56a (diff) | |
download | linux-stable-53f474e6a8d74d5dc0c3a015d889471f9a157685.tar.gz linux-stable-53f474e6a8d74d5dc0c3a015d889471f9a157685.tar.bz2 linux-stable-53f474e6a8d74d5dc0c3a015d889471f9a157685.zip |
iwlwifi: pcie: gen2: build A-MSDU only for GSO
If the incoming frame should be an A-MSDU, it may already be one,
for example in the case of NAN multicast being encapsulated in an
A-MSDU. Thus, use the GSO algorithm to build A-MSDU only if the
skb actually contains GSO data.
Fixes: 6ffe5de35b05 ("iwlwifi: pcie: add AMSDU to gen2")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c index 943891a9d3e7..ba9d37bed4c2 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c @@ -539,7 +539,12 @@ struct iwl_tfh_tfd *iwl_pcie_gen2_build_tfd(struct iwl_trans *trans, hdr_len = ieee80211_hdrlen(hdr->frame_control); - if (amsdu) + /* + * Only build A-MSDUs here if doing so by GSO, otherwise it may be + * an A-MSDU for other reasons, e.g. NAN or an A-MSDU having been + * built in the higher layers already. + */ + if (amsdu && skb_shinfo(skb)->gso_size) return iwl_pcie_gen2_build_tx_amsdu(trans, txq, dev_cmd, skb, out_meta, hdr_len, len); |