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:
Stanislaw Gruszka
2019-03-24 08:21:28 +01:00
committed by Felix Fietkau
parent 91ade88519
commit 6370485deb
6 changed files with 57 additions and 17 deletions
+7
View File
@@ -68,6 +68,11 @@ struct mt76x02_calibration {
s8 tssi_dc;
};
struct mt76x02_beacon_ops {
void (*pre_tbtt_enable) (struct mt76x02_dev *, bool);
void (*beacon_enable) (struct mt76x02_dev *, bool);
};
struct mt76x02_dev {
struct mt76_dev mt76; /* must be first */
@@ -92,6 +97,8 @@ struct mt76x02_dev {
struct hrtimer pre_tbtt_timer;
struct work_struct pre_tbtt_work;
const struct mt76x02_beacon_ops *beacon_ops;
u32 aggr_stats[32];
struct sk_buff *beacons[8];