diff options
author | Ming Yen Hsieh <mingyen.hsieh@mediatek.com> | 2023-09-30 10:25:09 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-09-30 20:17:18 +0200 |
commit | 09382d8f8641bc12fffc41a93eb9b37be0e653c0 (patch) | |
tree | acb9d8d97d1fd2f61504bceb73bfc42fc4abf6a7 /drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | |
parent | 4fc8df50fd41c2762d893211487be0ecb24c6a05 (diff) |
wifi: mt76: mt7921: update the channel usage when the regd domain changed
The 5.9/6GHz channel license of a certain platform device has been
regulated in various countries. That may be difference with standard
Liunx regulatory domain settings. In this case, when .reg_notifier()
called for regulatory change, mt792x chipset should update the channel
usage based on clc or dts configurations.
Channel would be disabled by following cases.
* clc report the particular UNII-x is disabled.
* dts enabled and the channel is not configured.
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Co-developed-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7921/mcu.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c index 4f66e27aa43a..63f3d4a5c9aa 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c @@ -1247,6 +1247,7 @@ int __mt7921_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2, u8 idx) { #define CLC_CAP_EVT_EN BIT(0) +#define CLC_CAP_DTS_EN BIT(1) struct sk_buff *skb, *ret_skb = NULL; struct { u8 ver; @@ -1274,6 +1275,8 @@ int __mt7921_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2, if (dev->phy.chip_cap & MT792x_CHIP_CAP_CLC_EVT_EN) req.cap |= CLC_CAP_EVT_EN; + if (mt76_find_power_limits_node(&dev->mt76)) + req.cap |= CLC_CAP_DTS_EN; pos = clc->data; for (i = 0; i < clc->nr_country; i++) { |