summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt76x0
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-09-05 18:29:13 +0200
committerFelix Fietkau <nbd@nbd.name>2019-11-20 13:23:49 +0100
commitaec65e484779c6326116be921cc1bf1aa8e85ecc (patch)
treee1d05e33c55da31560e1f5fd7f5e662c2ef4e45f /drivers/net/wireless/mediatek/mt76/mt76x0
parentdcff8d4dc301c0601625ccae0dffec1bbef83234 (diff)
downloadlinux-stable-aec65e484779c6326116be921cc1bf1aa8e85ecc.tar.gz
linux-stable-aec65e484779c6326116be921cc1bf1aa8e85ecc.tar.bz2
linux-stable-aec65e484779c6326116be921cc1bf1aa8e85ecc.zip
mt76: unify channel survey update code
Host time is used to calculate the channel active time on mt7603 and mt7615. Use the same on mt76x02 and move the lock to core code to get rid of some duplicated code. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x0')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x0/main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
index efb7ca93863d..f7682bd2e5a8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/main.c
@@ -19,10 +19,7 @@ mt76x0_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef)
mt76_set_channel(&dev->mt76);
mt76x0_phy_set_channel(dev, chandef);
- /* channel cycle counters read-and-clear */
- mt76_rr(dev, MT_CH_IDLE);
- mt76_rr(dev, MT_CH_BUSY);
-
+ mt76x02_mac_cc_reset(dev);
mt76x02_edcca_init(dev);
if (mt76_is_mmio(dev)) {