mutex_init(&dev->mcu.mutex);
dev->tx_worker.fn = mt76_tx_worker;
+ spin_lock_init(&dev->token_lock);
+ idr_init(&dev->token);
+
INIT_LIST_HEAD(&dev->txwi_cache);
for (i = 0; i < ARRAY_SIZE(dev->q_rx); i++)
struct mt76_txwi_cache *
mt76_token_release(struct mt76_dev *dev, int token, bool *wake);
int mt76_token_consume(struct mt76_dev *dev, struct mt76_txwi_cache **ptxwi);
-void mt76_token_init(struct mt76_dev *dev);
void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked);
static inline void mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
mt76_wr(dev, MT_INT_SOURCE_CSR, ~0);
INIT_WORK(&dev->mcu_work, mt7615_pci_init_work);
- mt76_token_init(&dev->mt76);
-
ret = mt7615_eeprom_init(dev, addr);
if (ret < 0)
return ret;
mt76_wr(dev, MT_INT_SOURCE_CSR, ~0);
INIT_WORK(&dev->init_work, mt7915_init_work);
- mt76_token_init(&dev->mt76);
-
dev->dbdc_support = !!(mt76_rr(dev, MT_HW_BOUND) & BIT(5));
/* If MCU was already running, it is likely in a bad state */
{
int ret, idx;
- mt76_token_init(&dev->mt76);
ret = mt7921_dma_init(dev);
if (ret)
return ret;
}
EXPORT_SYMBOL_GPL(mt76_queue_tx_complete);
-void mt76_token_init(struct mt76_dev *dev)
-{
- spin_lock_init(&dev->token_lock);
- idr_init(&dev->token);
-}
-EXPORT_SYMBOL_GPL(mt76_token_init);
-
void __mt76_set_tx_blocked(struct mt76_dev *dev, bool blocked)
{
struct mt76_phy *phy = &dev->phy, *phy2 = dev->phy2;