mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: fix shift overflow warning on 32 bit systems
Fix additional shift overflow warning on 32 bit systems for mt7996 mac.c
source.
Fixes: 95c14207d2 ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM")
Signed-off-by: Christian Marangi <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
f559adf184
commit
f63f87cd5b
+7
-3
@@ -942,9 +942,13 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
|
||||
|
||||
txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE);
|
||||
for (i = 0; i < nbuf; i++) {
|
||||
u16 len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len) |
|
||||
FIELD_PREP(MT_TXP_DMA_ADDR_H,
|
||||
tx_info->buf[i + 1].addr >> 32);
|
||||
u16 len;
|
||||
|
||||
len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len);
|
||||
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
|
||||
len |= FIELD_PREP(MT_TXP_DMA_ADDR_H,
|
||||
tx_info->buf[i + 1].addr >> 32);
|
||||
#endif
|
||||
|
||||
txp->fw.buf[i] = cpu_to_le32(tx_info->buf[i + 1].addr);
|
||||
txp->fw.len[i] = cpu_to_le16(len);
|
||||
|
||||
Reference in New Issue
Block a user