mt76: mt76x02: introduce mt76x02_pre_tbtt_enable and mt76x02_beacon_enable macros

Improve code readability introducing mt76x02_pre_tbtt_enable and
mt76x02_beacon_enable utility macros

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2019-08-21 13:02:33 +02:00
committed by Felix Fietkau
parent 2becd13be7
commit 20f0c19672
4 changed files with 12 additions and 8 deletions
+5
View File
@@ -64,6 +64,11 @@ struct mt76x02_beacon_ops {
void (*beacon_enable)(struct mt76x02_dev *dev, bool en);
};
#define mt76x02_beacon_enable(dev, enable) \
(dev)->beacon_ops->beacon_enable(dev, enable)
#define mt76x02_pre_tbtt_enable(dev, enable) \
(dev)->beacon_ops->pre_tbtt_enable(dev, enable)
struct mt76x02_dev {
struct mt76_dev mt76; /* must be first */