mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: Fix BAND2 tx queues initialization when NPU is enabled
Fix BAND2 tx queues initialization for MT7990 chipset when NPU is enabled. This is a preliminary patch to enable NPU offload for MT7996 (Eagle) chipset. Tested-by: Kang Yang <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
5c67ef5088
commit
8e94d3266b
+12
-6
@@ -684,8 +684,9 @@ static int mt7996_register_phy(struct mt7996_dev *dev, enum mt76_band_id band)
|
||||
return 0;
|
||||
|
||||
if (dev->hif2 &&
|
||||
((is_mt7996(&dev->mt76) && band == MT_BAND2) ||
|
||||
(is_mt7992(&dev->mt76) && band == MT_BAND1))) {
|
||||
((is_mt7992(&dev->mt76) && band == MT_BAND1) ||
|
||||
(is_mt7996(&dev->mt76) && band == MT_BAND2 &&
|
||||
!mt76_npu_device_active(&dev->mt76)))) {
|
||||
hif1_ofs = MT_WFDMA0_PCIE1(0) - MT_WFDMA0(0);
|
||||
wed = &dev->mt76.mmio.wed_hif2;
|
||||
}
|
||||
@@ -725,14 +726,19 @@ static int mt7996_register_phy(struct mt7996_dev *dev, enum mt76_band_id band)
|
||||
/* init wiphy according to mphy and phy */
|
||||
mt7996_init_wiphy_band(mphy->hw, phy);
|
||||
|
||||
if (is_mt7996(&dev->mt76) && !dev->hif2 && band == MT_BAND1) {
|
||||
if (is_mt7996(&dev->mt76) &&
|
||||
((band == MT_BAND1 && !dev->hif2) ||
|
||||
(band == MT_BAND2 && mt76_npu_device_active(&dev->mt76)))) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i <= MT_TXQ_PSD; i++)
|
||||
mphy->q_tx[i] = dev->mt76.phys[MT_BAND0]->q_tx[0];
|
||||
mphy->q_tx[i] = dev->mt76.phys[band - 1]->q_tx[0];
|
||||
} else {
|
||||
ret = mt7996_init_tx_queues(mphy->priv, MT_TXQ_ID(band),
|
||||
MT7996_TX_RING_SIZE,
|
||||
int size = is_mt7996(&dev->mt76) &&
|
||||
mt76_npu_device_active(&dev->mt76)
|
||||
? MT7996_NPU_TX_RING_SIZE / 2 : MT7996_TX_RING_SIZE;
|
||||
|
||||
ret = mt7996_init_tx_queues(mphy->priv, MT_TXQ_ID(band), size,
|
||||
MT_TXQ_RING_BASE(band) + hif1_ofs,
|
||||
wed);
|
||||
if (ret)
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#define MT7996_RX_RING_SIZE 1536
|
||||
#define MT7996_RX_MCU_RING_SIZE 512
|
||||
#define MT7996_RX_MCU_RING_SIZE_WA 1024
|
||||
#define MT7996_NPU_TX_RING_SIZE 1024
|
||||
/* scatter-gather of mcu event is not supported in connac3 */
|
||||
#define MT7996_RX_MCU_BUF_SIZE (2048 + \
|
||||
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
|
||||
|
||||
Reference in New Issue
Block a user