aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2017-06-21 03:35:09 -0400
committerLuca Coelho <luciano.coelho@intel.com>2017-08-01 04:02:54 -0400
commit3f25bb4b7f7718d391321608f947840a79934568 (patch)
treec11730599cca3c6b94786320de8aba21b5fdfa98
parent5f5d03143de5e0c593da4ab18fc6393c2815e108 (diff)
iwlwifi: mvm: fix TCP CSUM offload with WEP and A000 series
When we enabled TCP checksum offload, we need to tell the firmware where the IP header starts. If we have an IV, then we need to adapt that value since the IV is placed before the SNAP header. This is true only for cases where the driver adds the IV, not the WEP case in which the IV is added by the firmware itself. On A000 devices series, the IV is always added by the device. Fix this. Fixes: 5e6a98dc4863 ("iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 60360ed73f26..e5d3eba2e82a 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -185,8 +185,14 @@ static u16 iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb,
185 else 185 else
186 udp_hdr(skb)->check = 0; 186 udp_hdr(skb)->check = 0;
187 187
188 /* mac header len should include IV, size is in words */ 188 /*
189 if (info->control.hw_key) 189 * mac header len should include IV, size is in words unless
190 * the IV is added by the firmware like in WEP.
191 * In new Tx API, the IV is always added by the firmware.
192 */
193 if (!iwl_mvm_has_new_tx_api(mvm) && info->control.hw_key &&
194 info->control.hw_key->cipher != WLAN_CIPHER_SUITE_WEP40 &&
195 info->control.hw_key->cipher != WLAN_CIPHER_SUITE_WEP104)
190 mh_len += info->control.hw_key->iv_len; 196 mh_len += info->control.hw_key->iv_len;
191 mh_len /= 2; 197 mh_len /= 2;
192 offload_assist |= mh_len << TX_CMD_OFFLD_MH_SIZE; 198 offload_assist |= mh_len << TX_CMD_OFFLD_MH_SIZE;