/* iwl4965_tx_queue_set_q2ratid - Map unique receiver/tid combination to a queue  */
static int iwl4965_tx_queue_set_q2ratid(struct iwl_priv *priv, u16 ra_tid, u16 txq_id)
/* iwl4965_tx_queue_set_q2ratid - Map unique receiver/tid combination to a queue  */
static int iwl4965_tx_queue_set_q2ratid(struct iwl_priv *priv, u16 ra_tid, u16 txq_id)
{
	u32 tbl_dw_addr;
	u32 tbl_dw;
	u16 scd_q2ratid;
	scd_q2ratid = ra_tid & IWL_SCD_QUEUE_RA_TID_MAP_RATID_MSK;
	tbl_dw_addr = priv->scd_base_addr +
			IWL49_SCD_TRANSLATE_TBL_OFFSET_QUEUE(txq_id);
	tbl_dw = iwl_read_targ_mem(priv, tbl_dw_addr);
	if (txq_id & 0x1)
		tbl_dw = (scd_q2ratid << 16) | (tbl_dw & 0x0000FFFF);
	else
		tbl_dw = scd_q2ratid | (tbl_dw & 0xFFFF0000);
	iwl_write_targ_mem(priv, tbl_dw_addr, tbl_dw);
	return 0;
}