mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76x02: introduce mt76x02_beacon.c
Move most of beaconing code into separate file and separate beacon initialization for USB and MMIO as pre TBTT implementation for USB will be different. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
6fc50ea917
commit
f2a18f5a7f
+15
-2
@@ -152,6 +152,21 @@ static void mt76x02_pre_tbtt_tasklet(unsigned long arg)
|
||||
spin_unlock_bh(&q->lock);
|
||||
}
|
||||
|
||||
void mt76x02e_init_beacon_config(struct mt76x02_dev *dev)
|
||||
{
|
||||
tasklet_init(&dev->pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
|
||||
(unsigned long)dev);
|
||||
|
||||
/* Fire a pre-TBTT interrupt 8 ms before TBTT */
|
||||
mt76_rmw_field(dev, MT_INT_TIMER_CFG, MT_INT_TIMER_CFG_PRE_TBTT, 8 << 4);
|
||||
mt76_rmw_field(dev, MT_INT_TIMER_CFG, MT_INT_TIMER_CFG_GP_TIMER,
|
||||
MT_DFS_GP_INTERVAL);
|
||||
mt76_wr(dev, MT_INT_TIMER_EN, 0);
|
||||
|
||||
mt76x02_init_beacon_config(dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02e_init_beacon_config);
|
||||
|
||||
static int
|
||||
mt76x02_init_tx_queue(struct mt76x02_dev *dev, struct mt76_sw_queue *q,
|
||||
int idx, int n_desc)
|
||||
@@ -248,8 +263,6 @@ int mt76x02_dma_init(struct mt76x02_dev *dev)
|
||||
|
||||
tasklet_init(&dev->mt76.tx_tasklet, mt76x02_tx_tasklet,
|
||||
(unsigned long) dev);
|
||||
tasklet_init(&dev->pre_tbtt_tasklet, mt76x02_pre_tbtt_tasklet,
|
||||
(unsigned long)dev);
|
||||
|
||||
spin_lock_init(&dev->txstatus_fifo_lock);
|
||||
kfifo_init(&dev->txstatus_fifo, status_fifo, fifo_size);
|
||||
|
||||
Reference in New Issue
Block a user