mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76x0: pci: add pre_tbtt_tasklet support
Enable/disable pre_tbtt_tasklet in mt76x0 driver in order to add AP support Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
6b69650ea3
commit
8486047738
@@ -22,6 +22,7 @@ mt76x0_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
|
||||
int ret;
|
||||
|
||||
cancel_delayed_work_sync(&dev->cal_work);
|
||||
tasklet_disable(&dev->pre_tbtt_tasklet);
|
||||
|
||||
mt76_set_channel(&dev->mt76);
|
||||
ret = mt76x0_phy_set_channel(dev, chandef);
|
||||
@@ -30,6 +31,7 @@ mt76x0_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
|
||||
mt76_rr(dev, MT_CH_IDLE);
|
||||
mt76_rr(dev, MT_CH_BUSY);
|
||||
|
||||
tasklet_enable(&dev->pre_tbtt_tasklet);
|
||||
mt76_txq_schedule_all(&dev->mt76);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -187,6 +187,7 @@ error:
|
||||
static void mt76x0e_cleanup(struct mt76x02_dev *dev)
|
||||
{
|
||||
clear_bit(MT76_STATE_INITIALIZED, &dev->mt76.state);
|
||||
tasklet_disable(&dev->pre_tbtt_tasklet);
|
||||
mt76x0_chip_onoff(dev, false, false);
|
||||
mt76x0e_stop_hw(dev);
|
||||
mt76x02_dma_cleanup(dev);
|
||||
|
||||
@@ -148,8 +148,6 @@ int mt76x02_tx_prepare_skb(struct mt76_dev *mdev, void *txwi,
|
||||
struct mt76_wcid *wcid, struct ieee80211_sta *sta,
|
||||
u32 *tx_info);
|
||||
|
||||
void mt76x02_pre_tbtt_tasklet(unsigned long arg);
|
||||
|
||||
extern const u16 mt76x02_beacon_offsets[16];
|
||||
void mt76x02_set_beacon_offsets(struct mt76x02_dev *dev);
|
||||
void mt76x02_set_irq_mask(struct mt76x02_dev *dev, u32 clear, u32 set);
|
||||
|
||||
+4
-2
@@ -99,7 +99,7 @@ mt76x02_resync_beacon_timer(struct mt76x02_dev *dev)
|
||||
MT_BEACON_TIME_CFG_INTVAL, timer_val);
|
||||
}
|
||||
|
||||
void mt76x02_pre_tbtt_tasklet(unsigned long arg)
|
||||
static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
|
||||
{
|
||||
struct mt76x02_dev *dev = (struct mt76x02_dev *)arg;
|
||||
struct mt76_queue *q = &dev->mt76.q_tx[MT_TXQ_PSD];
|
||||
@@ -144,7 +144,6 @@ void mt76x02_pre_tbtt_tasklet(unsigned long arg)
|
||||
}
|
||||
spin_unlock_bh(&q->lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02_pre_tbtt_tasklet);
|
||||
|
||||
static int
|
||||
mt76x02_init_tx_queue(struct mt76x02_dev *dev, struct mt76_queue *q,
|
||||
@@ -223,6 +222,9 @@ int mt76x02_dma_init(struct mt76x02_dev *dev)
|
||||
return -ENOMEM;
|
||||
|
||||
tasklet_init(&dev->tx_tasklet, mt76x02_tx_tasklet, (unsigned long) dev);
|
||||
tasklet_init(&dev->pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
|
||||
(unsigned long)dev);
|
||||
|
||||
kfifo_init(&dev->txstatus_fifo, status_fifo, fifo_size);
|
||||
|
||||
mt76_dma_attach(&dev->mt76);
|
||||
|
||||
@@ -298,9 +298,6 @@ int mt76x2_init_hardware(struct mt76x02_dev *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
tasklet_init(&dev->pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
|
||||
(unsigned long) dev);
|
||||
|
||||
mt76x02_dma_disable(dev);
|
||||
mt76x2_reset_wlan(dev, true);
|
||||
mt76x2_power_on(dev);
|
||||
|
||||
Reference in New Issue
Block a user