summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7603
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2021-06-10 21:43:45 +0300
committerFelix Fietkau <nbd@nbd.name>2021-06-19 10:22:49 +0300
commitc560b137a2164c7160f4edc1813f3e335de6bdff (patch)
tree60faa3d2bf04923cca8cc4fcce69016b90bfe818 /drivers/net/wireless/mediatek/mt76/mt7603
parent0d733327c531814c0fb9ef4eea86ca0d6eddfe9e (diff)
downloadlinux-c560b137a2164c7160f4edc1813f3e335de6bdff.tar.xz
mt76: make mt76_update_survey() per phy
Reduce duplicated survey for DBDC. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7603')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7603/mac.c8
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index 4e76f9868b9b..8435e9597688 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -1584,12 +1584,12 @@ trigger:
return true;
}
-void mt7603_update_channel(struct mt76_dev *mdev)
+void mt7603_update_channel(struct mt76_phy *mphy)
{
- struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
+ struct mt7603_dev *dev = container_of(mphy->dev, struct mt7603_dev, mt76);
struct mt76_channel_state *state;
- state = mdev->phy.chan_state;
+ state = mphy->chan_state;
state->cc_busy += mt76_rr(dev, MT_MIB_STAT_CCA);
}
@@ -1806,7 +1806,7 @@ void mt7603_mac_work(struct work_struct *work)
mutex_lock(&dev->mt76.mutex);
dev->mphy.mac_work_count++;
- mt76_update_survey(&dev->mt76);
+ mt76_update_survey(&dev->mphy);
mt7603_edcca_check(dev);
for (i = 0, idx = 0; i < 2; i++) {
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index 1df5b9fed2bb..0fd46d907638 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -256,7 +256,7 @@ void mt7603_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
void mt7603_pre_tbtt_tasklet(struct tasklet_struct *t);
-void mt7603_update_channel(struct mt76_dev *mdev);
+void mt7603_update_channel(struct mt76_phy *mphy);
void mt7603_edcca_set_strict(struct mt7603_dev *dev, bool val);
void mt7603_cca_stats_reset(struct mt7603_dev *dev);