Skip to content

Commit

Permalink
mt76x02: fix crash on device reset
Browse files Browse the repository at this point in the history
Tasklets must not be reinitialized after being scheduled

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Apr 3, 2019
1 parent a11b673 commit b3a2965
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mt76x02_mmio.c
Expand Up @@ -92,9 +92,6 @@ void mt76x02e_init_beacon_config(struct mt76x02_dev *dev)
};
dev->beacon_ops = &beacon_ops;

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,
Expand Down Expand Up @@ -201,6 +198,8 @@ 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);
Expand Down

0 comments on commit b3a2965

Please sign in to comment.