Skip to content

Commit 6570ea2

Browse files
jmberg-intelMiriam-Rachel
authored andcommitted
wifi: iwlwifi: remove bc_table_dword transport config
There's really no point in configuring this, it's just a question of hardware capability. Remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250503224232.6af4ea001226.I693f72a7c3a76e44f9ef2cefd62d606ad100a734@changeid
1 parent 995727b commit 6570ea2

File tree

6 files changed

+2
-14
lines changed

6 files changed

+2
-14
lines changed

drivers/net/wireless/intel/iwlwifi/iwl-trans.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,6 @@ struct iwl_dump_sanitize_ops {
401401
* @n_no_reclaim_cmds: # of commands in list
402402
* @rx_buf_size: RX buffer size needed for A-MSDUs
403403
* if unset 4k will be the RX buffer size
404-
* @bc_table_dword: set to true if the BC table expects the byte count to be
405-
* in DWORD (as opposed to bytes)
406404
* @scd_set_active: should the transport configure the SCD for HCMD queue
407405
* @command_groups: array of command groups, each member is an array of the
408406
* commands in the group; for debugging only
@@ -423,7 +421,6 @@ struct iwl_trans_config {
423421
unsigned int n_no_reclaim_cmds;
424422

425423
enum iwl_amsdu_size rx_buf_size;
426-
bool bc_table_dword;
427424
bool scd_set_active;
428425
const struct iwl_hcmd_arr *command_groups;
429426
int command_groups_size;

drivers/net/wireless/intel/iwlwifi/mvm/ops.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,8 +1445,6 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
14451445
trans_cfg.rx_buf_size = iwl_amsdu_size_to_rxb_size();
14461446

14471447
trans->wide_cmd_header = true;
1448-
trans_cfg.bc_table_dword =
1449-
mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210;
14501448

14511449
trans_cfg.command_groups = iwl_mvm_groups;
14521450
trans_cfg.command_groups_size = ARRAY_SIZE(iwl_mvm_groups);

drivers/net/wireless/intel/iwlwifi/pcie/internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ enum iwl_pcie_imr_status {
289289
/**
290290
* struct iwl_pcie_txqs - TX queues data
291291
*
292-
* @bc_table_dword: true if the BC table expects DWORD (as opposed to bytes)
293292
* @page_offs: offset from skb->cb to mac header page pointer
294293
* @dev_cmd_offs: offset from skb->cb to iwl_device_tx_cmd pointer
295294
* @queue_used: bit mask of used queues
@@ -315,7 +314,6 @@ struct iwl_pcie_txqs {
315314
struct iwl_txq *txq[IWL_MAX_TVQM_QUEUES];
316315
struct dma_pool *bc_pool;
317316
size_t bc_tbl_size;
318-
bool bc_table_dword;
319317
u8 page_offs;
320318
u8 dev_cmd_offs;
321319
struct iwl_tso_hdr_page __percpu *tso_hdr_page;

drivers/net/wireless/intel/iwlwifi/pcie/trans.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,6 @@ void iwl_trans_pcie_configure(struct iwl_trans *trans,
19931993
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
19941994
trans_pcie->supported_dma_mask = DMA_BIT_MASK(11);
19951995

1996-
trans_pcie->txqs.bc_table_dword = trans_cfg->bc_table_dword;
19971996
trans_pcie->scd_set_active = trans_cfg->scd_set_active;
19981997

19991998
trans->command_groups = trans_cfg->command_groups;

drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,6 @@ static void iwl_pcie_gen2_update_byte_tbl(struct iwl_trans *trans,
561561
struct iwl_txq *txq, u16 byte_cnt,
562562
int num_tbs)
563563
{
564-
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
565564
int idx = iwl_txq_get_cmd_index(txq, txq->write_ptr);
566565
u8 filled_tfd_size, num_fetch_chunks;
567566
u16 len = byte_cnt;
@@ -585,16 +584,12 @@ static void iwl_pcie_gen2_update_byte_tbl(struct iwl_trans *trans,
585584
if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) {
586585
struct iwl_gen3_bc_tbl_entry *scd_bc_tbl_gen3 = txq->bc_tbl.addr;
587586

588-
/* Starting from AX210, the HW expects bytes */
589-
WARN_ON(trans_pcie->txqs.bc_table_dword);
590587
WARN_ON(len > 0x3FFF);
591588
bc_ent = cpu_to_le16(len | (num_fetch_chunks << 14));
592589
scd_bc_tbl_gen3[idx].tfd_offset = bc_ent;
593590
} else {
594591
struct iwlagn_scd_bc_tbl *scd_bc_tbl = txq->bc_tbl.addr;
595592

596-
/* Before AX210, the HW expects DW */
597-
WARN_ON(!trans_pcie->txqs.bc_table_dword);
598593
len = DIV_ROUND_UP(len, 4);
599594
WARN_ON(len > 0xFFF);
600595
bc_ent = cpu_to_le16(len | (num_fetch_chunks << 12));

drivers/net/wireless/intel/iwlwifi/pcie/tx.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,8 @@ static void iwl_txq_gen1_update_byte_cnt_tbl(struct iwl_trans *trans,
20952095
len += IEEE80211_WEP_IV_LEN + IEEE80211_WEP_ICV_LEN;
20962096
break;
20972097
}
2098-
if (trans_pcie->txqs.bc_table_dword)
2098+
2099+
if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
20992100
len = DIV_ROUND_UP(len, 4);
21002101

21012102
if (WARN_ON(len > 0xFFF || write_ptr >= TFD_QUEUE_SIZE_MAX))

0 commit comments

Comments
 (0)