@@ -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);