mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-14 11:07:32 +07:00
iwl3945: set TFD_QUEUE_MAX to correct value
Total number of queues is 8 but only 7 of them are TX queues. 4 AC(Data) queue ,1 CMD and 2 HCCA. The HCCA queues are not used. max_txq_num is set to maximum usable TX queues. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
b1c6019bc0
commit
21c02a1ab2
@ -233,7 +233,7 @@ struct iwl3945_eeprom {
|
|||||||
#define PCI_CFG_REV_ID_BIT_RTP (0x80) /* bit 7 */
|
#define PCI_CFG_REV_ID_BIT_RTP (0x80) /* bit 7 */
|
||||||
|
|
||||||
#define TFD_QUEUE_MIN 0
|
#define TFD_QUEUE_MIN 0
|
||||||
#define TFD_QUEUE_MAX 6
|
#define TFD_QUEUE_MAX 5 /* 4 DATA + 1 CMD */
|
||||||
|
|
||||||
#define IWL_NUM_SCAN_RATES (2)
|
#define IWL_NUM_SCAN_RATES (2)
|
||||||
|
|
||||||
|
@ -1046,7 +1046,7 @@ static int iwl3945_txq_ctx_reset(struct iwl_priv *priv)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* Tx queue(s) */
|
/* Tx queue(s) */
|
||||||
for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) {
|
for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) {
|
||||||
slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ?
|
slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ?
|
||||||
TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS;
|
TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS;
|
||||||
rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num,
|
rc = iwl_tx_queue_init(priv, &priv->txq[txq_id], slots_num,
|
||||||
@ -1239,7 +1239,7 @@ void iwl3945_hw_txq_ctx_free(struct iwl_priv *priv)
|
|||||||
int txq_id;
|
int txq_id;
|
||||||
|
|
||||||
/* Tx queues */
|
/* Tx queues */
|
||||||
for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++)
|
for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++)
|
||||||
iwl_tx_queue_free(priv, txq_id);
|
iwl_tx_queue_free(priv, txq_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1259,7 +1259,7 @@ void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv)
|
|||||||
iwl_write_prph(priv, ALM_SCD_MODE_REG, 0);
|
iwl_write_prph(priv, ALM_SCD_MODE_REG, 0);
|
||||||
|
|
||||||
/* reset TFD queues */
|
/* reset TFD queues */
|
||||||
for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) {
|
for (txq_id = 0; txq_id <= priv->hw_params.max_txq_num; txq_id++) {
|
||||||
iwl_write_direct32(priv, FH39_TCSR_CONFIG(txq_id), 0x0);
|
iwl_write_direct32(priv, FH39_TCSR_CONFIG(txq_id), 0x0);
|
||||||
iwl_poll_direct_bit(priv, FH39_TSSR_TX_STATUS,
|
iwl_poll_direct_bit(priv, FH39_TSSR_TX_STATUS,
|
||||||
FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id),
|
FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id),
|
||||||
@ -2488,6 +2488,9 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Assign number of Usable TX queues */
|
||||||
|
priv->hw_params.max_txq_num = TFD_QUEUE_MAX;
|
||||||
|
|
||||||
priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd);
|
priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd);
|
||||||
priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K;
|
priv->hw_params.rx_buf_size = IWL_RX_BUF_SIZE_3K;
|
||||||
priv->hw_params.max_pkt_size = 2342;
|
priv->hw_params.max_pkt_size = 2342;
|
||||||
|
Loading…
Reference in New Issue
Block a user