diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-10-30 17:50:57 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-02-14 10:05:59 +0100 |
commit | 27ae72193249d7325ef72772e8f38015cfeae947 (patch) | |
tree | 93a8e65e4c2f464913df9316dddcd08de8cfe1c8 /drivers/net/wireless/mediatek/mt76/mt7615/main.c | |
parent | mt76: mt7615: rework chainmask handling (diff) | |
download | linux-27ae72193249d7325ef72772e8f38015cfeae947.tar.xz linux-27ae72193249d7325ef72772e8f38015cfeae947.zip |
mt76: mt7615: add multiple wiphy support to the rx path
Program the RMAC CHFREQ registers to properly indicate the band that the
frames are received on.
Add some sanity checks to the programmed values, because the firmware
programs these registers differently
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/main.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c index 35e2d258db5e..6b60ca80a241 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c @@ -178,6 +178,7 @@ static void mt7615_remove_interface(struct ieee80211_hw *hw, static int mt7615_set_channel(struct mt7615_phy *phy) { struct mt7615_dev *dev = phy->dev; + bool ext_phy = phy != &dev->phy; int ret; cancel_delayed_work_sync(&dev->mt76.mac_work); @@ -185,6 +186,7 @@ static int mt7615_set_channel(struct mt7615_phy *phy) mutex_lock(&dev->mt76.mutex); set_bit(MT76_RESET, &phy->mt76->state); + phy->chfreq_seq = (phy->chfreq_seq + 1) & MT_CHFREQ_SEQ; phy->dfs_state = -1; mt76_set_channel(phy->mt76); @@ -192,6 +194,11 @@ static int mt7615_set_channel(struct mt7615_phy *phy) if (ret) goto out; + mt76_wr(dev, MT_CHFREQ(ext_phy), + MT_CHFREQ_VALID | + (ext_phy * MT_CHFREQ_DBDC_IDX) | + phy->chfreq_seq); + ret = mt7615_dfs_init_radar_detector(phy); mt7615_mac_cca_stats_reset(phy); |