Lines Matching refs:mdev

137 static u32 mt7921_rr(struct mt76_dev *mdev, u32 offset)  in mt7921_rr()  argument
139 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_rr()
142 return dev->bus_ops->rr(mdev, addr); in mt7921_rr()
145 static void mt7921_wr(struct mt76_dev *mdev, u32 offset, u32 val) in mt7921_wr() argument
147 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_wr()
150 dev->bus_ops->wr(mdev, addr, val); in mt7921_wr()
153 static u32 mt7921_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val) in mt7921_rmw() argument
155 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_rmw()
158 return dev->bus_ops->rmw(mdev, addr, mask, val); in mt7921_rmw()
270 struct mt76_dev *mdev; in mt7921_pci_probe() local
308 mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), ops, &drv_ops); in mt7921_pci_probe()
309 if (!mdev) { in mt7921_pci_probe()
314 pci_set_drvdata(pdev, mdev); in mt7921_pci_probe()
316 dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_pci_probe()
321 tasklet_init(&mdev->irq_tasklet, mt792x_irq_tasklet, (unsigned long)dev); in mt7921_pci_probe()
347 mdev->rev = (mt7921_l1_rr(dev, MT_HW_CHIPID) << 16) | in mt7921_pci_probe()
349 dev_info(mdev->dev, "ASIC revision: %04x\n", mdev->rev); in mt7921_pci_probe()
359 ret = devm_request_irq(mdev->dev, pdev->irq, mt792x_irq_handler, in mt7921_pci_probe()
386 struct mt76_dev *mdev = pci_get_drvdata(pdev); in mt7921_pci_remove() local
387 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_pci_remove()
390 set_bit(MT76_REMOVED, &mdev->phy.state); in mt7921_pci_remove()
399 struct mt76_dev *mdev = pci_get_drvdata(pdev); in mt7921_pci_suspend() local
400 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_pci_suspend()
413 err = mt76_connac_mcu_set_hif_suspend(mdev, true); in mt7921_pci_suspend()
422 napi_disable(&mdev->tx_napi); in mt7921_pci_suspend()
423 mt76_worker_disable(&mdev->tx_worker); in mt7921_pci_suspend()
425 mt76_for_each_q_rx(mdev, i) { in mt7921_pci_suspend()
426 napi_disable(&mdev->napi[i]); in mt7921_pci_suspend()
442 tasklet_kill(&mdev->irq_tasklet); in mt7921_pci_suspend()
451 mt76_for_each_q_rx(mdev, i) { in mt7921_pci_suspend()
452 napi_enable(&mdev->napi[i]); in mt7921_pci_suspend()
454 napi_enable(&mdev->tx_napi); in mt7921_pci_suspend()
459 mt76_connac_mcu_set_hif_suspend(mdev, false); in mt7921_pci_suspend()
473 struct mt76_dev *mdev = pci_get_drvdata(pdev); in mt7921_pci_resume() local
474 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_pci_resume()
495 mt76_worker_enable(&mdev->tx_worker); in mt7921_pci_resume()
498 mt76_for_each_q_rx(mdev, i) { in mt7921_pci_resume()
499 napi_enable(&mdev->napi[i]); in mt7921_pci_resume()
500 napi_schedule(&mdev->napi[i]); in mt7921_pci_resume()
502 napi_enable(&mdev->tx_napi); in mt7921_pci_resume()
503 napi_schedule(&mdev->tx_napi); in mt7921_pci_resume()
510 err = mt76_connac_mcu_set_hif_suspend(mdev, false); in mt7921_pci_resume()