summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-08-16 11:10:46 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-08-22 13:19:23 +0200
commita06320044a30d2ef33fa07f3df5d7411c217d4c0 (patch)
treec63868cb8ca332cd62319f486d771afcef71bdbc /drivers/net/wireless/intel/iwlwifi/pcie/tx.c
parentd9d115fed674351effd8610aad1e8f1178a5f8b9 (diff)
wifi: iwlwifi: pcie: clean up gen1/gen2 TFD unmap
This is a bit messy right now, there are functions for both, but then gen1 function can actually deal with both gen1 and gen2, due to the confusion about use_tfh/gen2 cleaned up in the previous patch. Fix the common paths to call the right functions and remove handling of gen2 from the gen1 function. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230816104355.baf23841ec5c.I40702e94b25db05e82f935f14548316f8c6429b9@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie/tx.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/tx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
index 790e5b124740..9ab1b2590dd2 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
@@ -1203,7 +1203,11 @@ void iwl_pcie_hcmd_complete(struct iwl_trans *trans,
group_id = cmd->hdr.group_id;
cmd_id = WIDE_ID(group_id, cmd->hdr.cmd);
- iwl_txq_gen1_tfd_unmap(trans, meta, txq, index);
+ if (trans->trans_cfg->gen2)
+ iwl_txq_gen2_tfd_unmap(trans, meta,
+ iwl_txq_get_tfd(trans, txq, index));
+ else
+ iwl_txq_gen1_tfd_unmap(trans, meta, txq, index);
/* Input error checking is done when commands are added to queue. */
if (meta->flags & CMD_WANT_SKB) {