To avoid connection issue on mt7622. Signed-off-by: Zhiqiang Yang <zhiqiang.yang@xxxxxxxxxxxx> Signed-off-by: Ryder Lee <ryder.lee@xxxxxxxxxxxx> --- drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c index 64ffffdc93c9..2cb7a6ff0ffd 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c @@ -183,6 +183,8 @@ static void mt7915_pci_init_hif2(struct mt7915_dev *dev) return; dev->hif2 = hif; + dev->hif_idx = ++hif_idx; + mt76_wr(dev, MT_PCIE_RECOG_ID, dev->hif_idx | MT_PCIE_RECOG_ID_SEM); if (devm_request_irq(dev->mt76.dev, hif->irq, mt7915_irq_handler, IRQF_SHARED, KBUILD_MODNAME "-hif", dev)) { @@ -280,9 +282,6 @@ static int mt7915_pci_probe(struct pci_dev *pdev, if (ret) goto error; - dev->hif_idx = ++hif_idx; - mt76_wr(dev, MT_PCIE_RECOG_ID, dev->hif_idx | MT_PCIE_RECOG_ID_SEM); - mt7915_pci_init_hif2(dev); ret = mt7915_register_device(dev); -- 2.18.0