mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76x02: introduce beacon_ops
Enabling/disableing TBTT and beacon will be diffrent for USB. Introduce beacon_ops to encapsulate that and implement it for MMIO. USB implementation is noop for now. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
91ade88519
commit
6370485deb
@@ -172,8 +172,22 @@ static enum hrtimer_restart mt76x02u_pre_tbtt_interrupt(struct hrtimer *timer)
|
||||
return HRTIMER_NORESTART;
|
||||
}
|
||||
|
||||
static void mt76x02u_pre_tbtt_enable(struct mt76x02_dev *dev, bool en)
|
||||
{
|
||||
}
|
||||
|
||||
static void mt76x02u_beacon_enable(struct mt76x02_dev *dev, bool en)
|
||||
{
|
||||
}
|
||||
|
||||
void mt76x02u_init_beacon_config(struct mt76x02_dev *dev)
|
||||
{
|
||||
static const struct mt76x02_beacon_ops beacon_ops = {
|
||||
.pre_tbtt_enable = mt76x02u_pre_tbtt_enable,
|
||||
.beacon_enable = mt76x02u_beacon_enable,
|
||||
};
|
||||
dev->beacon_ops = &beacon_ops;
|
||||
|
||||
hrtimer_init(&dev->pre_tbtt_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
dev->pre_tbtt_timer.function = mt76x02u_pre_tbtt_interrupt;
|
||||
INIT_WORK(&dev->pre_tbtt_work, mt76x02u_pre_tbtt_work);
|
||||
|
||||
Reference in New Issue
Block a user