diff options
| author | Ming Yen Hsieh <mingyen.hsieh@mediatek.com> | 2025-03-04 19:36:46 +0800 |
|---|---|---|
| committer | Felix Fietkau <nbd@nbd.name> | 2025-03-19 14:47:04 +0100 |
| commit | 91b3790240b5114a07a5d14a33e48d6c99350496 (patch) | |
| tree | 962e8ac7138eec462176363ce5f53024d32ac014 /drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | |
| parent | f0317215b367e22e1cde5dcdb4c0687f0a85b913 (diff) | |
wifi: mt76: mt7925: 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, mt7925 chipset should update the channel usage based on
CLC data.
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://patch.msgid.link/20250304113649.867387-3-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7925/mcu.c')
| -rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 575b51931d7d..30f88a9dcded 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -686,6 +686,7 @@ static int mt7925_load_clc(struct mt792x_dev *dev, const char *fw_name) u8 *clc_base = NULL, hw_encap = 0; int ret, i, len, offset = 0; + dev->phy.clc_chan_conf = 0xff; if (mt7925_disable_clc || mt76_is_usb(&dev->mt76)) return 0; @@ -3194,6 +3195,7 @@ __mt7925_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2, if (!clc) return 0; + req.ver = clc->ver; pos = clc->data + sizeof(*seg) * clc->t0.nr_seg; last_pos = clc->data + le32_to_cpu(*(__le32 *)(clc->data + 4)); while (pos < last_pos) { @@ -3211,6 +3213,7 @@ __mt7925_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2, memcpy(req.type, rule->type, 2); req.size = cpu_to_le16(seg->len); + dev->phy.clc_chan_conf = clc->ver == 1 ? 0xff : rule->flag; skb = __mt76_mcu_msg_alloc(&dev->mt76, &req, le16_to_cpu(req.size) + sizeof(req), sizeof(req), GFP_KERNEL); @@ -3226,8 +3229,10 @@ __mt7925_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2, valid_cnt++; } - if (!valid_cnt) + if (!valid_cnt) { + dev->phy.clc_chan_conf = 0xff; return -ENOENT; + } return 0; } |