mt76: move beacon_mask in mt76_dev

Move beacon_mask in mt76_dev data structure since it is used by
all drivers

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2019-04-30 11:43:51 +02:00
committed by Felix Fietkau
parent f43fccf099
commit 74ab2cf617
8 changed files with 26 additions and 26 deletions
+4 -3
View File
@@ -177,7 +177,7 @@ static void mt76x02u_pre_tbtt_work(struct work_struct *work)
struct sk_buff *skb;
int i, nbeacons;
if (!dev->beacon_mask)
if (!dev->mt76.beacon_mask)
return;
mt76x02_resync_beacon_timer(dev);
@@ -186,7 +186,7 @@ static void mt76x02u_pre_tbtt_work(struct work_struct *work)
IEEE80211_IFACE_ITER_RESUME_ALL,
mt76x02_update_beacon_iter, dev);
nbeacons = hweight8(dev->beacon_mask);
nbeacons = hweight8(dev->mt76.beacon_mask);
mt76x02_enqueue_buffered_bc(dev, &data, N_BCN_SLOTS - nbeacons);
for (i = nbeacons; i < N_BCN_SLOTS; i++) {
@@ -209,7 +209,8 @@ static enum hrtimer_restart mt76x02u_pre_tbtt_interrupt(struct hrtimer *timer)
static void mt76x02u_pre_tbtt_enable(struct mt76x02_dev *dev, bool en)
{
if (en && dev->beacon_mask && !hrtimer_active(&dev->pre_tbtt_timer))
if (en && dev->mt76.beacon_mask &&
!hrtimer_active(&dev->pre_tbtt_timer))
mt76x02u_start_pre_tbtt_timer(dev);
if (!en)
mt76x02u_stop_pre_tbtt_timer(dev);