[PATCH 3/6][SRU][Focal] iwlwifi: pcie: rx: use rxq queue_size instead of constant
AceLan Kao
acelan.kao at canonical.com
Wed Mar 4 06:08:20 UTC 2020
From: Johannes Berg <johannes.berg at intel.com>
BugLink: https://bugs.launchpad.net/bugs/1865962
This is a little less efficient now as it's known to be a
multiqueue device in this function, but a future patch will
have to use a variable here anyway, so use rxq->queue_size
now instead to make it clearer.
Signed-off-by: Johannes Berg <johannes.berg at intel.com>
Signed-off-by: Luca Coelho <luciano.coelho at intel.com>
(cherry picked from commit 5661925a9b383f7cb348c196c6c69ab92f08102d)
Signed-off-by: AceLan Kao <acelan.kao at canonical.com>
---
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
index c97551f913d7..d0c692142dd0 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
@@ -322,7 +322,7 @@ static void iwl_pcie_rxmq_restock(struct iwl_trans *trans,
WARN_ON(rxb->page_dma & DMA_BIT_MASK(12));
/* Point to Rx buffer via next RBD in circular buffer */
iwl_pcie_restock_bd(trans, rxq, rxb);
- rxq->write = (rxq->write + 1) & MQ_RX_TABLE_MASK;
+ rxq->write = (rxq->write + 1) & (rxq->queue_size - 1);
rxq->free_count--;
}
spin_unlock(&rxq->lock);
--
2.17.1
More information about the kernel-team
mailing list