summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2019-03-19 11:37:38 +0100
committerFelix Fietkau <nbd@nbd.name>2019-05-01 13:03:56 +0200
commitc004b881f1447ff768ccef9ba60a975c122a0596 (patch)
tree00ad5b545af4526fc852ed1bbc3e52ca7775ff1a /drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
parent5a3f1cc288fb2cb2597bd8ff8640a8de2ba14bd8 (diff)
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 <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
index f1a3d41c8209..eec6f856f88a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
@@ -171,8 +171,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);