aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-06-12 18:51:12 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-06-14 12:32:18 +0200
commitaf8bfc7e38a7ad4f8e1663de7ab1463e644050b2 (patch)
treee349ef8796f24b3b5f90e55cac45c4ebf1248099 /drivers/net/wireless/intel/iwlwifi/mvm/tx.c
parentwifi: iwlwifi: fw: print PC register value instead of address (diff)
downloadwireguard-linux-af8bfc7e38a7ad4f8e1663de7ab1463e644050b2.tar.xz
wireguard-linux-af8bfc7e38a7ad4f8e1663de7ab1463e644050b2.zip
wifi: iwlwifi: mvm: always set MH len in offload_assist
Some versions of the new hardware don't have a functional version of the new offload method, but still have stricter checks on the MAC header (MH) length in the offload assist word. Include that even if checksumming isn't offloaded to hardware. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230612184434.bba713f7495a.Idbc8e3ce313b51af4060326e0191bd338b3163a2@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/tx.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index ccd1e41604f3..547694c89ffa 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -44,9 +44,9 @@ static u16 iwl_mvm_tx_csum_pre_bz(struct iwl_mvm *mvm, struct sk_buff *skb,
struct ieee80211_tx_info *info, bool amsdu)
{
struct ieee80211_hdr *hdr = (void *)skb->data;
+ u16 mh_len = ieee80211_hdrlen(hdr->frame_control);
u16 offload_assist = 0;
#if IS_ENABLED(CONFIG_INET)
- u16 mh_len = ieee80211_hdrlen(hdr->frame_control);
u8 protocol = 0;
/* Do not compute checksum if already computed */
@@ -118,6 +118,8 @@ static u16 iwl_mvm_tx_csum_pre_bz(struct iwl_mvm *mvm, struct sk_buff *skb,
else
udp_hdr(skb)->check = 0;
+out:
+#endif
/*
* mac header len should include IV, size is in words unless
* the IV is added by the firmware like in WEP.
@@ -130,8 +132,6 @@ static u16 iwl_mvm_tx_csum_pre_bz(struct iwl_mvm *mvm, struct sk_buff *skb,
mh_len /= 2;
offload_assist |= mh_len << TX_CMD_OFFLD_MH_SIZE;
-out:
-#endif
if (amsdu)
offload_assist |= BIT(TX_CMD_OFFLD_AMSDU);
else if (ieee80211_hdrlen(hdr->frame_control) % 4)