diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-02-24 13:03:18 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-02-26 10:28:19 +0100 |
commit | 90f42f2d76d0ed29553cf0167bc8e86c22e5a214 (patch) | |
tree | 6e287ce734e37ba2d1fc32b48f9cd78c0723d238 /drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | |
parent | ed55c9b9c13e3c30ed644a6ace02fd9fd6b70a45 (diff) | |
download | linux-stable-90f42f2d76d0ed29553cf0167bc8e86c22e5a214.tar.gz linux-stable-90f42f2d76d0ed29553cf0167bc8e86c22e5a214.tar.bz2 linux-stable-90f42f2d76d0ed29553cf0167bc8e86c22e5a214.zip |
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: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_mac.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c index be2979f34f31..82b178fa83bb 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c @@ -1126,6 +1126,9 @@ void mt76x02_mac_set_beacon_enable(struct mt76x02_dev *dev, else if (val) 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); if (mt76_is_mmio(dev)) |