Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90f42f2d authored by Felix Fietkau's avatar Felix Fietkau
Browse files

mt76: mt76x02: only reset beacon drift counter when enabling beacons



When the timer is already running, there is no need to reset the counter,
because the drift will remain the same.

Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent ed55c9b9
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1126,6 +1126,9 @@ void mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev,
	else if (val)
	else if (val)
		skb = ieee80211_beacon_get(mt76_hw(dev), vif);
		skb = ieee80211_beacon_get(mt76_hw(dev), vif);


	if (!dev->beacon_mask)
		dev->tbtt_count = 0;

	__mt76x02_mac_set_beacon_enable(dev, vif_idx, val, skb);
	__mt76x02_mac_set_beacon_enable(dev, vif_idx, val, skb);


	if (mt76_is_mmio(dev))
	if (mt76_is_mmio(dev))
+0 −1
Original line number Original line Diff line number Diff line
@@ -713,7 +713,6 @@ void mt76x02_bss_info_changed(struct ieee80211_hw *hw,
			       MT_BEACON_TIME_CFG_INTVAL,
			       MT_BEACON_TIME_CFG_INTVAL,
			       info->beacon_int << 4);
			       info->beacon_int << 4);
		dev->beacon_int = info->beacon_int;
		dev->beacon_int = info->beacon_int;
		dev->tbtt_count = 0;
	}
	}


	if (changed & BSS_CHANGED_BEACON_ENABLED)
	if (changed & BSS_CHANGED_BEACON_ENABLED)