/* iwl4965_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array  */
static void iwl4965_txq_update_byte_cnt_tbl(struct iwl_priv *priv, struct iwl_tx_queue *txq, u16 byte_cnt)
/* iwl4965_txq_update_byte_cnt_tbl - Set up entry in Tx byte-count array  */
static void iwl4965_txq_update_byte_cnt_tbl(struct iwl_priv *priv, struct iwl_tx_queue *txq, u16 byte_cnt)
{
	struct iwl4965_scd_bc_tbl *scd_bc_tbl = priv->scd_bc_tbls.addr;
	int txq_id = txq->q.id;
	int write_ptr = txq->q.write_ptr;
	int len = byte_cnt + IWL_TX_CRC_SIZE + IWL_TX_DELIMITER_SIZE;
	__le16 bc_ent;
	WARN_ON(len > 0xFFF || write_ptr >= TFD_QUEUE_SIZE_MAX);
	bc_ent = cpu_to_le16(len & 0xFFF);
	scd_bc_tbl[txq_id].tfd_offset[write_ptr] = bc_ent;
	if (write_ptr < TFD_QUEUE_SIZE_BC_DUP)
		scd_bc_tbl[txq_id].
			tfd_offset[TFD_QUEUE_SIZE_MAX + write_ptr] = bc_ent;
}