mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM
Introduce the capability to run mt7996 driver on boards with more than 4GB of memory. Co-developed-by: Rex Lu <[email protected]> Signed-off-by: Rex Lu <[email protected]> Signed-off-by: Sujuan Chen <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
9ef06028d4
commit
95c14207d2
@@ -232,8 +232,8 @@ mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q,
|
||||
struct mt76_queue_entry *entry = &q->entry[q->head];
|
||||
struct mt76_txwi_cache *txwi = NULL;
|
||||
struct mt76_desc *desc;
|
||||
u32 buf1 = 0, ctrl;
|
||||
int idx = q->head;
|
||||
u32 buf1, ctrl;
|
||||
int rx_token;
|
||||
|
||||
if (mt76_queue_is_wed_rro_ind(q)) {
|
||||
@@ -246,6 +246,7 @@ mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q,
|
||||
|
||||
desc = &q->desc[q->head];
|
||||
ctrl = FIELD_PREP(MT_DMA_CTL_SD_LEN0, buf[0].len);
|
||||
buf1 = FIELD_PREP(MT_DMA_CTL_SDP0_H, buf->addr >> 32);
|
||||
|
||||
if (mt76_queue_is_wed_rx(q)) {
|
||||
txwi = mt76_get_rxwi(dev);
|
||||
@@ -312,11 +313,14 @@ mt76_dma_add_buf(struct mt76_dev *dev, struct mt76_queue *q,
|
||||
entry->dma_len[0] = buf[0].len;
|
||||
|
||||
ctrl = FIELD_PREP(MT_DMA_CTL_SD_LEN0, buf[0].len);
|
||||
info |= FIELD_PREP(MT_DMA_CTL_SDP0_H, buf[0].addr >> 32);
|
||||
if (i < nbufs - 1) {
|
||||
entry->dma_addr[1] = buf[1].addr;
|
||||
entry->dma_len[1] = buf[1].len;
|
||||
buf1 = buf[1].addr;
|
||||
ctrl |= FIELD_PREP(MT_DMA_CTL_SD_LEN1, buf[1].len);
|
||||
info |= FIELD_PREP(MT_DMA_CTL_SDP1_H,
|
||||
buf[1].addr >> 32);
|
||||
if (buf[1].skip_unmap)
|
||||
entry->skip_buf1 = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user