Lines Matching refs:mdev

148 static u32 mt7921_rr(struct mt76_dev *mdev, u32 offset)  in mt7921_rr()  argument
150 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_rr()
153 return dev->bus_ops->rr(mdev, addr); in mt7921_rr()
156 static void mt7921_wr(struct mt76_dev *mdev, u32 offset, u32 val) in mt7921_wr() argument
158 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_wr()
161 dev->bus_ops->wr(mdev, addr, val); in mt7921_wr()
164 static u32 mt7921_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val) in mt7921_rmw() argument
166 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_rmw()
169 return dev->bus_ops->rmw(mdev, addr, mask, val); in mt7921_rmw()
282 struct mt76_dev *mdev; in mt7921_pci_probe() local
320 mdev = mt76_alloc_device(&pdev->dev, sizeof(*dev), ops, &drv_ops); in mt7921_pci_probe()
321 if (!mdev) { in mt7921_pci_probe()
326 pci_set_drvdata(pdev, mdev); in mt7921_pci_probe()
328 dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_pci_probe()
333 tasklet_init(&mdev->irq_tasklet, mt792x_irq_tasklet, (unsigned long)dev); in mt7921_pci_probe()
365 mdev->rev = (chipid << 16) | in mt7921_pci_probe()
367 dev_info(mdev->dev, "ASIC revision: %04x\n", mdev->rev); in mt7921_pci_probe()
377 ret = devm_request_irq(mdev->dev, pdev->irq, mt792x_irq_handler, in mt7921_pci_probe()
409 struct mt76_dev *mdev = pci_get_drvdata(pdev); in mt7921_pci_remove() local
410 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_pci_remove()
418 set_bit(MT76_REMOVED, &mdev->phy.state); in mt7921_pci_remove()
428 struct mt76_dev *mdev = pci_get_drvdata(pdev); in mt7921_pci_suspend() local
429 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_pci_suspend()
451 err = mt76_connac_mcu_set_hif_suspend(mdev, true, true); in mt7921_pci_suspend()
460 napi_disable(&mdev->tx_napi); in mt7921_pci_suspend()
461 mt76_worker_disable(&mdev->tx_worker); in mt7921_pci_suspend()
463 mt76_for_each_q_rx(mdev, i) { in mt7921_pci_suspend()
464 napi_disable(&mdev->napi[i]); in mt7921_pci_suspend()
480 tasklet_kill(&mdev->irq_tasklet); in mt7921_pci_suspend()
489 mt76_for_each_q_rx(mdev, i) { in mt7921_pci_suspend()
490 napi_enable(&mdev->napi[i]); in mt7921_pci_suspend()
492 napi_enable(&mdev->tx_napi); in mt7921_pci_suspend()
497 mt76_connac_mcu_set_hif_suspend(mdev, false, true); in mt7921_pci_suspend()
511 struct mt76_dev *mdev = pci_get_drvdata(pdev); in mt7921_pci_resume() local
512 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); in mt7921_pci_resume()
533 mt76_worker_enable(&mdev->tx_worker); in mt7921_pci_resume()
535 mt76_for_each_q_rx(mdev, i) { in mt7921_pci_resume()
536 napi_enable(&mdev->napi[i]); in mt7921_pci_resume()
538 napi_enable(&mdev->tx_napi); in mt7921_pci_resume()
541 mt76_for_each_q_rx(mdev, i) { in mt7921_pci_resume()
542 napi_schedule(&mdev->napi[i]); in mt7921_pci_resume()
544 napi_schedule(&mdev->tx_napi); in mt7921_pci_resume()
551 err = mt76_connac_mcu_set_hif_suspend(mdev, false, true); in mt7921_pci_resume()