diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-01-14 16:38:55 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-01-27 17:30:01 +0100 |
commit | 5b257371ec18aabdb81103e3e5ee7b125feb63d1 (patch) | |
tree | fc9fdecf690cdef27f67dd469bca211701c627fa /drivers/net/wireless/mediatek/mt76/mt7615/init.c | |
parent | mt76: mt7915: fix eeprom DBDC band selection (diff) | |
download | linux-5b257371ec18aabdb81103e3e5ee7b125feb63d1.tar.xz linux-5b257371ec18aabdb81103e3e5ee7b125feb63d1.zip |
mt76: mt7615: set mcu country code in mt7615_mcu_set_channel_domain()
Update mcu country code running mt7615_mcu_set_channel_domain routine in
mt7615_regd_notifier().
Filter out disabled channels in mt7615_mcu_set_channel_domain().
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/init.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/init.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/init.c b/drivers/net/wireless/mediatek/mt76/mt7615/init.c index 8151c1d60728..7e81ec53bd84 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/init.c @@ -296,13 +296,15 @@ mt7615_regd_notifier(struct wiphy *wiphy, struct mt7615_phy *phy = mphy->priv; struct cfg80211_chan_def *chandef = &mphy->chandef; + memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2)); dev->mt76.region = request->dfs_region; - if (!(chandef->chan->flags & IEEE80211_CHAN_RADAR)) - return; - mt7615_mutex_acquire(dev); - mt7615_dfs_init_radar_detector(phy); + + if (chandef->chan->flags & IEEE80211_CHAN_RADAR) + mt7615_dfs_init_radar_detector(phy); + mt7615_mcu_set_channel_domain(phy); + mt7615_mutex_release(dev); } |